onetoone field and memory issue

12 views
Skip to first unread message

John Carlo

unread,
Nov 26, 2013, 5:43:26 AM11/26/13
to django...@googlegroups.com
Hello everybody,

I have a memory issue and I'm looking for some suggestions.

I have the following model

class Entity(models.Model):
   
    item= models.OneToOneField(Bigdata, blank = True,null=True)


Bigdata is a table with 150.000+ items
In the admin interface, when I try to add a new Entity item, I have a big memory increment, I think because django load all the Bigdata table in the dropdown list of the fied item (I'm pretty sure, because if the table Bigdata is small I have no problem).
So the problem seems the filling of the Bigdata dropdown list, that loads all the items at once.

How can I deal with this situation? Pagination of Bigdata? Autocomplete instead dropdown list? Any feedback will be very appreciated.
thank you  everyone!

Carlo
  


James Bennett

unread,
Nov 26, 2013, 5:50:06 AM11/26/13
to django...@googlegroups.com

John Carlo

unread,
Nov 26, 2013, 6:12:00 AM11/26/13
to django...@googlegroups.com
great, now it works like a sharm!!!! Thank you very very much!


2013/11/26 James Bennett <ubern...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/IZbXwisADwo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAL13Cg-gtiSsD8%2BS9AcFZKnony5BdD6SsRMZagWY759kHKaDjw%40mail.gmail.com.

For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages