2020-02-11 23:17:21 +00:00
|
|
|
''' bring all the models into the app namespace '''
|
2020-09-17 20:02:52 +00:00
|
|
|
import inspect
|
|
|
|
import sys
|
|
|
|
|
2020-12-22 18:28:04 +00:00
|
|
|
from .book import Book, Work, Edition, BookDataModel
|
2020-11-27 22:54:08 +00:00
|
|
|
from .author import Author
|
2020-09-17 20:09:11 +00:00
|
|
|
from .connector import Connector
|
2020-11-28 01:20:01 +00:00
|
|
|
|
2020-03-07 06:56:44 +00:00
|
|
|
from .shelf import Shelf, ShelfBook
|
2020-11-28 01:20:01 +00:00
|
|
|
|
2020-10-30 22:22:20 +00:00
|
|
|
from .status import Status, GeneratedNote, Review, Comment, Quotation
|
2021-01-01 18:46:15 +00:00
|
|
|
from .status import Boost
|
2020-11-28 01:20:01 +00:00
|
|
|
from .attachment import Image
|
2021-01-01 18:46:15 +00:00
|
|
|
from .favorite import Favorite
|
|
|
|
from .notification import Notification
|
|
|
|
from .readthrough import ReadThrough
|
2020-11-28 01:20:01 +00:00
|
|
|
|
2020-11-28 19:00:40 +00:00
|
|
|
from .tag import Tag, UserTag
|
2020-11-28 01:20:01 +00:00
|
|
|
|
2020-11-30 18:32:54 +00:00
|
|
|
from .user import User, KeyPair
|
2020-11-28 01:20:01 +00:00
|
|
|
from .relationship import UserFollows, UserFollowRequest, UserBlocks
|
2020-09-17 20:09:11 +00:00
|
|
|
from .federated_server import FederatedServer
|
2020-09-17 20:02:52 +00:00
|
|
|
|
2020-04-21 14:09:21 +00:00
|
|
|
from .import_job import ImportJob, ImportItem
|
2020-11-28 01:20:01 +00:00
|
|
|
|
2020-10-02 20:32:19 +00:00
|
|
|
from .site import SiteSettings, SiteInvite, PasswordReset
|
2020-09-17 20:02:52 +00:00
|
|
|
|
|
|
|
cls_members = inspect.getmembers(sys.modules[__name__], inspect.isclass)
|
2020-11-04 22:19:06 +00:00
|
|
|
activity_models = {c[1].activity_serializer.__name__: c[1] \
|
2020-11-04 22:13:34 +00:00
|
|
|
for c in cls_members if hasattr(c[1], 'activity_serializer')}
|
2020-12-30 21:14:16 +00:00
|
|
|
|
|
|
|
status_models = [
|
|
|
|
c.__name__ for (_, c) in activity_models.items() if issubclass(c, Status)]
|