This is a Django-based social media application that allows users to create posts, follow other users, and comment on posts. The application supports user authentication, including social authentication via Google.
- User registration and authentication
- Social authentication with Google
- Create, edit, and delete posts
- Follow and unfollow users
- Comment on posts
- User profile management
-
Clone the repository:
git clone https://github.com/yourusername/social_media.git cd social_media
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Set up environment variables: Create a
.env
file in the project root and add the following variables:SECRET_KEY=your_secret_key GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret
-
Apply migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
- Access the application at
http://127.0.0.1:8000/
- Register a new user or log in with an existing account
- Create posts, follow other users, and comment on posts
- Manage your profile and view other users' profiles
Contributions are welcome! Please open an issue or submit a pull request for any changes.