Re: Admin: design question

2008-09-14 Thread Gertjan Klein
Marc Boivin wrote: [queryset method on ModelAdmin] >It is valid, tested and working on Django 1.0. I have it working. It is not >documented, you need to search in the source code to get around it. Ah, yes, it does work -- but not in the way I expected it to! I spent the better part of two hours

Re: Admin: design question

2008-09-13 Thread Marc Boivin
Keith Eberle wrote: >Maybe you can do something similar to what's in this post (using queryset): >http://groups.google.com/ > > > group/django-users/browse_thread/thread/c59b3807631d2914/a07cabfb4725447d?lnk=gst&q=restrict+users+to+their+own+data#a07cabfb4725447d It is valid, tested and working

Re: Admin: design question

2008-09-13 Thread Gertjan Klein
Keith Eberle wrote: >Maybe you can do something similar to what's in this post (using queryset): >http://groups.google.com/group/django-users/browse_thread/thread/c59b3807631d2914/a07cabfb4725447d?lnk=gst&q=restrict+users+to+their+own+data#a07cabfb4725447d Is that still valid? I can find no docu

Re: Admin: design question

2008-09-13 Thread Keith Eberle
Maybe you can do something similar to what's in this post (using queryset): http://groups.google.com/group/django-users/browse_thread/thread/c59b3807631d2914/a07cabfb4725447d?lnk=gst&q=restrict+users+to+their+own+data#a07cabfb4725447d keith On Sat, Sep 13, 2008 at 10:30 AM, Gertjan Klein <[EMAIL

Re: Admin: design question

2008-09-13 Thread Gertjan Klein
Steve Holden wrote: >Gertjan Klein wrote: >> However, there is one obvious problem >> here: when editing an Hours instance, the ProjectCode dropdown lists >> *all* project codes, not just those related to the selected customer. >As long as you only want this in th admin, check out the >"ForeignK

Re: Admin: design question

2008-09-13 Thread Steve Holden
Gertjan Klein wrote: > Hi, > > I am writing a timekeeping app with Django, and have some design > questions. Stripped down, I have a model somewhat like this: > > class Customer(models.Model): > Name = models.CharField(max_length=200) > > class ProjectCode(models.Model): > Customer = mo

Admin: design question

2008-09-13 Thread Gertjan Klein
Hi, I am writing a timekeeping app with Django, and have some design questions. Stripped down, I have a model somewhat like this: class Customer(models.Model): Name = models.CharField(max_length=200) class ProjectCode(models.Model): Customer = models.ForeignKey('Customer') Code = mo