Opened 12 years ago
Closed 12 years ago
#22428 closed Bug (duplicate)
Model docstring not parsed in model detail
| Reported by: | Axel Amigo Arnold | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admindocs | Version: | 1.6 |
| Severity: | Normal | Keywords: | helpers, models |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Using the same example that comes in the documentation, the documentation helpers are not working, but they do work in the views.
My models:
class Growth(models.Model):
"""
A Growth model. It must only exist one in the database.
References :model:`auth.User`.
"""
last_follow_job = models.DateTimeField()
My views:
def twitter_login(request, context=Context({})):
"""
Asks a user permissions for our twitter app.
**Session**
`oauth_token`
Stores Twitter's oauth_token
in the session.
`oauth_token_secret`
Stores Twitter's oauth_token_secret
in the session.
It uses :model:`growth.TwitterAccount`
**Context**
`RequestContext`
"""
from twython import Twython
t = Twython(settings.TWITTER_KEY, settings.TWITTER_SECRET)
auth_props = t.get_authentication_tokens(callback_url='http://www.derpaderp.com/twitter_callback/')
request.session['oauth_token'] = auth_props['oauth_token']
request.session['oauth_token_secret'] = auth_props['oauth_token_secret']
return HttpResponseRedirect(auth_props['auth_url'])
Attachments (2)
Change History (7)
by , 12 years ago
| Attachment: | 22428 attachments.zip added |
|---|
comment:1 by , 12 years ago
| Type: | Uncategorized → Bug |
|---|
follow-up: 4 comment:2 by , 12 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
When you say "are not working", it would help being a little more descriptive.
I suppose you meant that the docstring is not parsed for the model. Accepting on that base.
by , 12 years ago
| Attachment: | 22428-1.diff added |
|---|
comment:3 by , 12 years ago
| Has patch: | set |
|---|---|
| Summary: | Documentation helpers not working in models → Model docstring not parsed in model detail |
comment:4 by , 12 years ago
Replying to claudep:
When you say "are not working", it would help being a little more descriptive.
I suppose you meant that the docstring is not parsed for the model. Accepting on that base.
That's exactly what I meant. Sorry for the lack of descriptiveness.
Screenshots