Author: [Younes Veisi]
This is a Blog clone project built using Django, aiming to replicate some of the core functionalities of the popular social media platform.
- User Authentication: Register and login functionalities for users.
- Create Tweets: Post short messages similar to tweets.
- Follow Users: Follow other users to see their tweets on your timeline.
- Like and Retweet: Interact with tweets by liking and retweeting.
- Search Functionality: Search for users and tweets.
To run this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/younesveisi1374/Blog.git - Navigate to the project directory:
cd Blog - Create a virtual environment (optional but recommended):
python -m venv .venv - Activate the virtual environment:
- On Windows:
.venv\Scripts\activate - On macOS and Linux:
source .venv/bin/activate
- On Windows:
- Install the required dependencies:
pip install -r requirements.txt - Make migrations:
python manage.py makemigrations - Apply the database migrations:
python manage.py migrate - Create a superuser:
python manage.py createsuperuser - Start the development server:
python manage.py runserver
Once the development server is running, access the application at http://localhost:8000 in your web browser. You can then register a new account, log in, and start using the Blog clone by creating tweets, following other users, liking, retweeting, and exploring the functionalities.
To create API documentation for your Django project, you'll want to outline the endpoints and their functionalities. Based on the provided urls.py files, here's an example API documentation:
- URL:
/ - Description: Renders the home page of the Blog clone.
- Method: GET
- URL:
/post/new - Description: Allows users to create a new post.
- Method: GET
- URL:
/post/<int:pk> - Description: Displays details of a specific post.
- Method: GET
- URL:
/post/update/<int:pk> - Description: Allows users to update a specific post.
- Method: GET, POST
- URL:
/post/delete/<int:pk> - Description: Allows users to delete a specific post.
- Method: GET, POST
- URL:
/accounts/signup/ - Description: Allows users to register for a new account.
- Method: GET, POST
- Renders the home page displaying a paginated list of posts.
- Uses
ListViewto display posts. - URL:
/ - Methods: GET
- Allows logged-in users to create new posts.
- Uses
CreateView. - URL:
/post/new - Methods: GET, POST
- Displays details of a specific post.
- Utilizes
DetailView. - URL:
/post/<int:pk> - Methods: GET
- Enables users to update existing posts.
- Utilizes
UpdateView. - URL:
/post/update/<int:pk> - Methods: GET, POST
- Allows users to delete posts.
- Uses
DeleteView. - URL:
/post/delete/<int:pk> - Methods: GET, POST
- Handles comments related to specific posts.
CommentGetfetches the comment form.CommentPostprocesses posted comments.- URL:
/post/<int:pk>(for commenting) - Methods: GET, POST
- Allows users to sign up/register.
- Utilizes
CreateView. - URL:
/accounts/signup/ - Methods: GET, POST
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature - Make your changes and commit them:
git commit -m 'Add feature' - Push to the branch:
git push origin feature/your-feature - Submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- The project was created as a learning exercise by younesveisi1374.
- Inspired by the functionalities of Blog.