On Mar 17, 7:24 pm, Andy Mckay <[email protected]> wrote:
> If you use request context then you will get the user available:
>
> http://docs.djangoproject.com/en/dev/ref/templates/api/?from=olddocs#...
I could correctly access context, in fact i had the error also from
the shell.
The problem i had ("Caught an exception while rendering: Cannot
resolve keyword 'user' into field") was because in my model i had:
utente = models.ForeignKey(User, unique=True, blank=True, null=True)
i renamed my attribute to user, and so it is working:
user = models.ForeignKey(User, unique=True, blank=True, null=True)
so looks like in the doc should be written that the foreign key MUST
be called user.
thanks anyway
Paolo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---