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
2 answers

Unable to create tables for django-social-auth on google app engine(GAE)

I have spent lots for time to resolve this issue but couldn't success. Still i am stuck here. As i have deployed a django project on GAE(Google App Engine) using django-deployer and i am implementing django-social-auth in my django project. Here is…
CrazyGeek
  • 3,397
  • 2
  • 24
  • 38
0
votes
4 answers

django select app(s) for syncdb

First of all: please don't ask me: "Why would you need this?". Now the question itself: I have several applications installed in INSTALLED_APPS. Database is now empty and I want to synchronise only some of apps. What's the simplest way to do this? I…
mnowotka
  • 16,430
  • 18
  • 88
  • 134
0
votes
1 answer

Django syncdb doesn't work after invoking inspectdb

I created a model from an existing PostgreSql database using inspectdb, when I try to do a syncdb,in order to generate the authorization tables, it generates the following error: CommandError: One or more models did not validate: db.t1: "ip":…
xplorer00
  • 91
  • 1
  • 4
  • 12
0
votes
1 answer

Relationship between models, by name, fails on syncdb

I have the 2 following models, and I'd like to link them with a ManyToMany relationship : www/hruser/models.py from django.db import models class HRuser(models.Model): """Custom user class.""" email = models.EmailField(max_length=60,…
0
votes
2 answers

Django: How to create a model from a definition in another module

Lets say I have this Django setup: appA - models.py - views.py - etc... global - models.py What I want is import the models from global.models in appA.models so that they are treated as a normal appA models by syncdb and…
RickyA
  • 15,465
  • 5
  • 71
  • 95
0
votes
2 answers

with ./mange.py syncdb getting permission denied in django project

root@domU-xx-xx-39-04-x5-36:/opt/sana# ./manage.py syncdb -bash: ./manage.py: Permission denied I tried both django.db.backends.mysql and mysql for 'ENGINE' I am able to connect to root using mysql -u root -p My settings.py file is correct My…
madhu131313
  • 7,003
  • 7
  • 40
  • 53
0
votes
3 answers

Django project - can not sync data tables - syncdb (error: no module named XYZ)

I am following a tutorial on Django which is basically a series of short todos that lead to the building of a web application to manage bookmarks. So far I've: - installed Django 1.4.2 properly - created the project and its folders (be low my…
Sylvain
  • 553
  • 3
  • 14
  • 26
0
votes
1 answer

django 'no such table' when syncdb

Here's my model: class BaseModelTalk(models.Model): name = models.CharField('Name', max_length = 100) slug = models.SlugField('Slug', blank = True) creator = models.ForeignKey('person.Person') …
Otskimanot Sqilal
  • 2,332
  • 4
  • 21
  • 25
0
votes
2 answers

django syncdb does not appear to run my custom hook

I have some existing SQL statements that I'd like to use as a custom hook after the CREATE TABLE command, in [myapp]/sql/[model-name].sql. My app is in INSTALLED_APPS. I see listed if I run ./manage.py sql. My custom hook is found; I see the SQL…
Rudi Sherry
  • 123
  • 1
  • 5
0
votes
1 answer

Django syncdb doesn't create db tables

I've been troubleshooting this error with no luck. TemplateSyntaxError at /signup/ Caught DatabaseError while rendering: relation "signup_product" does not exist LINE 1: ..."duration", "signup_product"."duration_type" FROM "signup_pr... What I've…
Anthony Roberts
  • 1,971
  • 1
  • 19
  • 34
0
votes
2 answers

Drop and recreate old tables in Django

I'm in the initial phase of development, and the models are changing around quite a lot. I have to keep dropping the old tables and then performing a "syncdb" While I appreciate the reason why syncdb does not alter the old tables, Is it possible (or…
Samudra
  • 1,013
  • 1
  • 14
  • 21
-1
votes
1 answer

Django NodeNotFoundError during syncdb

Hi I have developed my project in a local machine but when I have transferred it for production into a server, I am getting following error: python manage.py syncdb Traceback (most recent call last): File "manage.py", line 10, in…
Paul85
  • 647
  • 1
  • 11
  • 27
-1
votes
2 answers

Django syncdb cannot find postgres View for ForeignKey relation

I'm trying to create a ForeignKey relation to a postgres view. This was originally working with a different model but now that I've created a second one it seems unable to create the new table. The error I'm given is: DatabaseError: referenced…
1 2 3
8
9