On Thursday, February 10, 2011 2:27:15 PM UTC, Szabo, Patrick (LNG-VIE)
wrote:
>
> I imorted from django.contrib.auth.models import User but when i do
>
> Mitarbeiter = request.user.id
>
> It tells me that NameError: name 'request' is not defined
>
> What am i doing wrong ?!
>
The first thing yo
On Thu, 10 Feb 2011 15:29:09 +0100, "Szabo, Patrick \(LNG-VIE\)"
wrote:
> Oh okay, so this only works for views ?!
> Can't i use that in my models.py ?!
There are places where you can use models without being logged or
having any idea of what a user can be.
For example, when you use the loaddata
- 146
-Ursprüngliche Nachricht-
Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im
Auftrag von Shawn Milochik
Gesendet: Donnerstag, 10. Februar 2011 15:18
An: django-users@googlegroups.com
Betreff: Re: AW: Current user
If you have the contrib.auth and session middl
2011 15:04
An: django-users@googlegroups.com
Betreff: AW: Current user
Might be a stupid question but do i have to import to do that !?
. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
XSLT-Entwickler
LexisNexis
Marxergasse 25, 1030 Wien
mailto:patrick.sz...@lexisnexis.at
Te
If you have the contrib.auth and session middleware installed (which you do by
default) then that will be available in you views without any additional
imports.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send emai
Might be a stupid question but do i have to import to do that !?
. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
XSLT-Entwickler
LexisNexis
Marxergasse 25, 1030 Wien
mailto:patrick.sz...@lexisnexis.at
Tel.: +43 (1) 534 52 - 1573
Fax: +43 (1) 534 52 - 146
-Ursprünglich
6 matches
Mail list logo