overriding queryset for admin inlines

2009-08-14 Thread smcoll
Currently, we can override the queryset used by ModelAdmins. This is helpful, since often times the default manager omits instances that nevertheless belong in the admin. It seems to me that there's no way to override the queryset for inlines, though. Is that correct? Inlines seem to use the de

enhance reverse url resolving

2009-02-11 Thread smcoll
i had a problem recently where a stray urls.py was choking the reverse function. This particular urls.py was just thrown to the side in a directory, so it took me a while to realize what was going on. How about requiring that any urls.py file at least have a corresponding __init__.py before proc

Re: admin doesn't allow more than one null fk where unique=True

2008-09-24 Thread smcoll
t; are any dbs for which this isn't true? > > On Sep 19, 11:10 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > On Fri, Sep 19, 2008 at 10:51 AM, smcoll <[EMAIL PROTECTED]> wrote: > > > > Take this model as an example: > > > &g

Re: admin doesn't allow more than one null fk where unique=True

2008-09-24 Thread smcoll
n Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Sep 19, 2008 at 10:51 AM, smcoll <[EMAIL PROTECTED]> wrote: > > > Take this model as an example: > > > - > > from django.db import models > > from django.contrib.auth.models import User >

admin doesn't allow more than one null fk where unique=True

2008-09-19 Thread smcoll
Take this model as an example: - from django.db import models from django.contrib.auth.models import User class Contact(models.Model): user = models.ForeignKey(User, unique=True, null=True, blank=True) - No more than one Contact can be saved with a Null fk on 'user',

incorrect field type for object_pk in contrib.comments?

2008-09-16 Thread smcoll
Looking at contrib.comments admin, i noted that the Object ID input is a textarea. i thought that was strange, since i expceted an input (type="text"). Turns out, in the model, this is a TextField, rather than a CharField. http://code.djangoproject.com/browser/django/trunk/django/contrib/comme