base.html file needed for django-registration-redux 


               


base.html file needed for django-registration-redux



Python


In this article, we show how to set up and where to put the base.html file for django-registration-redux

django-registration-redux is a third-party application that allows us to build a website with users, registration, logins, etc.

It has a lot of functionality built into it, so it makes it very easy for a website to have a user login system.

Since django-registration-redux version 1.2, a base.html file has been necessary in the templates directory in order for the whole system to work.

In this article, we'll go over how to set up all the files needed and where to put everything so that django-registration-redux works perfectly.


base.html file

So let's start with the base.html file.

We'll first go over how to create the file, meaning what contents go into it. Then we will go over where to put it in your project directory.

So the contents of the file are extremely simple.

Basically all that can go into the base.html file is the following line shown below.



That single line is really all that is needed for the base.html file.

Basically the base.html file is just a file that needs to be present.

And all you have to do is write that it extends registration_form.html.

So this is all the content that really needs to compose the base.html file.

Now where does this file go?

So go into your top root directory.

Say, you created a project called mywebsite.

The highest directory will be called mywebsite, which is really an empty folder holder that just holds the project.

You then click this directory and then see another mywebsite directory, which is really the top root directory of your project. It is in this directory that we want to work with, the top level directory of the project.

So click this mywebsite directory.

In this folder, you create a templates directory.

Inside of this templates directory, you place the base.html file.

This takes care of the base.html file, but there's more that has to be done.

Inside of this templates directory, create another directory called registration.

Inside of this registration directory, you put all of the other files you need for django-registration-redux to work.

This includes activate.html, activation_complete.html, activation_email.txt, activation_email_subject.txt, registration_complete.html, registration_form.html, login.html, and logout.html

Once all of this is in place, then django-registration-redux should work perfectly, assuming that you have made all necessary changes to the settings.py file and the urls.py file.

So this is really all you need to know regarding the base.html file for use with django-registration-redux




HTML Comment Box is loading comments...