Skip to content

AfshanAlamEngg/coco-blogs-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CocoBlogs - Backend

This is the backend for a personal blogging project built with Django. It provides a RESTful API for managing blog posts, user authentication, and other features.

Table of Contents

Features

  • User authentication and authorization
  • CRUD operations for blog posts
  • Comment system
  • Tagging system
  • Pagination for blog posts
  • Admin interface for managing content

Requirements

  • Python 3.13+
  • Django 5+
  • Django REST Framework

Installation

  1. Clone the repository:

    git clone https://github.com/AfshanAlamEngg/coco-blogs-backend
    cd coco-blogs-backend
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate

    If the above code not works, then try the below code.

    python -m venv venv
    source venv/Scripts/activate
  3. Install the dependencies:

    pip install -r requirements.txt
  4. Run the migrations:

    python manage.py migrate
  5. Create a superuser:

    python manage.py createsuperuser
  6. Start the development server:

    python manage.py runserver

Final Output

alt text

Usage

You can access the API endpoints using tools like Postman or cURL. The admin interface can be accessed at /admin/.

API Endpoints

  • GET /api/posts/ - List all blog posts
  • POST /api/posts/ - Create a new blog post
  • GET /api/posts/{id}/ - Retrieve a specific blog post
  • PUT /api/posts/{id}/ - Update a specific blog post
  • DELETE /api/posts/{id}/ - Delete a specific blog post
  • POST /api/comments/ - Add a comment to a blog post

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or new features.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

A blog application made in django and react

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages