Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-wiki
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-wiki
Commits
098faa1a
Commit
098faa1a
authored
Feb 22, 2013
by
benjaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add note in pluginbase about use of Meta.app_label
parent
b20094c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
+10
-1
wiki/models/pluginbase.py
+10
-0
wiki/plugins/images/models.py
+0
-1
No files found.
wiki/models/pluginbase.py
View file @
098faa1a
...
...
@@ -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'
,)
...
...
wiki/plugins/images/models.py
View file @
098faa1a
import
os
import
os.path
from
django.conf
import
settings
as
django_settings
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment