"selected" for ForeignKey field?

2005-08-30 Thread HBTaylor
I have a model with the following (exerpt): class Team(meta.Model): name = meta.CharField(maxlength=200) venue = meta.CharField(maxlength=200) division = meta.ForeignKey(Division) # snip snip snip class Division(meta.Model): name = meta.CharField(maxlength=40) conference

Re: Storing models in sessions

2005-08-30 Thread Chris Ryland
I'm still learning Django, but it seems like you'd have an easier time if you went with the general flow and simply used Django's ORM for everything, rather than trying to do something special for this case. Or am I misunderstanding your situation?

Re: extending admin interface

2005-08-30 Thread Adam
I haven't seen that error, but one thing I noticed about your model is that I don't think you can just add things to the admin interface (like you're trying to do with 'Extra info'). You have to copy the admin section of auth.User if you want everything that's already there to also show up. For

Re: list_display = ForeignKey?

2005-08-30 Thread J. Davis
I figured out what I was missing. If you want your model to show up in the admin list page you must supply a value for all defined foreign key contraints. Not sure if that's an SQL thing (mysql did not complain about their absence) or a Django thing. Removing "blank=True" from all the foreign

Re: CSS and PNG files in templates

2005-08-30 Thread Sam Newman
On 8/23/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 8/23/05, Sam Newman <[EMAIL PROTECTED]> wrote: > > Or more simply put, the Django web server doesn't serve your media > > (e.g. images, PNG, CSS) and there isn't a plan to (the related ticket > > is marked as WONTFIX). Which majorly

Re: extending admin interface

2005-08-30 Thread Igor Goryachieff
On Tue, Aug 30, 2005 at 09:56:42AM -0500, Adrian Holovaty wrote: > Yeah, whoever created that wiki page did it before the model syntax > changed. Here's an official example of subclassing models: > > http://www.djangoproject.com/documentation/models/subclassing/ I have seen that already, but it

Re: _(pre/post)_save relative question

2005-08-30 Thread asrenzo
Is this so trivial that nobody will help me ;-( Regards, Laurent

Re: User Authentication - What's the best way?

2005-08-30 Thread Adrian Holovaty
On 8/30/05, Jeremy Noetzelman <[EMAIL PROTECTED]> wrote: > ok ... so ... any documentation planned? Barring that, where's the best > place to look to start to grasp the user support? Yes, documentation is *certainly* planned! If you're too anxious to wait, check out django/models/auth.py,

Re: User Authentication - What's the best way?

2005-08-30 Thread Jeremy Noetzelman
ok ... so ... any documentation planned?  Barring that, where's the best place to look to start to grasp the user support?On 8/30/05, Adrian Holovaty < [EMAIL PROTECTED]> wrote:On 8/30/05, Jeremy Noetzelman < [EMAIL PROTECTED]> wrote:> Doesn't Django have built in User support?  Is there any

Re: User Authentication - What's the best way?

2005-08-30 Thread Adrian Holovaty
On 8/30/05, Jeremy Noetzelman <[EMAIL PROTECTED]> wrote: > Doesn't Django have built in User support? Is there any documentation on > that anywhere? I'll answer your questions in order. Yes, and no. :-) -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: User Authentication - What's the best way?

2005-08-30 Thread Jeremy Noetzelman
Doesn't Django have built in User support?  Is there any documentation on that anywhere?On 8/30/05, Jason F. McBrayer < [EMAIL PROTECTED]> wrote:On Tue, 2005-08-30 at 04:24 -0700, [EMAIL PROTECTED] wrote:> Hi All>> Just starting with django and have very quickly got to the point where> I can set

_(pre/post)_save relative question

2005-08-30 Thread asrenzo
Hi, I got a too difficult problem for me : Here's is my model Poll : class Poll(meta.Model): question = meta.CharField(maxlength=200) pub_date = meta.DateTimeField('date published') class META: admin = meta.Admin() def __repr__(self): return self.question

Re: extending admin interface

2005-08-30 Thread Adam
Yeah, I didn't update the wiki page because you told me the page you pointed to was coming. I'll replace the previous wiki page with a link to http://www.djangoproject.com/d ocumentation/models/subclassin g/ Adam

Re: extending admin interface

2005-08-30 Thread Adrian Holovaty
On 8/30/05, Igor Goryachieff <[EMAIL PROTECTED]> wrote: > > http://code.djangoproject.com/wiki/ModelInheritance > > This code doesn't work. Is it connected to ticket #122? Yeah, whoever created that wiki page did it before the model syntax changed. Here's an official example of subclassing

Re: extending admin interface

2005-08-30 Thread Igor Goryachieff
On Tue, Aug 30, 2005 at 02:21:23AM -0700, asrenzo wrote: > I guess this could help you : > > http://code.djangoproject.com/wiki/ModelInheritance This code doesn't work. Is it connected to ticket #122? -- Igor Goryachieff Jabber: [EMAIL PROTECTED] http://goryachev.org/

Re: User Authentication - What's the best way?

2005-08-30 Thread Jason F. McBrayer
On Tue, 2005-08-30 at 04:24 -0700, [EMAIL PROTECTED] wrote: > Hi All > > Just starting with django and have very quickly got to the point where > I can set out a simple little app. > > The next thing I need to be able to do is implement user > authentication. Nothing too fancy just a basic one

Re: Basic file upload (not model file object)

2005-08-30 Thread Jason F. McBrayer
On Tue, 2005-08-30 at 03:32 -0700, Dagur wrote: > It took me a while but I figured out how to do this: > > if request.POST: > new_data = request.POST.copy() > new_data.update(request.FILES) # This has to be added > > errors =

Re: Basic file upload (not model file object)

2005-08-30 Thread Dagur
Jason F. McBrayer wrote: > I'm almost certainly missing something very, very simple here, but I > haven't been able to find what it is on my own. > > One view in my app should allow users to upload an OPML file, which the > app will parse and use to import feeds, but which won't otherwise be >

Re: extending admin interface

2005-08-30 Thread Igor Goryachieff
On Tue, Aug 30, 2005 at 02:21:23AM -0700, asrenzo wrote: > I guess this could help you : > > http://code.djangoproject.com/wiki/ModelInheritance It seems to helpful for my purposes. Thanks! -- Igor Goryachieff Jabber: [EMAIL PROTECTED] http://goryachev.org/

Re: extending admin interface

2005-08-30 Thread asrenzo
I guess this could help you : http://code.djangoproject.com/wiki/ModelInheritance Regards, Laurent.

Re: NameError Exception

2005-08-30 Thread Sebastien Fievet
Allright, i'm confused. I'm a noob. Thanks a lot.

extending admin interface

2005-08-30 Thread Igor Goryachieff
Hello, guys! Is there a good solution to extend admin interface (including additional fields for users table) without hacking Django sources? In example I want to add extra fields for users table such as site, birthdate, jabber and so on and manage it from admin interface. Thank you! --