Re: automatic documentation (docutils) does not pull in class methods?
Answering my own question -- it is django.contrib.admindocs.view that
limits the admindocs view to only list methods on a model that has a
single argument. The lines:
for func_name, func in model.__dict__.items():
if (inspect.isfunction(func) and len(inspect.getargspec(func)
[0]) == 1):
There is currently an open ticket http://code.djangoproject.com/ticket/12974
that patches it to handle
the case where methods have decorator on them, hence reducing the
number of args to zero.
My question is why are we limiting the list of methods to single
argument (self) methods?
I put business logic in the model and usually the models will have
many more methods
that take additional arguments.
P.K.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home