{"id":21880361,"url":"https://github.com/flacode/drf_practice","last_synced_at":"2025-03-22T00:27:52.745Z","repository":{"id":39844633,"uuid":"141791653","full_name":"flacode/drf_practice","owner":"flacode","description":"Using Django Rest Framework to build apis.","archived":false,"fork":false,"pushed_at":"2022-12-08T02:20:04.000Z","size":28,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-01-26T18:46:07.419Z","etag":null,"topics":["django-rest-framework","python-3"],"latest_commit_sha":null,"homepage":null,"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/flacode.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}},"created_at":"2018-07-21T07:39:03.000Z","updated_at":"2018-08-02T17:27:03.000Z","dependencies_parsed_at":"2022-08-27T17:21:32.701Z","dependency_job_id":null,"html_url":"https://github.com/flacode/drf_practice","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/flacode%2Fdrf_practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flacode%2Fdrf_practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flacode%2Fdrf_practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flacode%2Fdrf_practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flacode","download_url":"https://codeload.github.com/flacode/drf_practice/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244890042,"owners_count":20527026,"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":["django-rest-framework","python-3"],"created_at":"2024-11-28T08:42:47.688Z","updated_at":"2025-03-22T00:27:52.722Z","avatar_url":"https://github.com/flacode.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BlogPost API\n\n[![Build Status](https://travis-ci.com/flacode/drf_practice.svg?branch=develop)](https://travis-ci.com/flacode/drf_practice)\n[![Coverage Status](https://coveralls.io/repos/github/flacode/drf_practice/badge.svg?branch=develop)](https://coveralls.io/github/flacode/drf_practice?branch=ch-test-features)\n[![Maintainability](https://api.codeclimate.com/v1/badges/159c3d486314a760be7a/maintainability)](https://codeclimate.com/github/flacode/drf_practice/maintainability)\n\n\u003e BlogPost API is a simple application that allows users to write, read and comment on blogs.\n\n## Features\n- Users can create accounts.\n- Users can log in.\n- Users can create, view, update and delete a blog post.\n\n## Running the tests\nWithin the project's root directory, run\n```coverage run --source=posts manage.py test \u0026\u0026 coverage report -m```\n\n\n## Getting Started\n### Prerequisites\n1. Install requirements, run\n```sh\n     pip install -r requirements.txt\n```\n2. Database configuration.\n   - Download and install postgres from [here](https://www.postgresql.org/download/)\n   - Create database in terminal\n   ```sh\n      $ psql postgres;\n      $ CREATE DATABASE database_name;\n   ```\n   - Store the database name under an environment variable called `DATABASE_URL` in the following format.\n   ```sh\n      $ export DATABASE_URL='postgres://USER:PASSWORD@HOST:PORT/NAME'\n   ```\n\n3. Switch to the project's root directory and run migrations to create database tables.\n```sh\n    $ python manage.py makemigrations\n    $ python manage.py migrate\n ```\n 4. Then run the application.\n ```sh\n    $ python manage.py runserver\n ```\n\n## End points\n### Endpoints to create a user account and login into the application\nHTTP Method|End point | Public Access|Action\n-----------|----------|--------------|------\nPOST | /entries/register/ | True | Create an account.\nPOST | /entries/login/  | True | Login a user.\nGET  | /entries/useradmin/ | False | Return list of registered users to a super user.\nGET or DELETE  | /entries/useradmin/\u003cint:pk\u003e/ | False | Allow super user to view user details and delete a user.\nGET or PUT | /entries/user/\u003cint:pk\u003e/ | False | Allow a user to view their account details and update them.\n\n\n## End points\n### Endpoints for blog posts\nHTTP Method|End point | Public Access|Action\n-----------|----------|--------------|------\nGET | /entries/ | True | Get all blog posts.\nPOST | /entries/  | False | Create a post.\nGET  | /entries/\u003cint:pk\u003e/ | False | Retrieve a certain post.\nPUT or DELETE | /entries/\u003cint:pk\u003e/ | Update or delete a certain post by the author.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflacode%2Fdrf_practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflacode%2Fdrf_practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflacode%2Fdrf_practice/lists"}