Ask Your Question
1

block user going further after sign in

asked 2013-12-01 08:50:04 -0600

SocialQA gravatar image

updated 2013-12-01 13:47:59 -0600

Evgeny gravatar image

I have built module for user to agree terms of service, I have a decorator that I want to put it in deps/views.py I am trying to figure out where I should exactly use my decorator. I tried adding my decorator prior to following method but I didn't get the full effect. What I really want to do is once user click login (either open_id, google or django login) my decorator should get activate.

Here are the methods that I used but didn't really work.

#@requires_agreement('terms_of_service')
def show_signin_view(
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-12-01 13:56:39 -0600

Evgeny gravatar image

You should be able to create a custom registration form and assign dotted path to it via settings.py variable REGISTRATION_FORM (<- just look in the code for this keyword). I think this method will be simpler than using a decorator or modifying the code base.

edit flag offensive delete link more

Comments

@Evgeny I am not really sure what you meant by "assign dotted path to it via". I looked for REGISTRATION_FORM in settings.py but that variable doesn't exist in settings.py

SocialQA gravatar imageSocialQA ( 2013-12-01 15:41:19 -0600 )edit

Like `REGISTRATION_FORM = 'myapp.forms.MyRegistrationForm'`

Evgeny gravatar imageEvgeny ( 2013-12-01 16:14:41 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-12-01 08:50:04 -0600

Seen: 486 times

Last updated: Dec 01 '13