#921 - Add a "me" shortcut to UserFields

0 views
Skip to first unread message

Lawrence Oluyede

unread,
Jan 3, 2007, 10:25:47 AM1/3/07
to django-d...@googlegroups.com
http://code.djangoproject.com/ticket/921

I don't understand the meaning of this ticket. UserField is not a
class in the model API, nor present in any place of the Django tree.
Maybe is something that was later removed from Django?

--
Lawrence
http://www.oluyede.org/blog
http://www.neropercaso.it

James Bennett

unread,
Jan 3, 2007, 11:33:31 AM1/3/07
to django-d...@googlegroups.com
On 1/3/07, Lawrence Oluyede <l.ol...@gmail.com> wrote:
> I don't understand the meaning of this ticket. UserField is not a
> class in the model API, nor present in any place of the Django tree.
> Maybe is something that was later removed from Django?

I assume that what the submitter of the ticket wanted was the ability
to do something like

class Foo(models.Model):
name = models.CharField(maxlength=200)
owner = models.ForeignKey(User, default=me)

and have the 'default=me' mean that the foreign key should default to
the currently-logged-in user.

There is not and never has been such a thing as a 'UserField', I'm
just assuming it meant a foreign key to User.

--
"May the forces of evil become confused on the way to your house."
-- George Carlin

Reply all
Reply to author
Forward
0 new messages