Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def auth_decorator(func):
- user = func
- login_user = authenticate(username=user.username, password=form.cleaned_data['password1'])
- if user is not None:
- profile = UserProfile.objects.filter(user=user).get()
- if not profile.paid_user:
- return redirect(site)
- else:
- return func
- else:
- return func
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement