A simple Django authentication project demonstrating user registration, login, logout, and a protected dashboard using Django's built-in authentication framework.
- User Registration
- User Login
- User Logout
- Protected Dashboard
- Django Messages Framework
- CSRF Protection
- Session-based Authentication
- Clean Template Structure
- Python 3.x
- Django
- HTML
- SQLite (default)
login/
│── accounts/
│ ├── templates/
│ │ └── accounts/
│ │ ├── base.html
│ │ ├── login.html
│ │ ├── register.html
│ │ └── dashboard.html
│ ├── views.py
│ ├── urls.py
│ ├── forms.py
│ └── models.py
│
├── login/
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
│
├── manage.py
└── requirements.txt
git clone https://github.com/umarazlan/Django-Auth.gitcd Django-AuthWindows
python -m venv venv
venv\Scripts\activateLinux/macOS
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython manage.py migratepython manage.py runserverOpen your browser and visit:
http://127.0.0.1:8000/
- Create a new account.
- Password validation is handled by Django.
- Authenticate using username and password.
- User session is created after successful login.
- Accessible only after authentication.
- Displays:
- Username
- Email Address
- Ends the user session.
- Redirects back to the login page.
Provides:
- Navigation
- Authentication status
- Flash messages
- Common layout
Displays the registration form using:
{{ form.as_p }}Contains a custom login form with:
- Username
- Password
- CSRF Protection
Displays logged-in user information.
- CSRF Protection
- Django Authentication Framework
- Password Hashing
- Session Authentication
- Login Required Access
- Password Reset via Email
- User Profile Page
- Profile Picture Upload
- Email Verification
- Remember Me Option
- Bootstrap UI
- Custom User Model
- Responsive Design
Umar Azlan
GitHub: https://github.com/umarazlan
This project is licensed under the MIT License.