Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'AnonymousUser' object has no attribute 'get_profile' #52

Closed
ekatsah opened this issue May 21, 2012 · 0 comments
Closed
Labels
Milestone

Comments

@ekatsah
Copy link
Owner

ekatsah commented May 21, 2012

02:58 < ibizaman> ça me donne ça : AttributeError: 'AnonymousUser' object has no attribute 'get_profile'
02:59 < ibizaman> voir: http://pastie.org/3942396
03:07 < Bram> ça ressemble à un cas où y a pas vérification que l'user est loggé avec de faire un get_profile
03:07 < Bram> puisque l'user est probablement pas censé arriver jusque là
03:09 < ibizaman> Bram: ça ressemble à ça on est d'accord
03:10 < ibizaman> peut-être que je teste mal le fait d'être loggé ou non
03:10 < Bram> ibizaman: regarde ici /Volumes/Data/home/timi/Sites/proj402/../proj402/utils/decorators.py
03:10 < Bram> if request.user.get_profile().moderate:
03:11 < Bram> y a un if request.user.is_anonymous ou un brole du genre
03:11 < Bram> ou "is_logged"
03:11 < Bram> si non tu as ton erreur
03:13 < ibizaman> et non il y a direct "request.user.get_profile().moderate"

En gros, il faut inverser les moderate() et les login required() dans les urls.py.

Rules : enforce_post >> AR >> login_required >> moderate

@ekatsah ekatsah closed this as completed May 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant