#12974: Admin docs omits several methods for a Model
-------------------------------------------+--------------------------------
Reporter: jabapyth | Owner: jabapyth
Status: reopened | Milestone:
Component: django.contrib.admin | Version: SVN
Resolution: | Keywords: admin, docs,
method, admindocs
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 1 |
-------------------------------------------+--------------------------------
Changes (by russellm):
* needs_better_patch: 0 => 1
* component: Documentation => django.contrib.admin
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Ok - problem now confirmed. For future reference: While I was eventually
able to piece together an example that broke, it took some work. The best
test case isn't a longer, more verbose verbal explanation -- it's a
working sample of code that demonstrates the breakage, along with a short
set of instructions for how to cause the breakage. For example:
Sample model:
{{{
class Thing(models.Model):
name = models.CharField(max_length=100)
@models.permalink
def get_absolute_url(self):
"Get the URL"
return ('blog_detail', None, {})
def button(self):
"Push the button"
pass
}}}
If you inspect {{{/admin/doc/models/myapp.thing/}}} (the admin docs for
the Thing model), button will be displayed, but get_absolute_url will not.
The best part is that this programatic test case can form the start of the
test for your patch. Your patch doesn't have a test case, so the 'needs
test case' flag still applies. The fact that this particularly feature
doesn't have any tests at the moment doesn't give you a pass to not
include tests -- it's an opportunity to add tests to make sure the feature
will continue to work.
I've also turned on patch needs improvement -- At this point, the check
for function arguments is redundant, since you can't have a function with
a negative argument count.
--
Ticket URL: <http://code.djangoproject.com/ticket/12974#comment:6>
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.