{"id":21135652,"url":"https://github.com/aalug/blog_drf","last_synced_at":"2026-04-16T07:31:22.977Z","repository":{"id":152686343,"uuid":"614987044","full_name":"aalug/blog_drf","owner":"aalug","description":"Blog app built in the Django REST framework","archived":false,"fork":false,"pushed_at":"2023-05-31T14:53:34.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T06:43:31.853Z","etag":null,"topics":["api","backend","blog","celery","django","django-rest-framework","docker","drf-spectacular","postgres","python","rabbitmq","rest-api"],"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/aalug.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":"2023-03-16T18:06:20.000Z","updated_at":"2023-05-15T13:15:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"27f30de7-5c36-4423-ba31-1088d7259fec","html_url":"https://github.com/aalug/blog_drf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalug%2Fblog_drf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalug%2Fblog_drf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalug%2Fblog_drf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalug%2Fblog_drf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aalug","download_url":"https://codeload.github.com/aalug/blog_drf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243581062,"owners_count":20314163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","backend","blog","celery","django","django-rest-framework","docker","drf-spectacular","postgres","python","rabbitmq","rest-api"],"created_at":"2024-11-20T06:56:57.200Z","updated_at":"2026-04-16T07:31:17.957Z","avatar_url":"https://github.com/aalug.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django REST framework Blog API\r\n\r\nThe app is build with the **Django REST framework** and uses:\r\n- Docker\r\n- Postgres\r\n- Celery\r\n- RabbitMQ\r\n- Redis\r\n- drf-spectacular for documentation\r\n\r\n## Getting started\r\n1. Clone the repository\r\n2. Rename `.env.sample` to `.env` and replace the values\r\n3. Run in your terminal `docker-compose up --build`\r\n4. Now everything should be set up and app's documentation available on http://localhost:8000/api/docs/\r\n\r\n## Testing\r\nTo run tests:\r\n1. If containers are not running, run in your terminal `docker-compose up`\r\n2. In the second terminal tab, run `docker ps` and get the ID of the app container\r\n3. Run `docker exec -itu 0 \u003ccontainer ID\u003e sh` to get access to the container's shell as a root user\r\n4. Run `python manage.py test` to run all tests or `python manage.py test \u003capp-name\u003e.tests` to run tests for a specific app\r\n\r\n## API Endpoints\r\n**User app**\r\n- Use `/api/user/create/` to create a new user \r\n- Then use `/api/user/token/` to create a token for the created user\r\n- Use `/api/user/profile/` to retrieve user details and update password and user profile details\r\n- Use `/api/user/forgot-password/`to send an email with a link to reset the password.\r\n\r\n**Posts app**\r\n- Use `/api/post/posts/` to create a new post and retrieve all posts. Available query params:\r\n  + `tags` - a list of tags ids to filter by. For example `?tags=1,5,20`\r\n  + `sort` - sorting posts by:\r\n    - `title-asc`, `title-desc` - title\r\n    - `comments-asc`, `comments-desc`- number of comments\r\n    - `date-asc`, `date-desc` - `created_at` value\r\n    - `update-asc`, `update-desc` - `updated_at` value\r\n    \r\n  each in ascending or descending order. For example `?sort=comments-asc`.\r\n \r\n- Use `/api/post/posts/{id}/` to see post details, update and delete a post\r\n\r\n\r\n- Use `/api/post/tags/` to retrieve all tags\r\n- Use `/api/post/tags/{id}/` to update and delete a tag\r\n\r\n\r\n- Use `/api/post/comments/` to create a comment\r\n- Use `/api/post/comments/{id}/` to update and delete a comment\r\n\r\n\r\n- Use `/api/post/postimages/` to create an additional image for a post\r\n- Use `/api/post/postimages/{id}/` to update and delete a post image\r\n\r\n- Use `/api/post/votes/` to create a vote of a comment \r\n- Use `/api/post/votes/{id}/` to delete a vote. There is no option to update it (change the `vote_type` property). If a user decides to change their vote, it will be deleted and then created a new one.\r\n\r\n\r\nMore information about API endpoints, with examples of data that needs to be sent with a request, can be found on http://localhost:8000/api/docs/.\r\nThis will provide you with complete and easy-to-use documentation. It also gives the option to use every endpoint of this API.\r\n\r\n### More Information\r\nThis app uses [djangorestframework-camel-case ](https://github.com/vbabiy/djangorestframework-camel-case) to enable the server to send and receive data in a format that is compatible with TypeScript. This package provides support for camel-case style serialization and deserialization, which is appropriate for the conventions used in Vue.js.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faalug%2Fblog_drf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faalug%2Fblog_drf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faalug%2Fblog_drf/lists"}