This is a simple Django web application that provides user authentication using both username and email.
Deployment - auth.harshp.in
Create a Django web application with user authentication features, including user registration, login, basic user profile, and logout.
- Use Django to create a new project and a single app.
- Implement a user registration (sign-up) page with the following fields:
- Username
- Password
- Confirm Password
- Implement a user login page with the following fields:
- Username or Email
- Password
- After successful login, redirect the user to a simple dashboard page that displays a welcome message with their username.
- Implement a basic user profile page that displays user information. Users should only be able to access this page if they are logged in.
- Implement a logout functionality that logs the user out and redirects them to the login page.
- Use Django's built-in authentication system for handling user registration, login, and logout.
- Ensure the password is securely stored using Django's password hashing.
- Implement proper form validation to handle errors during registration and login.
- Use Django templates for rendering HTML pages.
- Apply basic styling using CSS (you can use an external library like Bootstrap if you prefer).
- Create a simple SQLite database to store user information.
- Implemented Forgot Password and Change Password Features using features provided in the Django Contrib.
- Implemented SMTP Email Backend to send an email for Forgot Password.
- Deployed the project to auth.harshp.in with a PostgreSQL database using the deployment branch.
- (Optional) Activate a virtual environment to isolate dependencies.
pip install virtualenv
python -m virtualenv venv
venv/Scripts/activate (Windows)
source venv/bin/activate (Linux)
- Clone the repository:
git clone [email protected]:glitchharsh/custom-user-django.git
cd custom-user-django
- Install dependencies:
pip install -r requirements.txt
- Apply Migrations:
python manage.py migrate
- Run the development server:
python manage.py runserver
-
Visit localhost:8000 in browser to access the application.
The video came out to be longer than expected. Please watch it at 1.5x or 2x speed.