I just used userena to create user function and everything works fine except it gives this error when I try to log in at admin page, and I'm using django 1.9.7 and userena 2.0.1. I read some old posts and it says to remove 'django.contrib.sites' in INSTALLED_APPS, but userena wouldn't work if I remove it.
here's the error informations:
DoesNotExist at /admin/login/
Site matching query does not exist.
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/login/?next=/admin/
Django Version: 1.9.7
Exception Type: DoesNotExist
Exception Value:
Site matching query does not exist.
and the settings.py
...
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'polls',
'MessageBoard',
'userena',
'guardian',
'easy_thumbnails',
'accounts',
]
...
# email
EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
# required settings
ANONYMOUS_USER_ID = -1
AUTH_PROFILE_MODULE = 'accounts.MyProfile'
USER_SIGNIN_REDIRECT_URL = '/accounts/%(username)s/'
LOGIN_URL = '/accounts/signin/'
LOGOUT_URL = '/accounts/signout/'