Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

removing warnings when generating doc for image and tags field

  • Loading branch information...
commit 138ab4b730f7b78eaf5805e010372fc452e63a67 1 parent f72f7d5
Julien Fache authored April 30, 2012

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  docs/extensions/zinnia_docs.py
8  docs/extensions/zinnia_docs.py
@@ -10,6 +10,12 @@
10 10
 from django.utils.html import strip_tags
11 11
 from django.utils.encoding import force_unicode
12 12
 
  13
+def skip_model_member(app, what, name, obj, skip, options):
  14
+    # These fields always fails !
  15
+    if name in ('tags', 'image'):
  16
+        return True
  17
+    return skip
  18
+
13 19
 
14 20
 def process_model_docstring(app, what, name, obj, options, lines):
15 21
     if inspect.isclass(obj) and issubclass(obj, models.Model):
@@ -45,3 +51,5 @@ def setup(app):
45 51
     )
46 52
     app.connect('autodoc-process-docstring',
47 53
                 process_model_docstring)
  54
+    app.connect('autodoc-skip-member',
  55
+                skip_model_member)

0 notes on commit 138ab4b

Please sign in to comment.
Something went wrong with that request. Please try again.