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

manage.py syncbd not syncing django.contrib apps

This is probably a setting error somewhere. I have a django app that works fine on my desktop with the developer server and sqlite3. I upload it to my server and syncdb and it only syncs my custom apps to my database, not the django.contrib apps.…
lovefaithswing
  • 1,510
  • 1
  • 21
  • 37
0
votes
1 answer

if I change the attributes of model, should I do syncdb in django?

I made a minor change to my model. I have south installed and has done the initial migration before. from: class Text(models.Model): title = models.CharField(max_length=20, verbose_name="posting title") To: class Text(models.Model): …
eagertoLearn
  • 9,772
  • 23
  • 80
  • 122
0
votes
2 answers

syncdb error in django when trying to run python manage.py syncdb

Im Following a django tutorial but I triple checked everything and its no working for me this is what I get.... what did I do wrong. python manage.py syncdb Traceback (most recent call last): File "manage.py", line 10, in
Juanto85
  • 33
  • 2
  • 10
0
votes
2 answers

Django post_save hook causing an error for syncdb

I have a custom model with a OneToOne relationship with the User (django.contrib.auth.models.User) model; class Profile(models.Model): user = models.OneToOneField(User) And I want to create a new Profile every time a User is created. So I've…
Kevin
  • 1,113
  • 3
  • 12
  • 26
0
votes
1 answer

Django 1.5.4 syncdb not creating some fields in PostgreSQL 9.1/PostGIS 2 tables

I have a Django model like this: class Company(models.Model): name=models.CharField(max_length=256, default=''), user=models.ForeignKey(User), logo=models.ImageField(upload_to='logos') def __unicode__(self): return…
Jorge Arévalo
  • 2,858
  • 5
  • 36
  • 44
0
votes
0 answers

Superuser didn't work

I want to create a super user to log into the admin panel, I use to do this command: python manage.py createsuperuser I do not use ./manage.py syncdb (I use the South). After creating a super user, I go to the address /admin/ and enter the data you…
Mariusz
  • 177
  • 1
  • 4
  • 11
0
votes
1 answer

Django, MySQL, syncdb: Access Denied to valid user

I have a Django application that is running just fine on two other servers. It is using MySQL as the database. I have the user setup for a new instance of the application on a new server so that I can successfully connection via the mysql command…
chadgh
  • 9,063
  • 8
  • 38
  • 54
0
votes
2 answers

How to make syncdb show full stack trace

I have been trying for the last many hours to trace the source of an error AttributeError: 'Options' object has no attribute 'model_name' I am getting it while trying to run syncdb or migrations. My installed apps consist of : INSTALLED_APPS =…
Bwire
  • 1,181
  • 1
  • 14
  • 25
0
votes
2 answers

What does this error mean: The model User has two manually-defined m2m relations

I'm running into this error when I attempt to syncdb: auth.user: The model User has two manually-defined m2m relations through the model FavoriteQuestion, which is not permitted. Please consider using an extra field on your intermediary model…
BryanWheelock
  • 12,146
  • 18
  • 64
  • 109
0
votes
1 answer

heroku run python manage.py syncdb: timeout error

when i'm running "heroku run python manage.py syncdb" in terminal i get error Running `python manage.py syncdb` attached to terminal... up, run.4140 ! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a…
Sarvesh Gupta
  • 59
  • 1
  • 9
0
votes
1 answer

django referencing models before syncdb

I have an actions.py file which defines custom actions for the admin page for one of my models. It uses an intermediary page (like the default delete action) and hence has a corresponding form which is also declared in the same file. For some…
vinayakshukl
  • 313
  • 3
  • 17
0
votes
1 answer

Django - how to run syncdb after 'south' is an installed app?

I added south in my installed apps so that I can do schemamigrations. I then added django.contrib.admin and django.contrib.flatpages to the installed apps. Now, normally I would just do python manage.py syncdb but is that the correct way to do it…
SilentDev
  • 20,997
  • 28
  • 111
  • 214
0
votes
1 answer

How can I tell Django to include tables for my models on a syncdb?

I suspect that I have not imported my models into some place they need to be reported for a syncdb to pick them up. Where do I need to import my models.py (or otherwise register my models) so that Django will include them on a syncdb? In models.py,…
Christos Hayward
  • 5,777
  • 17
  • 58
  • 113
0
votes
1 answer

Deploy hook for django syncdb not working on openshift

I created a django app on openshift successfully. But, I'm not able to run syncdb using the following deploy hook. #!/bin/bash source $OPENSHIFT_HOMEDIR/python/virtenv/bin/activate cd $OPENSHIFT_REPO_DIR/wsgi/$OPENSHIFT_APP_NAME python manage.py…
Amanpreet Singh
  • 178
  • 1
  • 9
0
votes
1 answer

Django Please enter either "yes" or "no" not taking answer

I've just downloaded Django for a school project and our teacher wants us to do the tutorials on their website. I'm following through tutorial 1 and when I call syncdb it creates the admin database. It asks me if I want to create a superuser and I…
Joe Jankowiak
  • 1,059
  • 12
  • 37
1 2 3
8
9