Multiple Database Setup problem !?

2018-10-30 Thread David Lubomirov
Hello, In my project I have 3 applications, and I'm trying to split them across 2 databases. More specifically 2 of the apps and Django "auth" application should work with the first database, and the last application should remain in the second database. These are

Re: Heroku database migration

2020-07-19 Thread Joakim Hove
bash% heroku run python. /manage.py migrate søn. 19. jul. 2020, 18:48 skrev Aman Mandloi : > Added a small model 'new_model' in existing app 'existing_app' on Django, > Entered commands manage.py makemigrations and manage.py migrate it > migrated changes to local da

Re: Heroku database migration

2020-07-19 Thread Heet Gupta
ate" On Sunday, July 19, 2020 at 10:18:18 PM UTC+5:30, Aman Mandloi wrote: > > Added a small model 'new_model' in existing app 'existing_app' on Django, > Entered commands manage.py makemigrations and manage.py migrate it > migrated changes to local database

Re: Heroku database migration

2020-07-19 Thread Ayser shuhaib
terminal run "python manage.py migrate" > > > On Sunday, July 19, 2020 at 10:18:18 PM UTC+5:30, Aman Mandloi wrote: >> >> Added a small model 'new_model' in existing app 'existing_app' on Django, >> Entered commands manage.py makemigrations and

Re: Heroku database migration

2020-07-20 Thread John McClain
e.py migrate it > migrated changes to local database. > Tried to apply same on heroku but its not working there. I then tried to > setup heroku database in local settings.py of project and migrations worked > but it shown some well known error, I have attached the output with this > discu

Re: Heroku database migration

2020-07-20 Thread Karan Sahu
x27; in existing app 'existing_app' on Django, >> Entered commands manage.py makemigrations and manage.py migrate it >> migrated changes to local database. >> Tried to apply same on heroku but its not working there. I then tried to >> setup heroku database in local se

Fetching data from database

2020-10-28 Thread Kiran Bangde
Hi everyone, Iam stuck at a point ...I want to fetch a data from a database , where data should be insert manually , plz help me how to do that how to fire a queries in DB and how to use primary key and foreign key over here. Please help me ,Iam new to Django . Thanks in advance -- You

Re: Migration of database

2020-12-14 Thread Omkar Parab
Check out this video. 👇 https://youtu.be/6DI_7Zja8Zc On Tue, Dec 15, 2020, 12:09 PM Dhruvil Shah wrote: > I have already made my project in Django and used built-in database Sqlite > and now I want it in production on heroku so how can I switch all data from > Sqlite database to P

Re: Migration of database

2020-12-15 Thread Alessandro Madruga Correia
Em ter., 15 de dez. de 2020 às 03:40, Dhruvil Shah escreveu: > I have already made my project in Django and used built-in database Sqlite > and now I want it in production on heroku so how can I switch all data from > Sqlite database to Postgresql database? > > In the source

Re: Migration of database

2020-12-15 Thread sakshi jain
help me On Tue, Dec 15, 2020, 12:15 Omkar Parab wrote: > Check out this video. 👇 > https://youtu.be/6DI_7Zja8Zc > > On Tue, Dec 15, 2020, 12:09 PM Dhruvil Shah wrote: > >> I have already made my project in Django and used built-in database >> Sqlite and now I want

Re: Migration of database

2020-12-15 Thread Kasper Laudrup
On 15/12/2020 07.50, sakshi jain wrote: help me Hopefully you can find the relevant contact information for your country of origin here: https://togetherweare-strong.tumblr.com/helpline Best of luck with your issues, whatever they are. Kind regards, Kasper Laudrup -- You received this m

Update value in database

2019-12-19 Thread Nuno Vieira
Hi! I have a real estate django app and i have a form to users insert a new property. I also have in the form several images fields that users can use to upload images to database whitout problem. The problem is if the *user want to delete one of the images field.* I have an ajax request that

send data to database

2019-12-24 Thread Leó Horváth
Hi guys, I want to create a form with radio buttons that sends data to a specific database field. How can I do it? My models.py looks like this: import datetime from django.db import models from django.utils import timezone # Create your models here. class Name(models.Model): user_name

Re: Database migration issue

2020-04-12 Thread wanbao jin
> > When I just change the api.blogs.apps.BlogsConfig to api.blogs , it > worked fine. I am curious why api.blogs.apps.BlogsConfig doesn't work > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rec

Re: Database migration issue

2020-04-12 Thread wanbao jin
Ok, I figure it out, When application configuration class is used in INSTALLED_APPS, the name field of AppConfig subclass should be the path of that application. AppConfig.name¶ > > Full > Python path to the applic

database is not working

2020-04-27 Thread Balkrishana Gaur
Dear friends as per django project app mysite/polls After creationnof the database 1st entry was " whats new? ". When i login to the admin site than only question object is available. What can i do. -- You received this message because you are subscribed to the Google Groups &qu

Re: Deciding on Database

2020-06-04 Thread RLM
with different chapters and sections. And the right side will be the content. What I am trying to figure out is instead of doing a hardcoded HTML css static file, use the database to create a html file . What do you think is the best way to go about ir. I thought about it a lot and the problems

Re: Deciding on Database

2020-06-06 Thread Alexander Alemayhu
like you don’t really need a database but rather a content management system for easily writing / editing the documentation. Useful links https://www.staticgen.com https://headlesscms.org On Fri, 5 Jun 2020 at 02:00, RLM wrote: > Hello > > I am a 25 year python dev working with Flask a

Nosql database for Django

2019-03-29 Thread Balkesh Choudhary
I want to use a Nosql database for Django, and it is officially not supported by Django, is there any way? -- 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

How to Update Database

2019-04-26 Thread Aayush Bhattarai
How can I update database. I am not using forms.py and I am using function based view. Can you how example and link for docs. Thanks for help. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Django App - Database connection

2019-06-14 Thread Sapna Dhage
Hello, I'm implementing Django application using PostgreSQL. However, I'm not able to configure database connection string. Any idea how do I configure database connection and where should I mention database connection string? Thank you, Sapna -- You received this message becau

Relation between different database?

2019-09-09 Thread ANi
Hi, I have my asset table in local db which need to reference to the employee view from another database. But I realized that Django might not allow relations across databases, right? so does it means that I can only store the employee key as string in the asset table? or other way to

Database ORM query Help

2019-10-25 Thread Cheda me
Hey guys, I have worked out the SQL query I would like to implement but am currently struggling to create the Django query. I have been attempting to use the .aggregate() & Max() methods but cant seem to get the right result. Any help is much appropriated. SELECT temp.* FROM item_detail temp I

Re: Multiple Database Setup

2019-10-30 Thread DANIEL URBANO DE LA RUA
https://docs.djangoproject.com/en/2.2/topics/db/multi-db/ On Wed, 30 Oct 2019, 14:39 Rajat Chopra, wrote: > I wish to create a project with 2 apps. Each app will have its own > database - one for payments and another for statements. > > I have created a set of models within the m

image storing to database

2021-07-08 Thread Aniket Gadge
my project is to store the images to database after classified them but when i process it storethe images first time in folder but second time it not store thedata to data base model.py class Addhars(models.Model): name = models.CharField(max_length=64) images = models.ImageField

MSSQL server database question

2021-10-14 Thread hebers
Greetings. I was given a task of creating a django app that will use a database. However, I am not given admin rights to create a database on MSSQL Server, and I can only create tables inside an assigned database with existing tables. I have tried migrations on an existing database (py

Remote database using ssh

2022-07-19 Thread Wennie Catabay
Hello, I am stuck on defining how to connect a remote database from another server using ssh. I am able to connect the remote database with putty using ssh, but but I don't know how to apply it in django. Thank you. -- You received this message because you are subscribed to the Google G

Re: database design approach

2023-02-01 Thread vamsikrishna Aliveli
> I am designing a database for a django project. I already read this > tutorial that I found really useful: > https://learndjango.com/tutorials/database-design-tutorial-beginners > > I have a question regarding the normalization. The normalization is > important due that we need to reduc

Select Boxes and Database

2023-12-02 Thread David Merrick
Hi. I can put an item from the database into a select box ie Countries of the World. What I want to know is saying, having chosen New Zealand from the select box, how do I display all the cities of New Zealand in another select box. The database has two tables. First one is Countries. The second

Python Database Migration Tool

2024-02-29 Thread sebasti...@gmail.com
Hey, i have 2 different database systems. In source postgresql and target MS SQL. Now i have on source DBMS a database with a complete different schema like in target DBMS. Now i search a solution where i can connect to different DBMS Systems and can make a mapping between different source

Re: Multiple Database problem

2024-08-14 Thread Muhammad Juwaini Abdul Rahman
This is the first Google result for "django multiple databases": https://docs.djangoproject.com/en/5.0/topics/db/multi-db/ On Wed, 14 Aug 2024 at 23:15, Dhanushpathi Prakash < dhanushpathiprak...@gmail.com> wrote: > Is there is possible to multiple database with a single app

Re: Multiple Database problem

2024-08-18 Thread suraj shaw
Yes, Its possible. Please follow this - https://docs.djangoproject.com/en/5.0/topics/db/multi-db/ Thanks Suraj On Wed, Aug 14, 2024 at 8:45 PM Dhanushpathi Prakash < dhanushpathiprak...@gmail.com> wrote: > Is there is possible to multiple database with a single app. How? > > --

Re: Multiple Database problem

2024-08-18 Thread Pandiya rajan
To effectively use multiple databases within a single application, start by configuring multiple connection strings or configuration entries for each database. Next, implement a data access layer to handle interactions with the different databases through a unified interface. This layer

Re: Installing Database for creation of database driven Web-application using Django

2014-05-05 Thread Jorge Andrés Vergara Ebratt
development . > Can anyone guide me from scratch how to install database for that, so I > can create database tables & execute queries on it? > I have installed Django framework & its verision is 1.4. > > Thanks in advance. > Neeta > > -- > You received this m

Re: Installing Database for creation of database driven Web-application using Django

2014-05-05 Thread Gelli Ravikumar
Hi Neeta, Here is the very basic youtube tutorial for django creation, installation and database: Django Basics - Part 1 of 4 - Installing and Setting up Django<https://www.youtube.com/watch?v=ZgfGdRYVXjw>. I hope this will clears your problem, if not yet revert back your issues. On

Re: How to migrate old database into new database using python script

2018-10-11 Thread Mohammad Shareef M
Create new database and Restore the backup file Thanks & Regards, Mahammad Shareef M +919741482617 +971501340618 +971581756035 On Thu, Oct 11, 2018 at 4:01 PM Mohammad Aqib wrote: > Hi All, > I have a task to migrate all data into a new database using "backup.sql" >

Re: How to migrate old database into new database using python script

2018-10-11 Thread Ryan Gedwill
Depending on the SQL distribution you're using, there should be a couple tools to do this without python using a CLI command or a basic SQL script. If you need to do it in python, use a basic python library (again, depends on your sql distribution) to connect to your database and execute th

Re: How to migrate old database into new database using python script

2018-10-11 Thread Mohammad Aqib
a basic SQL script. > > If you need to do it in python, use a basic python library (again, depends > on your sql distribution) to connect to your database and execute the SQL > command to execute the file. > > I only remember how to do this in postgres specifically, but you happen t

Re: How to migrate old database into new database using python script

2018-10-11 Thread carlos
or a basic SQL script. >> >> If you need to do it in python, use a basic python library (again, >> depends on your sql distribution) to connect to your database and execute >> the SQL command to execute the file. >> >> I only remember how to do this in postgres

Re: How to migrate old database into new database using python script

2018-10-11 Thread Joel Mathew
a basic python library (again, >> depends on your sql distribution) to connect to your database and execute >> the SQL command to execute the file. >> >> I only remember how to do this in postgres specifically, but you happen >> to be using postgres as well, I can help fu

How can i populate app engine(production environment) database with local sdk database

2010-03-30 Thread Eximius
Hi all, I have created a django application using app engine sdk, and have stored data in database using forms. But the problem i am getting when i deploy it, the data I stored is not there in the app engine datastore. So how can i populate app engine database with local database/data and also

Copy all the data from an existing database when create the testing database.

2013-10-04 Thread Tianyi Wang
Hi, When I run my tests, I'd like it to copy an existing database with all the data when create the testing database. I never thought about this till one of my colleague uses POSTGIS_TEMPLATE = DATABASES['default']['NAME'] for his tests. Because we use GeoD

Custom SQL or database API?

2008-09-02 Thread janedenone
FROM pages, pages AS motherpages WHERE motherpages.page_id = pages.mother_id AND pages.author_id = 1234 AND pages.author_id <> motherpages.author_id Is it possible to do this with the Django database API, or do I need to retreat to custom SQL? Kind regard

Re: Upload images to database

2008-09-08 Thread nsash
Yes, I need to store them in database. I need to do this from the django admin. Do I have to make a custom field in the model? Or additional field in the database which is blob type? How can I override the save method , so that the image to be uploaded in the database, not in the file system? On

Re: Upload images to database

2008-09-08 Thread Erik Allik
I've been kinda wanting the same thing. I think you could implement a DbImageField and a database file storage back end. Keep us in touch, I'm interested. Erik On 08.09.2008, at 12:08, nsash wrote: > > How can I upload an image in the database? As it is now , in database

Re: Upload images to database

2008-09-08 Thread Ludwig
/sorl-thumbnail/), which gives you a lot of the power of the Python Imaging Library within a template tag, while leaving your image data on the file-system. Ludwig 2008/9/8 nsash <[EMAIL PROTECTED]> > > How can I upload an image in the database? As it is now , in database > is

Re: Upload images to database

2008-09-08 Thread Erik Allik
Since you're asking about the need, let me bring you an example: (images and documents are both just files so we can discuss storing files in the database not just images) I have a bunch of documents that my customer can upload through the admin interface. He can then assign read permis

Re: Upload images to database

2008-09-08 Thread Ludwig
; Since you're asking about the need, let me bring you an example: > (images and documents are both just files so we can discuss storing files > in the database not just images) > > I have a bunch of documents that my customer can upload through the admin > interface. He can t

TestClient with no Django Database

2008-09-11 Thread Denali Lumma
Hi There, I am trying to use the TestClient class to validate some of our pages. It seems to work OK for pages which don't require authentication. I am aware of the test database which is created and used in the TestClient run, however, we have a special set up here. We are not usin

Storage of files in database

2008-10-07 Thread Mariana Romão
Hi, I'm new in the group and in the use of Dajngo too. I'm developing an application that needs storage files ".py" in database (and maybe other types of files). I thought Django did this "automatically" when I define the field in the model as FileField, but I rea

Can I connect mysql database ?

2008-10-11 Thread Hingarajiya,Ravi
Hi All I am using Jython interpreter for Django Web Framework. Anybody know that how to connect mysql database with Jython interpreter for Django Application ? Ravi Hingarajiya. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

database API from external tools?

2008-10-24 Thread Andrew Chapman
jango database API seems great, but I can only easily run it on the web app server. My question is how to package up and deploy the Django python code for external tools to access the database? I'm hoping to have the Django app sitting on the web server, with the source tree inaccessible

Re: fetching images from database

2008-10-31 Thread Marcelo Ramos
On Fri, Oct 31, 2008 at 4:06 AM, please smile <[EMAIL PROTECTED]> wrote: > Hi All, > > I have uploaded some images in a folder and also saved the image name > into data base table. > Now I need to fetch and display all the images to my client side web page . > How can I do this .Please help. >

Pagination of non-Django database

2008-11-26 Thread huw_at1
Hey all, A small part of my framework queries a non-Django db due to it being a legacy db with primary keys already in use. My question is is there a recognised way of applying pagination to non-Django db objects such that I can paginate the sql select query on this database? Many thanks

Re: Database model fields question

2008-12-01 Thread Daniel Roseman
bl(models.Model) >     ip_field = models.IntegerField(  what do i do here? ) > > Anyone have an idea? > > Thanks! > -sned AFAIK you can't easily define custom SQL to be used when getting a field from the database. One approach might be to create a custom model field[1], and overrid

Re: Database model fields question

2008-12-02 Thread sned
hon(self, value): return socket.inet_ntoa(struct.pack('!L', value)) class tbl(models.Model) ip_field = ipfield() Note that this only deals with pulling data from the database, I don't need to worry about putting data in. Thanks! -Sned On Dec 1, 11:44 am, Daniel Roseman <[EM

unable to open database file

2008-12-04 Thread gaz
Hi I am trying to run Django Questionaire (http://djangoquest.aperte- it.com/) on Apache with mod_python using SQlite on Windows 2003. When I try to log in I get the unable to open database file error. I saw a number of posts mention that the parent directory should be writable and it is. Here

Re: django and database views

2009-01-05 Thread Russell Keith-Magee
On Mon, Jan 5, 2009 at 11:31 PM, drakkan wrote: > > Hi all, > > I mapped a database view in django model as a normal database table, ... > there is a know workaround for this? any way to declare read only the > model? In short, no. Django doesn't currently provide any sup

Re: django and database views

2009-01-05 Thread drakkan
On 6 Gen, 00:06, "Russell Keith-Magee" wrote: > On Mon, Jan 5, 2009 at 11:31 PM, drakkan wrote: > > > Hi all, > > > I mapped a database view in django model as a normal database table, > ... > > there is a know workaround for this? any way to declare r

Re: django and database views

2009-01-05 Thread Russell Keith-Magee
On Tue, Jan 6, 2009 at 8:11 AM, drakkan wrote: > > > > On 6 Gen, 00:06, "Russell Keith-Magee" wrote: >> On Mon, Jan 5, 2009 at 11:31 PM, drakkan wrote: >> >> > Hi all, >> >> > I mapped a database view in django model as a normal datab

Re: django and database views

2009-01-05 Thread Malcolm Tredinnick
On Mon, 2009-01-05 at 06:31 -0800, drakkan wrote: > however if i delete an user with records associated in the view I have > this error: > > NotSupportedError: cannot delete from a view > HINT: You need an unconditional ON DELETE DO INSTEAD rule. > > django try to delete record from the view a

Re: django and database views

2009-01-05 Thread drakkan
er table; the user is referenced as foreign key in the view and the delete cascade django default try to delete all the reference, I need a foreign key like in the view to write code such as: databaseview.user.username so I can use select_related and get all needed database object with only one query (

Re: django and database views

2009-01-05 Thread drakkan
model, so if it hurts when you do that, just don't do it. > > Malcolm, I try to delete an user from the auth_user table; the user is > referenced as foreign key in the view and the delete cascade django > default try to delete all the reference, > > I need a foreign key like in the

Iterate over model database fields

2009-01-08 Thread Matias Surdi
Is there any way to iterate over all the fields in a model instance on a template? I'd like to have a "default" template which iterates over whatever model yo give it and prints all its field on a table. Any help will be appreciated. --~--~-~--~~~---~--~~ You

Re: django caching database object

2009-01-16 Thread Malcolm Tredinnick
form. For example, a common mistake is to populate a choices list in a module-level form class via a database query, so the query is only run once, at import time. Please post a short fragment of the code showing how/where you are creating the form and

Re: django caching database object

2009-01-20 Thread Dheeraj Irukulla
ne of about half a dozen other things. > > How are you constructing the form? In particular, *where* are you > constructing the form. For example, a common mistake is to populate a > choices list in a module-level form class via a database query, so the > query is only run on

Re: django caching database object

2009-01-20 Thread Derek Payton
> > > When a user adds to the client list (via another django app), the > > > 'client' select box isn't updated with the new value(s) the next time > > > it is loaded.  This sounds like a caching issue. > > > Or one of about half a dozen other th

Re: django caching database object

2009-01-20 Thread Dheeraj Irukulla
o the client list (via another django app), the > > > > 'client' select box isn't updated with the new value(s) the next time > > > > it is loaded. This sounds like a caching issue. > > > > > Or one of about h

Re: django caching database object

2009-01-20 Thread Malcolm Tredinnick
On Tue, 2009-01-20 at 11:00 -0800, Derek Payton wrote: > The issue is that CLIENT_CHOICES is only evaluated once, when the > server is started an all the code is loaded into memory. Try wrapping > it all in a function, thusly: > > def CLIENT_CHOICES() > choices = [ > ('', 'Select Clie

Re: django caching database object

2009-01-20 Thread Derek Payton
Malcom is absolutely right, apologies for sending untested code to the list. --Derek On Jan 20, 4:53 pm, Malcolm Tredinnick wrote: > On Tue, 2009-01-20 at 11:00 -0800, Derek Payton wrote: > > The issue is that CLIENT_CHOICES is only evaluated once, when the > > server is started an all the code

Re: move/change database type

2009-01-21 Thread joshuajonah
; > The thing is I have some data in the database from some beta users and > was hoping to take the data over with the move. > > I had planned on using db_dump.py which has worked in the past but > this time it wont work, I _think_ the problem is to do with the fact > that this t

Re: move/change database type

2009-01-21 Thread Alistair Marshall
On Jan 21, 7:54 pm, joshuajonah wrote: > A normal manage.py dump to fixture doesn't work? > I had missed that one, didn't know it was an option. my bad Thanks Alistair --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

pb synchronize database to django

2009-01-29 Thread arbi
Hi, I am a newb in Django and I find it very nice... But the current problem is that, when I try to synchronize my models (using python manage.py syncdb), an attribute that I changed did not change in my database. For instance : class Route (models.Model) : name=. attribute 2

models created from database table

2009-02-03 Thread Waruna de Silva
Hi, In Django is it possible to created models automatically from existing database. Thanks Waruna --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

getting database definition in line

2009-02-03 Thread Eric Abrahamsen
Hi there, I'm unable to do any testing -- my fixtures fail with a "Duplicate Entry" error when loading. From what I've googled, this might have something to do with a mismatch between my model definitions and the sql table definition. This fails on a model that I've done a lot of manual sql editi

Re: Better approach in Database?

2009-02-07 Thread Alex Gaynor
On Sat, Feb 7, 2009 at 11:14 AM, Guri wrote: > > Hi, >Its been now approx. 6 months I am working with Django and > I must say all issues that came my way were solved either by this or > that post, blog, tutorial. Support of Django is marvelous. > This time I am stuck with a d

Upload ZIP-File into Database

2009-02-08 Thread Robert
Dear Community, I have a ZIP-File which contains five .lst-Files. I want to fill with these five files a mysql-database. Is there a possibility to handle this via the admin interface? I tried the following but it doesn't work: from django import forms from django.contrib import admin

linking to files from database

2009-02-17 Thread Tonu Mikk
hoto' attribute has no file associated with it." Looking at the database, I see a photo and thumbnail columns, but there is no data. Do I need to write code to store a link to images in the photo and thumbnail columns? Thank you, --~--~-~--~~~---~--~--

Re: django and database views

2009-02-18 Thread will0
just had this problem and fixed it simply by adding a rule in the database: "create rule myrule as on delete to mytable do instead nothing;" Django still attempts to delete the record but the db (Postgres) just ignores it. http://www.postgresql.org/docs/8.1/static/rules-update.html Hence

Re: Database Model Layout Advice

2009-07-14 Thread Shawn Milochik
I think you'd just have the interview table without any foreign keys, then add a ManyToMany to each of your Author and Illustrator models. You would still, of course, be able to start with your interview table and get the authors or illustrators, if necessary in your app. It might be handy

Re: Database Model Layout Advice

2009-07-14 Thread The Danny Bos
So the Author and Illustrator tables would stay as is. How would the Interview table talk to both of those tables at once, to allow me to assign an interview to who I'm interviewing. Whether it's an Illustrator, Author or even down the track a Publisher. Like so? class Interview(models.Model):

Re: Database Model Layout Advice

2009-07-14 Thread Shawn Milochik
On Jul 14, 2009, at 9:23 AM, The Danny Bos wrote: > > > So the Author and Illustrator tables would stay as is. > How would the Interview table talk to both of those tables at once, to > allow me to assign an interview to who I'm interviewing. Whether it's > an Illustrator, Author or even down th

Re: Database Model Layout Advice

2009-07-14 Thread Jonathan Buchanan
2009/7/14 The Danny Bos : > > Hey there, this may not be appropriate, but I'm building in Django so > here goes ... > > I'm creating an Interviews app/table in my Django 'Books' (test) > project. Just wrapping my head around it before I start on my music > based website ... Anyway, > > For my 'Int

Re: Database Model Layout Advice

2009-07-14 Thread Shawn Milochik
On Jul 14, 2009, at 10:35 AM, Jonathan Buchanan wrote: > > One option would be to use a generic relation: > > http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1 > > Regards, > Jonathan. > > Yes, this is probably the right way to do it. I had heard about generic relation, but

Re: multiple projects shared database

2009-08-05 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There is no problem with that, as long as your code accounts for it. Luke luke.seelenbin...@gmail.com Robin Becker wrote: > My boss wants to have two different django controlled websites with a common > database. Is there a way to d

Re: multiple projects shared database

2009-08-05 Thread Malcolm Tredinnick
On Wed, 2009-08-05 at 17:59 +0100, Robin Becker wrote: > My boss wants to have two different django controlled websites with a common > database. Is there a way to do this? > > We are already running multiple websites into a single django project and > because they have a disa

Re: multiple projects shared database

2009-08-06 Thread Robin Becker
Malcolm Tredinnick wrote: > On Wed, 2009-08-05 at 17:59 +0100, Robin Becker wrote: >> My boss wants to have two different django controlled websites with a common >> database. Is there a way to do this? >> >> We are already running multiple websites into a single dja

Re: multiple projects shared database

2009-08-06 Thread derek
> > On the other hand, if the two websites are entirely independent, putting > > them into a single database is simply poor design. It's trivial to > > create a separate database and why not use the tools that are available > > instead of adding extra complexity

Re: multiple projects shared database

2009-08-06 Thread Robin Becker
derek wrote: > >>> On the other hand, if the two websites are entirely independent, putting >>> them into a single database is simply poor design. It's trivial to >>> create a separate database and why not use the tools that are available >>> instead

Master / Slave Database Replication Scenario

2009-08-16 Thread Haes
Hi, we are using master / slave database replication, no partitioning, just replicating the complete database to several slaves for performance reasons. This is making some problems with a newly developed Django project, which makes use of an existing database. Is there an (easy) way to use a

Database connection object in session

2009-03-04 Thread jai_python
Hi. Is it possible to add database connection object in session and handle in different views. Thanks in advance. Jayapal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Switching database backends at runtime?

2009-03-16 Thread Oliver Beattie
Does anyone know if it's possible to switch the database backend in Django at runtime (let's say I want to use dummy for something, but then switch it back to the original after I'm done). Is this possible using django.db.load_backend or something (I'm doubting it as I see

Re: Error creating test database

2009-04-02 Thread Adam N
eaving the existing table intact. This will duplicate data though - are these highly accessed tables? I think. -Adam On Apr 2, 9:23 am, "Andrew G." wrote: > I have a django app that is built against an existing database.  In > the database, there are a couple tables used as the many

Re: Error creating test database

2009-04-02 Thread Andrew G.
g table intact. This will duplicate data > though - are these highly accessed tables? > > I think. > > -Adam > > On Apr 2, 9:23 am, "Andrew G." wrote: > > > I have a django app that is built against an existing database.  In > > the database, there are a cou

Re: Error creating test database

2009-04-02 Thread Russell Keith-Magee
On Thu, Apr 2, 2009 at 9:23 PM, Andrew G. wrote: > > I have a django app that is built against an existing database.  In > the database, there are a couple tables used as the many-to-many > relation lookup table.  However, I have mapped models to the many-to- > many lookup table,

Re: Error creating test database

2009-04-03 Thread Andrew G.
The following code in a fresh project/app will cause the database creation to fail. class Position(models.Model): description = models.CharField(max_length=20, blank=True, null=True) parts = models.ManyToManyField('Part', db_table='part_positions') class PartP

Re: Error creating test database

2009-04-03 Thread Karen Tracey
On Fri, Apr 3, 2009 at 4:25 PM, Andrew G. wrote: > > The following code in a fresh project/app will cause the database > creation to fail. > > class Position(models.Model): >description = models.CharField(max_length=20, blank=True, > null=True) >parts = mode

Re: Database error in Django

2009-04-03 Thread Malcolm Tredinnick
or message here. There's nothing particularly obviously wrong with the code you've posted, so it's likely to be exactly the problem reported -- something being wrong with the database setup. Try executing the filter manually (using some superuser User) from the interactive prompt (&q

Re: Error creating test database

2009-04-06 Thread Andrew G.
Ahhh, that should solve my problem then. Thank you. I do however see a similar problem--if the PartPosition model is not defined, but both Part and Position specify to use the db_table part_positions, the database build still tries to create the table twice. On Apr 3, 4:52 pm, Karen Tracey

Re: Error creating test database

2009-04-06 Thread Andrew G.
fresh project/app will cause the database > > creation to fail. > > > class Position(models.Model): > >    description = models.CharField(max_length=20, blank=True, > > null=True) > >    parts = models.ManyToManyField('Part', db_table='part_position

<    5   6   7   8   9   10   11   12   13   14   >