#22428 closed Bug (duplicate)

Model docstring not parsed in model detail

Reported by: axel_amigo 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 15 months ago.
Screenshots
22428-1.diff (2.8 KB) - added by claudep 15 months ago.

Download all attachments as: .zip

Change History (7)

Changed 15 months ago by axel_amigo

Screenshots

comment:1 Changed 15 months ago by axel_amigo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Type changed from Uncategorized to Bug

comment:2 follow-up: Changed 15 months ago by claudep

  • Triage Stage changed from Unreviewed to 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.

Changed 15 months ago by claudep

comment:3 Changed 15 months ago by claudep

  • Has patch set
  • Summary changed from Documentation helpers not working in models to Model docstring not parsed in model detail

comment:4 in reply to: ↑ 2 Changed 15 months ago by axel_amigo

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 Changed 15 months ago by aaugustin

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #5405.

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