On Dec 5, 6:23 pm, "Jim D." <[EMAIL PROTECTED]> wrote:
> I apologize if this question has been asked/answered here before, but
> I searched around and couldn't find anything.
>
> We're working on a django app in which we're porting some existing
> user data over....we have about 100,000 user records that are being
> imported. We have many other models that are linked back to User in a
> one-to-many association.
>
> The problem we're experiencing is with the admin. When we're
> displaying the admin edit form for a model that's related to User, it
> ends up with a drop down allowing you to change which user is
> associated with the object. The problem is that 100,000 user records
> end up appearing in this drop down!
>
> Is there a different widget that can be used in the case where an
> object is related to another with a really large number of records?
>
> Or are we doing something wrong that I'm overlooking? I feel like this
> must have come up for many people and I must be missing something
> that's super obvious to everyone else.
>
> Any advice or guidance you guys can provide is very much appreciated.
> Many thanks!

Add it to the raw_id_fields list on your admin class.
See http://docs.djangoproject.com/en/dev/ref/contrib/admin/#raw-id-fields

--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to