This is a Django-based web application that allows signup and login for multiple user types — specifically Patients and Doctors. Upon successful login, each user is redirected to their respective dashboard displaying their profile details.
- Role-based signup and login system
- Two types of users: Patient and Doctor
- Custom user model with additional fields
- Form validation including password confirmation check
- Dashboard pages for both user roles
- Profile picture upload
- Address fields included in signup
- Clean and modular Django structure
📽️ Submit a short screen-recorded video showing:
- Signup as Patient and Doctor
- Login functionality
- Redirect to respective dashboard
- Form validations in action
- Patient
- Doctor
Each user type has their own signup process and dashboard display.
-
First Name
-
Last Name
-
Profile Picture
-
Username
-
Email
-
Password
-
Confirm Password
-
Address:
- Line 1
- City
- State
- Pincode
Includes password confirmation check and basic validations.
- Sign Up as Patient or Doctor
- Backend checks password match and saves data
- Redirects to respective dashboard page
- Dashboard displays user's submitted data
- Python 3.x
- Django 4.x
- SQLite3 (default)
- HTML/CSS (for templates)
# Clone the repository
git clone https://github.com/your-username/django-multi-role-auth.git
cd django-multi-role-auth
# Create virtual environment and activate
python -m venv env
source env/bin/activate # on Windows: env\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Apply migrations
python manage.py makemigrations
python manage.py migrate
# Run development server
python manage.py runserverdjango-multi-role-auth/
│
├── core/ # Main Django app
│ ├── models.py # Custom User Model and Profiles
│ ├── forms.py # Signup forms for each role
│ ├── views.py # Signup, login, dashboard logic
│ ├── urls.py # App URL patterns
│ └── templates/ # HTML templates
│
├── media/ # Uploaded profile pictures
├── static/ # Static files (CSS, JS)
├── manage.py
└── db.sqlite3