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.
* needs_better_patch: => 0
* type: Uncategorized => Bug
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/22428#comment:1>
* 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>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/22428#comment:3>
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>
* status: new => closed
* resolution: => duplicate
Comment:
Duplicate of #5405.
--
Ticket URL: <https://code.djangoproject.com/ticket/22428#comment:5>