This is a social media web application built using Django, featuring various functionalities for users to connect and share their thoughts and experiences.
- Sign Up and Login
- OAuth 2.0 Integration
- Logout
- Forgot Password
- Public Profile View
- Create, Edit, Delete Posts
- Like and Comment/Reply
- Save and Search Posts
- Follow and Unfollow Users
- Friend Request
- Notifications
- Chats using Websockets
This script provides a set of commands for managing a Django project. It includes commands for running the development server, applying migrations, making migrations, installing packages, and running tests. This README will guide you on how to set up and use the script.
Before using this script, ensure you have the following prerequisites installed on your system:
- Python 3.9 or greater
- Virtualenv (recommended for creating virtual environments)
- Django (installed in your project)
-
Clone the project repository.
-
Create a virtual environment (recommended) for your Django project. You can create one using
virtualenvor any other virtual environment management tool. -
Create a
.envfile in your project directory and configure your environment variables. You can usetests.envas a template for your.envfile. Replace the placeholder values with your actual settings. -
Ensure you have Django and other project dependencies installed. You can install the required packages using the
installcommand:./build.sh install
You can use the provided script setup file to perform various tasks related to your project.
./build.sh runserverThis command will check if the Django server is already running on port 8000 and kill the process if necessary # Usage
You can use the provided script setup file to perform various tasks related to your project.
./build.sh runserverThis command will check if the Django server is already running on port 8000 and kill the process if necessary. Then, it will activate the virtual environment, load environment variables from the .env file, and start the server using the command python manage.py runserver.
To start the React development server, run the following command:
./build.sh startThis command will check if the React development server is already running on port 3000 and kill the process if necessary. Then, it will change the directory to the web folder, load environment variables from the .env file, and start the server using the command yarn run dev.
To run database migrations, use the following command:
./build.sh migrateThis command will change the directory to the backend folder, load environment variables from the .env file, activate the virtual environment, and run the Django migration command using python manage.py migrate.
To create new database migrations, run the following command:
./build.sh makemigrationsThis command will change the directory to the backend folder, load environment variables from the .env file, activate the virtual environment, and create new migrations using python manage.py makemigrations.
This command will check if the React development server is already running on port 3000 and kill the process if necessary. Then, it will change the directory to the web folder, load environment variables from the .env file, and start the server using the command yarn run dev.
To run database migrations, use the following command:
./build.sh migrateThis command will change the directory to the backend folder, load environment variables from the .env file, activate the virtual environment, and run the Django migration command using python manage.py migrate.
To create new database migrations, run the following command:
./build.sh makemigrationsThis command will change the directory to the backend folder, load environment variables from the .env file, activate the virtual environment, and create new migrations using python manage.py makemigrations.
Note: Make sure you have made the necessary changes to your Django models before running this command.