开发者

Django python help needed

I am trying to sync my DB but at time of sync it shows error to migrate my models.py containing folder on migrating it shows no fixtures found.

I have pasted the messages which it shows:

C:\election\trunk\election-server\geodjango>manage.py syncdb

Syncing...
No fixtures found.

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.messages
 > django.contrib.admin
 > django.contrib.gis
 > south
 > django_extensions

Not synced (use migrations):
 - india
(use ./manage.py migrate to migrate these)

And on migrating, it shows this message:

C:\election\trunk\election-server\geodjango>manage.py migrate
Running migrations for india:
- Nothing to migrate.
 - Loading initial data f开发者_开发技巧or india.
No fixtures found.

How do I solve this problem?


Your first paragraph is a little confusing to me. If I understand your question correctly, it sounds like something I ran into.

Initial data for a database is stored in the file initial_data.json by default. The migration messages you are getting indicate that you're using the django migration tool South. IF you do not have any initial data, you can tell South to ignore initial data with this command:

./manage.py migrate --no-initial-data

Does that help?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜