0

django-registration-redux is not working. I have changed my settings to the following and run python manage.py migrate. I haven't got a clue why it hasn't done anything to the database, which is what is suggested in Page not found error?

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',  # manually added
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # third party apps
    'crispy_forms',
    'registration',  # django-registration-redux
    #  my apps
        'newsletter',
    )

# Django-registration-redux settings
ACCOUNT_ACTIVATION_DAYS = 7
REGISTRATION_AUTO_LOGIN = True

enter image description here

Curtis
  • 1,157
  • 4
  • 17
  • 30
  • are you add `url(r'^accounts/', include('registration.backends.default.urls')),` in `urls.py`? – Javier Clavero Apr 12 '16 at 12:39
  • without this, it wouldn't recognize accounts/ stuff, so yes this has been done! – Curtis Apr 12 '16 at 12:50
  • you're right, testing url `http://127.0.0.1:8000/accounts/` test url `http://127.0.0.1:8000/accounts/login/` and check if there is errors. `/accounts/` is the api root – Javier Clavero Apr 12 '16 at 12:56
  • `http://127.0.0.1:8000/accounts/login/` is giving a different error and it's not going to `^accounts/` at all `DoesNotExist at /accounts/login/` – Curtis Apr 12 '16 at 13:05
  • 1
    Is the line you added manually `'django.contrib.sites'`, you shoud add in `settings.py` `SITE_ID = 1`. Read more http://stackoverflow.com/questions/25468676/django-sites-model-what-is-and-why-is-site-id-1 – Javier Clavero Apr 12 '16 at 13:31

1 Answers1

1

I just thought I would post the solution to my problem if anybody encounters the same issue. The template base.html needs to be referenced to the correct folder if your templates are not stored in one folder, so it becomes {% extends "folder/base.html" %}. There are a couple of html files in registration folder with base.html needing re-referencing.

Curtis
  • 1,157
  • 4
  • 17
  • 30