Opened 11 years ago

Closed 11 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)

22428 attachments.zip (11.0 KB ) - added by Axel Amigo Arnold 11 years ago.
Screenshots
22428-1.diff (2.8 KB ) - added by Claude Paroz 11 years ago.

Download all attachments as: .zip

Change History (7)

by Axel Amigo Arnold, 11 years ago

Attachment: 22428 attachments.zip added

Screenshots

comment:1 by Axel Amigo Arnold, 11 years ago

Type: UncategorizedBug

comment:2 by Claude Paroz, 11 years ago

Triage Stage: UnreviewedAccepted

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 Claude Paroz, 11 years ago

Attachment: 22428-1.diff added

comment:3 by Claude Paroz, 11 years ago

Has patch: set
Summary: Documentation helpers not working in modelsModel docstring not parsed in model detail

in reply to:  2 comment:4 by Axel Amigo Arnold, 11 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.

comment:5 by Aymeric Augustin, 11 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #5405.

Note: See TracTickets for help on using tickets.
Back to Top