Questions tagged [django-database]

django-database refers to database backends that Django supports out of the box

refers to database backends that Django supports out of the box.

This tutorial help you to make application using mongodb database. enter link description here

664 questions
0
votes
1 answer

Problems with django deployment

Im trying to deploy my django and I always get one of these erros: (they alternate as I refresh the page) The model Page has already been registered ( its from feincms, but i dont get this on my computer ) unable to open database file (the database…
Victor
  • 247
  • 3
  • 13
0
votes
1 answer

Django v1.2 multi-db database debugging app?

anyone know if there's a django database debugging app which supports Django's multi-db API? I used to use django-debug-toolbar but it doesn't support multiple databases and the corresponding ticket is now open for 3 months. Are there any…
Haes
  • 12,891
  • 11
  • 46
  • 50
0
votes
1 answer

Mongoengine with Django 1.8: ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value

I started a new Django project, using Django 1.8. I need MongoDB as a database, so I used mongoengine. The relevant section of my settings.py file is below: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.dummy' } } from…
pkout
  • 6,430
  • 2
  • 45
  • 55
0
votes
0 answers

Django 1.8 database error deploying project on heroku

I have a local_settings.py that contains the database settings for my local postgre database. My settings.py database looks like this. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', …
WutWut
  • 1,204
  • 2
  • 17
  • 31
0
votes
0 answers

How to save id from another model using choicefield?

I have a ModelMultipleChoicefield and a queryset with another model. NamesModel contains only names and id ID_model contains only id of NamesModel class MyCreateForm(forms.ModelForm): my_id =…
HereHere
  • 734
  • 1
  • 7
  • 24
0
votes
1 answer

Django 1.8 migrating local postgres database into a heroku database

I've been stuck on this part for a while.After completing all the other steps when I enter git push heroku master, it pushes all the files but how do I migrate my local database? There are no commands for that. My settings.py file is still pointing…
WutWut
  • 1,204
  • 2
  • 17
  • 31
0
votes
1 answer

Django 1.8 postgresql database settings error while deploying on heroku

All the steps seem to be working fine but when I try to run heroku run python manage.py migrate it gives me an error saying Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?. I can't figure this part out. Do I…
WutWut
  • 1,204
  • 2
  • 17
  • 31
0
votes
2 answers

Django 1.8 psycopg2 import error

I have psycopg2 installed on my computer under C:\Python34\Lib\site-packages\psycopg2 If I use a postgresql database in a django project outside a virtual environment, I get no error.But, when I want to transfer the project to a virtual env so that…
WutWut
  • 1,204
  • 2
  • 17
  • 31
0
votes
2 answers

Django 1.8 error: No database fixture specified

I was using an sqlite database and after applying python manage.py dumpdata I added the new postgresql database settings in settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'music', …
WutWut
  • 1,204
  • 2
  • 17
  • 31
0
votes
0 answers

How to do two databases relationship ( OneToOneField )

if is not supported in Django? I read from Django documentaion: Django doesn’t currently provide any support for foreign key or many-to-many relationships spanning multiple databases. So I have two databases DB_1 and DB_2 DB_1: All inserts and…
HereHere
  • 734
  • 1
  • 7
  • 24
0
votes
0 answers

Can't save object using save() - AttributeError: 'DatabaseWrapper' object has no attribute 'Database'

I have this class and I'm trying to create object by using shell: class Task(models.Model): person = models.OneToOneField(Person) start_date = models.DateField(null=True) end_date = models.DateField(null=True) free_day =…
HereHere
  • 734
  • 1
  • 7
  • 24
0
votes
1 answer

Construct Django Query with dynamic complex AND + OR structure

I need to query MyField for a list of language:country tuples. ( The SQL I want would be: SELECT * FROM MyField WHERE language=my_tuples[0][0] AND country=my_tuples[0][1] OR language=my_tuples[1][0] AND country=my_tuples[1][1]…
David Schumann
  • 13,380
  • 9
  • 75
  • 96
0
votes
1 answer

Django - There was a decent size cascade delete, now how do I fix this?

In my Django web application, I had a user delete a few records that seemed safe to delete. Turns out they were connected via ForeignKeyField fields to a fairly large set of other, highly important records. I now know that I can manage how deletes…
Garfonzo
  • 3,876
  • 6
  • 43
  • 78
0
votes
1 answer

How to know where database has changed

I have a project that looks like a simple shopping site that sells different kinds of products. For example, I have 4 models: Brand, Product, Consignment. Consignment is linked to Product, and Product is linked to Brand. To reduce count of queries…
Andrew
  • 423
  • 1
  • 6
  • 16
0
votes
1 answer

Django Custom lookup running different SQL query than it's displaying in str(query)

Consider the following urls.py - for brevity, I decided to put the example in one file: from django.conf.urls import patterns, include, url from django.http import HttpResponse from django.db import models def x(request): class…
d33tah
  • 10,999
  • 13
  • 68
  • 158