This project is a Django-based web application implementing a user authentication system. It provides basic functionalities for user registration, login, logout, and profile management.
- User Registration: Allows new users to create an account by providing a username, email, password, and confirming the password.
- User Login: Users can log in using either their username or email along with their password.
- Dashboard: After a successful login, users are redirected to a simple dashboard displaying a welcome message with their username.
- User Profile: A basic profile page displaying user information. This page is accessible only to logged-in users.
- Logout Functionality: Users can log out of the application, which redirects them back to the login page.
- Built-in Authentication: Uses Django's built-in authentication system for handling user registration, login, and logout processes.
Below are some snapshots of the application in action:
Follow these instructions to get the project up and running on your local machine for development and testing purposes.
-
Clone the Repository (if you haven't already)
git clone https://github.com/Addy-codes/django-user-auth.git cd user-auth
-
Set up a Python Virtual Environment
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install Required Packages
pip install -r requirements.txt
-
Database Migrations
Before running the application, you need to create the necessary database tables:
python manage.py migrate
-
Create a Superuser
To access the admin panel, create a superuser:
python manage.py createsuperuser
-
Run the Development Server
Start the Django development server:
python manage.py runserver
-
Access the Application
Open your web browser and go to http://localhost:8000/ to view the application.
This project is licensed under the MIT License - see the LICENSE file for details.