I'd do the "if" part as follows:
if label == 'books':
if db == 'test':
return True
return False
if db == 'test':
return False
return None # None means 'no opinion'.
iirc allow_syncdb() ought to return True/False to indicate whether a
certain model should be synced to a certain database. So you need to
make sure *two* things:
- Your special models only end up in your special database and not in
another.
- Other models (like the django_content_type table that gives you
problems!) should not end up in your special deatabase.
Reinout
--
Reinout van Rees http://reinout.vanrees.org/
rei...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
Which django version, btw? Early 1.2 beta versions had a bug:
https://code.djangoproject.com/ticket/12999
--
You received this message because you are subscribed to the Google Groups "Django users" group.To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
That's in the django docs: syncdb only managed the main default database
by default. You'll have to call syncdb on the second database separately.
Often the second database is an existing one that django shouldn't
touch, that's why the default is that way.