Permalink
Browse files

removing warnings when generating doc for image and tags field

  • Loading branch information...
1 parent f72f7d5 commit 138ab4b730f7b78eaf5805e010372fc452e63a67 @Fantomas42 committed Apr 30, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 docs/extensions/zinnia_docs.py
View
8 docs/extensions/zinnia_docs.py
@@ -10,6 +10,12 @@
from django.utils.html import strip_tags
from django.utils.encoding import force_unicode
+def skip_model_member(app, what, name, obj, skip, options):
+ # These fields always fails !
+ if name in ('tags', 'image'):
+ return True
+ return skip
+
def process_model_docstring(app, what, name, obj, options, lines):
if inspect.isclass(obj) and issubclass(obj, models.Model):
@@ -45,3 +51,5 @@ def setup(app):
)
app.connect('autodoc-process-docstring',
process_model_docstring)
+ app.connect('autodoc-skip-member',
+ skip_model_member)

0 comments on commit 138ab4b

Please sign in to comment.