Commit 098faa1a by benjaoming

Add note in pluginbase about use of Meta.app_label

parent b20094c9
......@@ -59,6 +59,8 @@ class ArticlePlugin(models.Model):
pass
class Meta:
# Override this setting with app_label = '' in your extended model
# if it lives outside the wiki app.
app_label = settings.APP_LABEL
class ReusablePlugin(ArticlePlugin):
......@@ -105,6 +107,8 @@ class ReusablePlugin(ArticlePlugin):
super(ReusablePlugin, self).save(*args, **kwargs)
class Meta:
# Override this setting with app_label = '' in your extended model
# if it lives outside the wiki app.
app_label = settings.APP_LABEL
class SimplePluginCreateError(Exception): pass
......@@ -152,6 +156,8 @@ class SimplePlugin(ArticlePlugin):
super(SimplePlugin, self).save(*args, **kwargs)
class Meta:
# Override this setting with app_label = '' in your extended model
# if it lives outside the wiki app.
app_label = settings.APP_LABEL
class RevisionPlugin(ArticlePlugin):
......@@ -191,6 +197,8 @@ class RevisionPlugin(ArticlePlugin):
if save: self.save()
class Meta:
# Override this setting with app_label = '' in your extended model
# if it lives outside the wiki app.
app_label = settings.APP_LABEL
......@@ -228,6 +236,8 @@ class RevisionPluginRevision(BaseRevisionMixin, models.Model):
self.plugin.save()
class Meta:
# Override this setting with app_label = '' in your extended model
# if it lives outside the wiki app.
app_label = settings.APP_LABEL
get_latest_by = ('revision_number',)
ordering = ('-created',)
......
import os
import os.path
from django.conf import settings as django_settings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment