Questions tagged [django-syncdb]

`django-admin.py syncdb` is a command which creates the database tables for all apps in `INSTALLED_APPS` whose tables have not already been created.

django-admin.py syncdb is a command which creates the database tables for all apps in INSTALLED_APPS whose tables have not already been created.

Use this command when you've added new applications to your project and want to install them in the database. This includes any apps shipped with Django that might be in INSTALLED_APPS by default.

Syncdb is not a database-migration tool, like south. Syncdb can install your models in the database, but it cannot alter your database after changes in existing models.

Reference:

133 questions
0
votes
1 answer

Sequence of model creation in Django

I have created a permission system in django. It is inside an App called HelperApp. First it inputs permissions definition into the database with post_syncdb signals(sender is the models of HelperApp, which does not contain any model classes), and…
Xun Yang
  • 4,209
  • 8
  • 39
  • 68
0
votes
2 answers

syncdb not adding fixtures in 3rd party project

I've written a pretty simple Django application called django-locality which takes the headache out of working with countries and territories. It provides a lot of initial data for countries and territories. I just the 0.1 release up to PyPI, and…
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
0
votes
1 answer

Adding ManyToMany field on the fly in django

I have created a model and done the "syncdb" operation. It was executed fine. Also I had inserted many records to that model, then I created one more model which needs to be connected as M2M for the previous model. Models.py class…
Nava
  • 6,276
  • 6
  • 44
  • 68
0
votes
3 answers

Problem running syncdb in django

I am trying to go through the django docs tutorial and having a problem syncing mysql. On the command python manage.py syncdb I get the following error (note I'm running in windows 7): ... File…
Daniel Nill
  • 5,539
  • 10
  • 45
  • 63
0
votes
1 answer

Django: application skipped in syncdb

I have several applications declared in settings.py: INSTALLED_APPS =…
Don
  • 16,928
  • 12
  • 63
  • 101
0
votes
1 answer

how to use manage.py syncdb outside of Django project, such as in Tornado?

I was looking through http://lincolnloop.com/blog/2009/sep/15/using-django-inside-tornado-web-server/ and I thought it was interesting and useful to use parts of Django if we need it in Tornado. Based on the setup in…
DjangoRocks
  • 13,598
  • 7
  • 37
  • 52
0
votes
2 answers

Name error: Can not import [model name]

I am trying to link the model Post to the model Topic via a foreign key. When I run the makemigrations command, it raises an import error, and says that the name 'Topic' is not defined. What could be the cause of this? It certainly seems to be…
0
votes
1 answer

Syncdb not working - django cache issue

I've dropped all tables from my postgres db. Now, while running python manage.py syncdb I'm getting error that abc fields doesn't exist in xyz table. It's probably some sort of django cache issue. Error is of this…
randomuser
  • 1,201
  • 2
  • 10
  • 19
0
votes
1 answer

django: how to get list of apps that were not synced?

when you execute bin/django syncdb a list with all apps that have been and those that haven't been synced gets returned. Synced: > south > raven.contrib.django > django.contrib.staticfiles ... Not synced (use migrations): -…
LarsVegas
  • 6,522
  • 10
  • 43
  • 67
0
votes
0 answers

django.db.utils.Database error running manage.py syncdb in new project

I am running Django 1.4, Python 2.7 on Ubuntu 12.04. I started a new app and created a postgres 9.1 database for it. Entered the db details in settings.py and ran python manage.py syncdb. I included 'south' in installed apps then got the following…
kavini
  • 143
  • 2
  • 8
0
votes
1 answer

Django syncdb with local_settings - Graphite

I am trying to install graphite on a linux node in a automated fashion. Script that install the graphite, configure and start the services. Python 2.7 Django 1.5.12 One of the step to install graphite need ** manage.py syncdb ** Earlier I was…
Chucks
  • 899
  • 3
  • 13
  • 29
0
votes
2 answers

Django syncdb doesn't create tables from app

I am learning and it might be just stupid mistake, but syncdb and migrate creates all admin tables, but no my app tables so only Groups and Users works in admin panel. I see my models in admin panel, but when I try to enter them it gives me an error…
RaV
  • 1,029
  • 1
  • 9
  • 25
0
votes
1 answer

Data overwrite on syncdb in django

I had a django project "demo_project", I ran syncdb command and created tables and saved data. Then I took a copy of this project "demo_project_copy" and ran syncdb command. Now I can't login with previous data which was stored in database(error:…
ancho
  • 1,060
  • 16
  • 24
0
votes
1 answer

Tried to create DB with Django by mistake

So I read somewhere that Django doesn't create the DB in production on MySQL. It only created the tables and you have to create the DB in MySQL before you can do syncdb. However, I made the mistake of doing syncdb when the database with the name in…
maahd
  • 672
  • 2
  • 9
  • 30
0
votes
2 answers

table UserAndPlace_userprofile has no column named gender

While I save UserProfile into a database, there's an error "UserProfile has no column named gender error". Here's my models.py """ UserProfile : user information """ class UserProfile(models.Model): # User basic inherits : username,…
sogo
  • 351
  • 5
  • 20
1 2 3
8 9