Thursday, March 29, 2012

Re: Auth app in separate database

Couldn't he also just add the router before syncdb and then they would
be created in the correct database?

Chris take a look at this documentation if you haven't already, it
explains routers which tell Django which database to use for a
particular query:
https://docs.djangoproject.com/en/dev/topics/db/multi-db/#using-routers

On Mar 28, 9:00 pm, Amit <pathakami...@gmail.com> wrote:
> While running syncdb command django uses default database to create
> tables.
> You can do one thing, first create default database using syncdb then
> copy auth related tables to another database.
> Then define router for auth. You can get more ref form django
> documentatiion.
>
> Regards,
> Amit
>
> On Mar 29, 4:08 am, Chris <crflei...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Has anyone been successful in putting the auth application in a
> > separate database so that users can be shared with different django
> > projects?
>
> > When I try to put the auth application in a different database I get
> > an error with syncdb:
>
> > django.db.utils.DatabaseError: relation "auth_permission" does not
> > exist
> > LINE 1: ...ntent_type_id", "auth_permission"."codename" FROM
> > "auth_perm...

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@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.

No comments:

Post a Comment