{"id":23046862,"url":"https://github.com/toiroff/drf-blog","last_synced_at":"2026-04-13T23:01:52.009Z","repository":{"id":259081351,"uuid":"876254471","full_name":"toiroff/drf-blog","owner":"toiroff","description":"Zero to hero for DJANGO REST FRAMEWORK","archived":false,"fork":false,"pushed_at":"2024-10-21T17:36:50.000Z","size":21576,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-20T08:33:39.932Z","etag":null,"topics":["api","django","rest-api","rest-framework","simple-jwt"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toiroff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-21T16:52:09.000Z","updated_at":"2024-10-21T17:38:49.000Z","dependencies_parsed_at":"2024-10-22T11:58:49.351Z","dependency_job_id":null,"html_url":"https://github.com/toiroff/drf-blog","commit_stats":null,"previous_names":["toiroff/drf-blog"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/toiroff/drf-blog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toiroff%2Fdrf-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toiroff%2Fdrf-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toiroff%2Fdrf-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toiroff%2Fdrf-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toiroff","download_url":"https://codeload.github.com/toiroff/drf-blog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toiroff%2Fdrf-blog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31774547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","django","rest-api","rest-framework","simple-jwt"],"created_at":"2024-12-15T22:29:51.785Z","updated_at":"2026-04-13T23:01:51.978Z","avatar_url":"https://github.com/toiroff.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DRF Blog API with JWT Authentication\n\nThis project is a Django Rest Framework (DRF) application that provides a complete Blog API with JWT authentication, permission management, and detailed API documentation using **Swagger**.\n\n## Table of Contents\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Technologies Used](#technologies-used)\n\n## Features\n\n### 1. **JWT Authentication**\n- Secure user authentication using **JWT** (JSON Web Tokens).\n- Endpoints for login, token refresh, and token verification.\n- JWT tokens required for accessing protected routes.\n\n### 2. **Blog CRUD Operations**\n- **Create**, **Read**, **Update**, and **Delete** blog posts.\n- Only the author of a post can edit or delete it.\n  \n### 3. **Permissions**\n- Custom permission classes restrict access:\n  - **IsAuthenticatedOrReadOnly**: Authenticated users can create/update posts.\n  - **IsOwnerOrReadOnly**: Only the post owner can modify or delete a post.\n\n### 4. **ViewSets**\n- ViewSets handle CRUD operations for blog posts and user profiles.\n- Examples:\n  - `BlogPostViewSet`: Manages blog posts.\n\n### 5. **Generic Views**\n- DRF's generic views provide customizable endpoints for specific tasks.\n- Example: `CreateAPIView` is used for user registration.\n\n### 6. **Schema Generation and API Documentation**\n- **Swagger** and **ReDoc** auto-generate API documentation.\n  - Accessible via `/swagger/` and `/redoc/`.\n\n\n## Installation\n\n### 1. Clone the repository:\n\n```bash\ngit clone https://github.com/your-username/your-repo-name.git\ncd your-repo-name\n```\n\n### 2. Install dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n### 3. Set up the database:\n\n```bash\npython manage.py migrate\n```\n\n### 4. Run the development server:\n\n```bash\npython manage.py runserver\n```\n\n### 5. Access the API:\n- The API is accessible at `http://127.0.0.1:8000/`.\n- Swagger UI can be accessed at `http://127.0.0.1:8000/api/schema/swagger/`.\n\n## Usage\n\n### Register a new user:\n\n```bash\nPOST /api/v1/auth\n```\n\n### Get a JWT token:\n\n```bash\nPOST /api/v1/token/\n```\n\n### Access a protected route with the JWT token:\n\n```bash\nAuthorization: Bearer \u003cyour_token\u003e\n```\n\n## Technologies Used\n\n- **Django**: High-level web framework.\n- **Django Rest Framework (DRF)**: For building the REST API.\n- **Django Rest Framework Simple JWT**: For handling JWT authentication.\n- **drf-yasg**: For auto-generating Swagger and ReDoc API documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoiroff%2Fdrf-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoiroff%2Fdrf-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoiroff%2Fdrf-blog/lists"}