From caa3e77916b316e84c8b3f561221442732311c44 Mon Sep 17 00:00:00 2001 From: Raffaele Salmaso Date: Tue, 20 Feb 2018 16:14:39 +0100 Subject: [PATCH] List objects to export in models package --- src/wiki/models/__init__.py | 1 - src/wiki/models/article.py | 6 ++++++ src/wiki/models/pluginbase.py | 8 ++++++++ src/wiki/models/urlpath.py | 6 ++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/wiki/models/__init__.py b/src/wiki/models/__init__.py index e448ee27..b89415fb 100644 --- a/src/wiki/models/__init__.py +++ b/src/wiki/models/__init__.py @@ -2,7 +2,6 @@ from django.urls import base from django import urls from django import shortcuts -# TODO: Don't use wildcards from .article import * # noqa from .pluginbase import * # noqa from .urlpath import * # noqa diff --git a/src/wiki/models/article.py b/src/wiki/models/article.py index 4215c7e1..7e53255c 100644 --- a/src/wiki/models/article.py +++ b/src/wiki/models/article.py @@ -17,6 +17,12 @@ from wiki.core.markdown import article_markdown from wiki.decorators import disable_signal_for_loaddata +__all__ = [ + 'Article', 'ArticleForObject', 'ArticleRevision', + 'BaseRevisionMixin', +] + + class Article(models.Model): objects = managers.ArticleManager() diff --git a/src/wiki/models/pluginbase.py b/src/wiki/models/pluginbase.py index 30acecef..819d5301 100644 --- a/src/wiki/models/pluginbase.py +++ b/src/wiki/models/pluginbase.py @@ -26,6 +26,14 @@ from wiki.decorators import disable_signal_for_loaddata from .article import ArticleRevision, BaseRevisionMixin +__all__ = [ + 'ArticlePlugin', + 'SimplePlugin', 'SimplePluginCreateError', + 'ReusablePlugin', + 'RevisionPlugin', 'RevisionPluginRevision', +] + + class ArticlePlugin(models.Model): """This is the mother of all plugins. Extending from it means a deletion diff --git a/src/wiki/models/urlpath.py b/src/wiki/models/urlpath.py index 809b336a..8c36420d 100644 --- a/src/wiki/models/urlpath.py +++ b/src/wiki/models/urlpath.py @@ -19,6 +19,12 @@ from wiki.core.exceptions import MultipleRootURLs, NoRootURL from wiki.decorators import disable_signal_for_loaddata from wiki.models.article import Article, ArticleForObject, ArticleRevision + +__all__ = [ + 'URLPath', +] + + log = logging.getLogger(__name__) -- 2.45.2