This is a simple system for user sign-up, login, and logout using Django.
- Users can sign up.
- Users can log in and log out.
- Passwords are safely stored.
- Keeps users logged in with session management.
Before using this project, make sure you have:
- Python 3.x installed
- Django installed
To install Django, run this command:
pip install django- Get the project by cloning the repository or creating a new Django project:
django-admin startproject django_auth cd myproject - Make a new app for authentication:
python manage.py startapp accounts
- Add
authenticationtoINSTALLED_APPSinsettings.py. - Create user models, views, and templates for login, sign-up, and logout.
- Apply database changes:
python manage.py migrate
- (Optional) Create an admin user:
python manage.py createsuperuser
- Start the server:
python manage.py runserver
- Open
http://127.0.0.1:8000/in your browser to use the system.
- Checks user input before saving.
- Shows clear error messages if login or sign-up fails.
You can use this project for free under the MIT License.