pythonhtmldjangodjango-templates

Django TemplateDoesNotExist at account/signup/


Can someone please help me? I created a sign up form under:

blog/templates/regitsration/singup.html  # This is the template
blog/templates/regitsration/login.html
blog/templates/blog/***
blog/views.py
blog/urls.py
blog/forms.py

views

def signup(request):
    if request.method == 'POST':
        form = SignUpForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            raw_password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=raw_password)
            login(request, user)
            return redirect('home')
    else:
        form = SignUpForm()
    return render(request, 'registration/signup.html', {'form': form})

The site isn't working correctly. It says:

TemplateDoesNotExist at accounts/signup/
registration/signup.html

Solution

  • You have named your template singup.html. It should be signup.html.