Cross database join being forced

2010-04-20 Thread wizard
I'm not sure if this is a bug or an example of not understanding the documentation. I have two models in two different databases. I have a router. I'm trying to get a list of customers from one model (about 30 records worth) and filter for records with that customer in the the other. Here are my

many to many based upon common field

2010-04-13 Thread wizard
This is sort of an extension of my post from stackoverflow. http://stackoverflow.com/questions/2632573/how-do-i-relate-two-models-tables-in-django-based-on-non-primary-non-unique-keys The gist is I have two tables with a common field and I would like to relate two models with a many to many based

Re: Populating fields from the admin section

2010-04-12 Thread wizard
I think this can help you, it allows you to make choices for django admin fields. http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.choices http://www.djangoproject.com/documentation/models/choices/ -Francis On Apr 12, 10:58 am, Daxal wrote: > Hey, > > I am wonderin

Pattern for filtering based on user input

2010-04-12 Thread wizard
I have a simple filter that takes input based upon the url. urlpatterns = patterns('ahrlty.listings.views', (r'^(?P.*)$', 'index'), ) In the view I do a simple validation against a tuple in my listings model that I use for choices in a field. if dict(Listing.listing_types).has_key(listin