# UPDATE

One of my issues is that my router code was based on and older version of
Django. I am not sure if this is exactly correct now but it closely 
resembles
the documentation now: 
https://docs.djangoproject.com/en/1.8/topics/db/multi-db/


    class fbrPostHasteAppV0_1Router(object):
        def db_for_read(self, model, **hints):
            if model._meta.app_label == 'fbrPostHasteAppV0_1':
                return 'fbrPostHasteDbV0_1'
            return None

        def db_for_write(self, model, **hints):
            if model._meta.app_label == 'fbrPostHasteAppV0_1':
                return 'fbrPostHasteDbV0_1'
            return None

        def allow_relation(self, obj1, obj2, **hints):
            if obj1._meta.app_label == 'fbrPostHasteAppV0_1' or \
               obj2._meta.app_label == 'fbrPostHasteAppV0_1':
               return True
            return None

        def allow_migrate(self, db, app_label, model=None, **hints):
            if app_label == 'fbrPostHasteAppV0_1':
                return db == 'fbrPostHasteDbV0_1'
            return None

The other issue is that I was not calling migrate with --database:

     python manage.py migrate --database=fbrPostHasteDb

But now I am getting another error:

    django.db.utils.OperationalError: FATAL:  database "fbrPostHasteDbV0_1" 
does not exist

Continuing to figure out what else I messed up...

-- 
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+unsubscr...@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/3890bdc8-7ff8-4426-9726-3aeb7a23651a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to