#11353: use sphinx autodoc directives on geodjango application
---------------------------+------------------------------------------------
 Reporter:  yml            |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Uncategorized  |     Version:  1.0       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 I am trying to generate the API documentation of django-geotagging
 [1]. django-geotagging is a django application. I would like to add to
 the existing documentation rst files some "automatically" generated API
 documentation.
 In order to do this I have added a file called : api.rst which look
 like this : http://dpaste.com/58306/

 when I run the this command:
 {{{
 sphinx-build -a -b html .  _build
 }}}

 I get this error message :

 {{{
 Exception occurred:[ 20%] api
   File "/usr/lib/python2.6/django/contrib/gis/db/models/proxy.py", line
 27, in __get__
     geom_value = obj.__dict__[self._field.attname]
 AttributeError: 'NoneType' object has no attribute '__dict__'
 The full traceback has been saved in /tmp/sphinx-err-k0o7j2.log, if you
 want to report the issue to the author.

 }}}

 Changing the line 27 from :

 {{{
 geom_value = obj.__dict__[self._field.attname]
 }}}

 to :
 {{{
         try:
             geom_value = obj.__dict__[self._field.attname]
         except:
             geom_value = None
 }}}

 seems to fix this issue. After this modification I can use autodoc however
 I am not sure if this is not breaking something else or only hiding the
 problem.

 ps : I have described this behavior on this post [2]
 [1] https://code.launchpad.net/~yml/django-geotagging/geotags/+merges
 [2]http://groups.google.com/group/sphinx-
 dev/browse_thread/thread/7f0e83b3a2775d4

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11353>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to