3👍
✅
Add django.contrib.sites
in your INSTALLED_APPS and the run migrate command
python manage.py makemigrations
python manage.py migrate
Hope this helps you
8👍
Your sendEmails
module has a query at the top level: Site.objects.get_current()
. This is run when the module is imported, before migrations have had a chance to run.
You must not do any database actions at this level; put it into a method.
- [Django]-Django message once logged in
- [Django]-Django 1.4 – Keeping track of multiple queries and pagination
- [Django]-Changing settings for the tests in django (search engine for haystack to be specific)
- [Django]-Web Dev. Framework for RAD Web App Dev. in Shortest Time ( Yii vs. Django )
3👍
In this case some migrations are still pending so run python manage.py migrate
and python manage.py makemigrations app_name
1👍
Change "django.contrib.admin"
in INSTALLED_APPS
to "django.contrib.admin.apps.SimpleAdminConfig"
and then run makemigrations
command. after that you can revert your changes.
- [Django]-Best JSON library to get JSON data for Django?
- [Django]-Building pluggable apps: how to include forks of popular libraries and prevent name conflicts?
- [Django]-How to implement password change form in Django 1.9
0👍
python manage.py migrate
python manage.py makemigrations
Worked for me, had pending migrations.
Source:stackexchange.com