This a Django project that allows users to login to your website and allows them to register for an account as well! The HTML templates use the Bootstrap login template and the user data is stored in a JSON file. You can use this in your website!
You can install Django with:
pip install Django==3.1.2
To get started, you need to clone this repository. You can click here to download, or you can download it with git in your Terminal / Command Prompt:
git https://github.com/vismodo/django-login-and-register.git
You also have to enter the directory. You can do that with Terminal / Command Prompt:
cd django-login-and-register
Once that is done, you can run it on a localhost!
In your Terminal / Command Prompt, type the following:
python manage.py runserver
You would see some logs now. Ignore them. All you have to do is visit localhost:8000
on your browser. To stop the server, return to your terminal and press CTRL-C
.
Visit the login page and try to login! The preloaded user's email is [email protected]
and the password is placeholder
. You can view this in user_data.json. If you enter incorrect details, you will see a Bootstrap Alert. To register with an account, visit the registration page.
Visit the registration page and create an account!
Using an email that is already in use will give you a Bootstrap Alert.
It also returns an alert if the passwords do not match.
The Name
field is not used anywhere by the server. It is up to you to use that!
The JSON File contains all the emails and passwords of users. Without this file, The project will have no function at all! You may read, remove items and add them from anywhere, but there must be atleast one email and password.
You can incorporate this inside your website as well! You can modify the templates and the fields. Use this project to authenticate your users.
- vismodo (Owner): All Commits