[Django] #22428: Documentation helpers not working in models

7 views
Skip to first unread message

Django

unread,
Apr 13, 2014, 7:18:30 AM4/13/14
to django-...@googlegroups.com
#22428: Documentation helpers not working in models
-----------------------------------+-----------------------------
Reporter: axel_amigo | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.admindocs | Version: 1.6
Severity: Normal | Keywords: helpers, models
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+-----------------------------
Using the same example that comes in
[https://docs.djangoproject.com/en/1.6/ref/contrib/admin/admindocs/#model-
reference 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'])

}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22428>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 13, 2014, 7:21:46 AM4/13/14
to django-...@googlegroups.com
#22428: Documentation helpers not working in models
-----------------------------------+--------------------------------------
Reporter: axel_amigo | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: 1.6
Severity: Normal | Resolution:

Keywords: helpers, models | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by axel_amigo):

* needs_better_patch: => 0
* type: Uncategorized => Bug
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/22428#comment:1>

Django

unread,
Apr 13, 2014, 1:38:33 PM4/13/14
to django-...@googlegroups.com
#22428: Documentation helpers not working in models
-----------------------------------+------------------------------------
Reporter: axel_amigo | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: 1.6
Severity: Normal | Resolution:
Keywords: helpers, models | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by claudep):

* stage: Unreviewed => Accepted


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/22428#comment:2>

Django

unread,
Apr 13, 2014, 2:02:45 PM4/13/14
to django-...@googlegroups.com
#22428: Model docstring not parsed in model detail
-----------------------------------+------------------------------------
Reporter: axel_amigo | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: 1.6
Severity: Normal | Resolution:
Keywords: helpers, models | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by claudep):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/22428#comment:3>

Django

unread,
Apr 13, 2014, 2:05:33 PM4/13/14
to django-...@googlegroups.com
#22428: Model docstring not parsed in model detail
-----------------------------------+------------------------------------
Reporter: axel_amigo | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: 1.6

Severity: Normal | Resolution:
Keywords: helpers, models | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by axel_amigo):

Replying to [comment:2 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/22428#comment:4>

Django

unread,
Apr 14, 2014, 2:13:28 AM4/14/14
to django-...@googlegroups.com
#22428: Model docstring not parsed in model detail
-----------------------------------+-------------------------------------
Reporter: axel_amigo | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admindocs | Version: 1.6
Severity: Normal | Resolution: duplicate

Keywords: helpers, models | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+-------------------------------------
Changes (by aaugustin):

* status: new => closed
* resolution: => duplicate


Comment:

Duplicate of #5405.

--
Ticket URL: <https://code.djangoproject.com/ticket/22428#comment:5>

Reply all
Reply to author
Forward
0 new messages