18👍
The problem is that you are using Django 1.8
while going through 1.6 tutorial. Pay attention to the first words at the beginning of the tutorial:
This tutorial is written for Django 1.6 and Python 2.x. If the Django
version doesn’t match, you can refer to the tutorial for your version
of Django by using the version switcher at the bottom right corner of
this page, or update Django to the newest version.
In your case, either downgrade to 1.6, or use the tutorial for the development (currently 1.8) version.
31👍
You can either run python manage.py makemigration
followed by python manage.py migrate
or just delete migrations folder
- Sphinx-apidoc on django build html failure on `django.core.exceptions.AppRegistryNotReady`
- Django migration relation does not exist
- Python + Django + VirtualEnv + Windows
- Display foreign key columns as link to detail object in Django admin
3👍
Simply delete folder app-name/migrations
.
In Django 1.7
and Python 3.4
the solution I found is to delete this folder and everything works now.
- What is the IP address of my heroku application
- Signing in leads to /accounts/profile/ in Django
- Setting up New Relic for Django development server
- How to filter objects by ignoring upper and lower case letter django
- Django saving json value to database/model
0👍
With django 1.7, instead of deleting app-name/migrations folder, In your MIGRATION_MODULES entry of your site, you can rename the application dictionary value with an non-existing module name by adding some dummy string:
MIGRATION_MODULES[‘my_app’] += ‘_xx’
And then manage.py sqlclear my_app works fine.
0👍
In Django 1.8, you should run another command–makemigrations [your app name]:
$ python manage.py makemigrations polls
You should see something similar to the following:
Migrations for 'polls':
0001_initial.py:
- Create model Question
- Create model Choice
- Add field question to choice
- Django override the form HTML label template?
- How to return data with 403 error in Django Rest Framework?