Re: Joins - a problem

2005-11-05 Thread PythonistL
Thank you Jeff for the explanation. Regards, Lad.

HTTP_REFERER

2005-11-05 Thread PythonistL
I use the following view for user's log in ### def MyLogin(request): WrongID=0 AllGood=1 if request.POST: print "Refferer1 from POST",Refferer1 try: u=users.get_object(Login__exact=request.POST['Login']) except users.UserDoesNotExist:

Re: HTTP_REFERER

2005-11-05 Thread Andreas Stuhlmüller
PythonistL wrote: > Can anybody explain WHY the value from GET part > (command on line 15 such as > Refferer1= request.META['HTTP_REFERER'] > ) is not saved to POST? request.POST contains only the variables POSTed by the user. You'll have to make sure that the referer variable is part of your for

Re: HTTP_REFERER

2005-11-05 Thread Luke Plant
On Sat, 05 Nov 2005 03:04:27 -0800 PythonistL wrote: > > I use the following view for user's log in > ### > def MyLogin(request): > WrongID=0 > AllGood=1 > if request.POST: > print "Refferer1 from POST",Refferer1 At this point, you haven't yet set Referrer1,

Django developing in NewEdit

2005-11-05 Thread limodou
NewEdit is a Python Editor base on wxPython. I'm learning django recently, and I'm beginning develop some extension about django in NewEdit. The process is continuing. I'v finished something like these: * django project wizard(need install it) -- you can create a django project directory in NewE

how do I tell the admin interface to do lookups with select_related?

2005-11-05 Thread Le Roux Bodenstein
I have a foreign key to the auth.User model in one of my models (the 'owner' of the object) and I want to display the full name of the person instead of the username in the listing for my model in the admin interface. Currently it displays the username, because that's what auth,User.__repr__ retu

question / suggestion for one to many fields

2005-11-05 Thread Le Roux Bodenstein
Let's say I have two types of objects (types A and B) and object A has many object Bs. (typical foreign key) Is there a way to tell the admin interface to add a little plus button (either in the listing or edit view for object As) for quickly and easily adding a new object of type B? In other wor

Re: question / suggestion for one to many fields

2005-11-05 Thread Adrian Holovaty
On 11/5/05, Le Roux Bodenstein <[EMAIL PROTECTED]> wrote: > Let's say I have two types of objects (types A and B) and object A has > many object Bs. (typical foreign key) > > Is there a way to tell the admin interface to add a little plus button > (either in the listing or edit view for object As)

Re: how do I tell the admin interface to do lookups with select_related?

2005-11-05 Thread Adrian Holovaty
On 11/5/05, Le Roux Bodenstein <[EMAIL PROTECTED]> wrote: > admin = meta.Admin( > list_display = ("name", "short_description", > "get_owner_fullname", "created") > ) > ... > def get_owner_fullname(self): > owner = self.get_owner() > return owner.first_name +

Re: how do I tell the admin interface to do lookups with select_related?

2005-11-05 Thread Le Roux
Thanks! wow, that was quick! I can see the query is selecting a lot more stuff, but when I do a self.get_owner() inside my function, it still run a query.. self.owner is not already set either. Surely it shouldn't run the query? Le Roux

Re: question / suggestion for one to many fields

2005-11-05 Thread Le Roux
Actually you got it the wrong way around ;) If I'm adding a wikipage, I have a little "+" next to the wiki select box. I want a "+" button for adding a wikipage on every row in the wiki list. (and a "view wikipages" button that will take you to a filtered list containing of wiki pages for that wi

Re: question / suggestion for one to many fields

2005-11-05 Thread jws
And, obviously, you must have a current release. I'm not sure when that feature started. Every time I sync up, there's 'New Stuff' to look at.