Tuesday, October 29, 2013

Re: multiple databases and syncdb problem

syncdb defaults to syncing the 'default' database when no --database is specified.

Try specifying which database to synchronize, with the --database=inserv flag in your case.

Le mardi 29 octobre 2013 16:52:15 UTC-4, fred a écrit :

I can syncdb OK if I don't add allow_syncdb to my router, but if I add the allow_syncdb to the router, only my default db is synced.  Any idea what I'm doing wrong, code is:

 

    def allow_syncdb(self, db, model):

        print 'allow syncdb for***************** Inserv Router', db, model._meta.app_label

        return db=='inserv' and model._meta.app_label == 'inserv'

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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/48432761-428b-4e17-80d6-05f6c01de318%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment