Refers to an ability to interact with multiple databases in a django project
2
votes
1answer
14 views
Django Multiple DB, authenticating from NON default db
I have two DATABASES configured in my Django project:
default
reports
The reports database contains auth_user, but while authenticating the user, users are checked in the default database. How can ...
0
votes
1answer
20 views
Django: Handling an uploaded SQLite file
I'm working on a simple Django application in which the user upload a SQLite file; the data is read and added to the main database (PostgreSQL).
My idea is to use two databases, one for the main ...
0
votes
0answers
34 views
Alternative to multiple database router in Django?
I'm exploring the usage of multiple databases in a Django app I'm writing, and one thing popped out at me with the models.py file.
I generated my models.py by using the inspectdb command, and its ...
2
votes
1answer
49 views
Using Django to extract results from SQL (multiple db's)
If anyone can think of a more appropriate title for this question then I am all ears.
I've inherited an sql script that gathers information for a report from 3 databases, using a lot of #temporary ...
0
votes
1answer
31 views
Django inspectdb on fails on table's foreign key which refs a table outside the current database (MySQL 5.0)
I tested with Python 2.6 or 2.7 with Django 1.5.1. My database is on MySQL 5.0. I've created the settings but now I can't run "inspectdb" on the database. I get
DatabaseError: (1146, "Table ...
1
vote
1answer
54 views
How can I seperate reads and writes with a multi-db setup with django & postgresql?
as some of you are aware Django has multi-db support. This can be achieved by writing a dbrouter to send writes to the master database and all the reads to the slave, but as stated on the Django Docs ...
0
votes
1answer
421 views
master slave postgresql with logging and monitoring for a django application
I have a django application running.
The database backend that i use for it is PostGreSql.
Everything is working fine for me.
Now I want to create a master slave replication for my database, such ...
0
votes
1answer
50 views
django sync db to get two apps in two databases
I'm not sure how it works but I need two different models/apps in separated databases. So if I try syncdb --database db1 will get all installed apps into db1. So question is how to get just one app in ...
0
votes
0answers
65 views
“View on site” button in djang-admin for model stored in non-default database
I have two databases in my project:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'default_db',
...
},
'games_db': {
'ENGINE': ...
0
votes
0answers
47 views
User models conflict while using some shared django apps
I have two django projects which both uses the django.contrib.auth.models.User model.
My two projects have :
Separate databases db1 and db2 (more meaningful names in real world)
Some apps are ...
0
votes
0answers
33 views
Passing ImageField between 2 django projects
I have 2 django projects which have some common tables.
to be able to access one of these tables from one of the projects, I'm using database routing => Problem solved for the database communication.
...
0
votes
1answer
79 views
django is_valid() throws database error
My is_valid() function throws a database error. Am making use of a an alias database(not the default one) and hence am not able to validate my form. My Application table is in database2.
Code:
...
4
votes
1answer
484 views
django multi db routing doesnt work with multiple schemas
I have django running on oracle backend. I need to use two schemas - one for a legacy DB, second one for all django related tables.
So this is my settings.DATABASES:
APPS_DB = 'apps'
DATABASES = {
...
1
vote
1answer
151 views
Django multi-db: Route all writes to multiple databases
I am currently sitting in front of a more specific problem which has to do with fail-over support / redundancy for a specific web site which will be hosted over @ WebFaction. Unfortunately replication ...
1
vote
1answer
899 views
django.db.utils.IntegrityError: (1062, “Duplicate entry '22-add_' for key 'content_type_id'”)
I am using django multiple DB router concepts, having multiple sites with different db's. Base database user will login with all other sub sites.
When i try syncdb in base site its worked ...
1
vote
2answers
150 views
Django project structure design for development [closed]
I need some design help for my concepts:-
My concept is mother page contain all the links like( forum, advertiser, classified's,etc) different categories. Based on the mother page registration the ...
1
vote
0answers
119 views
Single sign on multiple django project
In our business case there are three projects as follows:
ProjectA
ProjectB
ProjectC
ProjectA will contains the user registration, So if a user registed with ProjectA then he can access the ...
1
vote
1answer
514 views
Django syncdb trying to insert duplicate rows when multiple databases are specified
I'm in the process of configuring my Django app for multiple databases, and as a stop-gap measure, I'm using the following configuration in my settings.py:
READ_DATABASE = {
'ENGINE': ...
0
votes
1answer
170 views
Django: hint for isolating data among set of users
I want to build a Django application in which each "set of users" can see different data, as they were using different DBs. Is there any best practice to achieve this?
E.g.
user A, after logging, ...
0
votes
1answer
102 views
Configure Django to use a certain database only for write queries
We have this open source app we built with Django http://map.ninux.org/ which is used by our wireless community network and is hosted outside of our network with Hetzner in Nurimberg.
We'd like to ...
2
votes
1answer
473 views
Django using multiple databases
I have a model called FieldMap which is used throughout my project. I decided recently that the physical database for this model will exist on another machine (other than the default).
So I now have ...
12
votes
4answers
2k views
Is using multiple databases and South together possible?
My current project is getting extended with geographical stuff, so I'm trying to integrate GeoDjango and import some shapefiles for starters. My setup consists of the following:
MySQL 5.0 as ...
1
vote
1answer
583 views
Django testing of multi-db with automatic routing
Simple problem - I'm using multi-db successfully with automatic routing setup as documented on a legacy db (which are unmanaged). Now I want to test it. I've already set a testrunner to get around ...
1
vote
0answers
156 views
routing a manytomany table to a non-default db in django
I'm using django's multi-db support via database routers to partition certain models to 1 db, and others into another. (Note that whether I "should" be doing that is irrelevant to my question.) I ...
49
votes
5answers
2k views
How to work around lack of support for foreign keys across databases in Django
I know Django does not support foreign keys across multiple databases:
http://docs.djangoproject.com/en/1.3/topics/db/multi-db/#cross-database-relations
But I'm looking for a workaround.
What ...
0
votes
1answer
47 views
Django: Would object creation involving FK still work when the 2 tables involved are in different databases?
I have a Django model:
class Note(models.Model) :
text = models.TextField()
owner = models.ForeignKey(User)
If Note and User are located on different databases, would the
following ...
2
votes
1answer
437 views
Django multiple databases - can't connect to mysql server fallback to sqlite
I have a django applicaiton with multiple databases. The default database is on the local machine. There is also a remote mysql database which is used for some write operations, but it is not always ...
2
votes
3answers
948 views
Django multidb: write to multiple databases
With Django multidb, it's fairly easy to write a router that runs a master/slave infrastructure. But is it possible to write a router that writes to multiple databases? My use case is a collection of ...
1
vote
1answer
341 views
Will Django automatically switch to a slave if Multiple Databases are enabled and the master goes down?
I am a Django n00b and am looking at the "MasterSlaveRouter" example located in the Django docs:
http://docs.djangoproject.com/en/dev/topics/db/multi-db/
In the example, if the "master" were to go ...
0
votes
1answer
178 views
mutli django admins with different db databases in django 1.2 - strange problem
I am using django 1.2 to create a multi site shop. I need multiple admin logins for each shop instance, e.g.
site.com/au/admin
site.com/uk/admin
and so on.
I have a middleware class and a dbrouter ...