Welcome to the project README! This document provides an overview of the various modules and components present in your Django project.
The auth_login app handles user authentication, registration, and user profile management.
-
models.py: Defines custom user models with additional fields like mobile number, profile image, and more.
-
views.py: Contains views for user authentication, profile management, login via Google OAuth2, email and password login, user registration, and more.
-
serializers.py: Provides serializers for user data, login credentials, and registration data.
-
urls.py: Defines URLs for user authentication, login, registration, profile management, and more.
The base app includes base models, utility classes, and custom permissions.
-
models.py: Contains an abstract base model with timestamp fields, active status, and soft delete functionality.
-
permissions.py: Defines custom permissions like
IsOwner,IsVerified,IsNotVerified, andIsOwnObjfor controlling access based on ownership and verification status.
To get started with the project, follow these steps:
- Clone the repository to your local machine.
- Set up a virtual environment for the project
- On Windows:
python -m venv venv - On macOS and Linux:
python3 -m venv venv
- On Windows:
- Activate the virtual environment:
- On Windows:
venv\Scripts\activate - On macOS and Linux:
source venv/bin/activate
- On Windows:
- Install project dependencies using
pip install -r requirements.txt. - Run makemigrations using
python manage.py makemigrations. - Run migrations using
python manage.py migrate. - Create a superuser account using
python manage.py createsuperuser.
- The
auth_loginapp provides user authentication, login, registration, and profile management views. - Use the custom permissions defined in the
baseapp to control access to various API endpoints. - Customize the models, serializers, and views to fit your project's requirements.
You can also run the project using Docker for easy setup and management. Follow these steps:
- Make sure you have Docker installed on your system.
- Clone the repository to your local machine.
- Open a terminal and navigate to the project directory.
- copy the
.env.examplefile to.envand fill in the required values. - Build the Docker image:
docker compose build . - Run the Docker container:
docker compose up - Access the project at
http://localhost:8000/.
Remember to replace project-name with your actual project's name.