python - Django: recreating tables -


let me further clarify i'm trying do. i've been developing django project on machine. checking code repository. developer, other developers join. checkout code repository , run on machine. in order simulate scenario, checked out code directory , created new database. updated settings.py checkout use new database. when syncdb recreate tables, error:

$ python -i manage.py syncdb databaseerror: (1146, "table 'testproj.auth_user' doesn't exist") traceback (most recent call last):   file "manage.py", line 13, in <module>     execute_from_command_line(sys.argv)   file "c:\users\jpp\documents\.virtualenvs\django-test\lib\site-packages\dja ngo\core\management\__init__.py", line 453, in execute_from_command_line     utility.execute()   file "c:\users\jpp\documents\.virtualenvs\django-test\lib\site-packages\dja ngo\core\management\__init__.py", line 392, in execute     self.fetch_command(subcommand).run_from_argv(self.argv)   file "c:\users\jpp\documents\.virtualenvs\django-test\lib\site-packages\dja ngo\core\management\base.py", line 230, in run_from_argv     sys.exit(1) systemexit: 1 

here's database settings phymyadmin:

user    host        type    privileges      grant   action root    localhost   global  privileges  yes     edit privileges 

and settings.py:

databases = {     'default': {         'engine': 'django.db.backends.mysql', # add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.         'name': 'testproj',             # or path database file if using sqlite3.         # following settings not used sqlite3:         'user': 'root',         'password': '****',         'host': '127.0.0.1',            # empty localhost through domain sockets or '127.0.0.1' localhost through tcp.         'port': '',                     # set empty string default.     } } 

here installed_apps:

installed_apps = (     'django.contrib.auth',     'django.contrib.contenttypes',     'django.contrib.sessions',     'django.contrib.sites',     'django.contrib.messages',     'django.contrib.staticfiles',     # uncomment next line enable admin:     # 'django.contrib.admin',     # uncomment next line enable admin documentation:     # 'django.contrib.admindocs',     'helloworld', ) 

therefore, suspect developer have same problem. scenario must have been addressed before, haven't been able put right words google yet.

you not need create test tables, django automatically

test db documentation.

you can use separate db testing if wish, add settings file. make sure db created django create tables itself.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -