Yes, it should be quite straightforward to implement.

Setup the appropriate databases, say, db_asia, db_euro, etc. Create 
separate apps asia, euro, etc. Create a db_router that makes asia models 
sticky to db_asia, etc. 

Create a handler that returns the appropriate model to use based on 
geolocation. If you don’t want to create region specific apps, you can make 
your handler return the appropriate db to use based on geolocation info. 
Django makes it easy to specify the database to fetch information from.

If you want users to remain sticky to specific db when travelling, one way 
to do this will be to assign a db to users when they create accounts. You 
can save db and user authentication info when they log in and fetch from 
the appropriate database as before.

On Saturday, March 7, 2015 at 3:09:28 PM UTC-5, xino12 wrote:
>
> Hi,
>
> is there any possibility that we could select the database to which route 
> a request of a user depending on the geolocalization of the client? Or the 
> user country?
>
> I've check some documentation of the dbrouters, but I am concerned that if 
> a user travels to another country he is going to be routed to the wrong 
> database.
>
> Does anybody have know how to solve this issue?
>
>
> -- 
> Gràcies,
>
> Rubén
>  

-- 
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/90836d99-1f51-4a79-a7f1-6f968e42fe3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to