https://github.com/javitocor/api-blog-drf
An API where user can register/login and get a Token that allow them to make CRUD operations with blogs and comments, without token users have permissions ReadOnly.
https://github.com/javitocor/api-blog-drf
api-blog authentication authorization django django-rest-auth django-rest-framework
Last synced: about 2 months ago
JSON representation
An API where user can register/login and get a Token that allow them to make CRUD operations with blogs and comments, without token users have permissions ReadOnly.
- Host: GitHub
- URL: https://github.com/javitocor/api-blog-drf
- Owner: javitocor
- License: mit
- Created: 2021-09-14T17:34:52.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-15T11:41:21.000Z (almost 5 years ago)
- Last Synced: 2025-03-24T09:24:19.384Z (about 1 year ago)
- Topics: api-blog, authentication, authorization, django, django-rest-auth, django-rest-framework
- Language: Python
- Homepage:
- Size: 65.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# README
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]

# Blog Django Rest Framework with Auth Token
> An API where user can register/login and get a Token that allow them to make CRUD operations with blogs and comments, without token users have permissions ReadOnly.
Additional description about the project and its features.
## Built With
- DJANGO
- DJANGO REST FRAMEWORK
- DJANGO REST AUTH
- GITHUB ACTIONS
- VSCODE
## Getting Started
### Usage
To have this app on your pc, you need to:
* [download](https://github.com/javitocor/API-Blog-DRF/archive/main.zip) or clone this repo:
- Clone with SSH:
```
git@github.com:javitocor/API-Blog-DRF.git
```
- Clone with HTTPS
```
https://github.com/javitocor/API-Blog-DRF.git
```
* In the project directory, you can run:
Create virtual enviroment with:
``` bash
py -m venv project-name
project-name\Scripts\activate.bat
```
Run migrations:
``` bash
py manage.py migrate
```
Run server:
``` bash
py manage.py runserver
```
Endpoints (visitors without Token Key have ReadOnly permissions):
``` bash
http://127.0.0.1:8000/rest-auth/registration/
http://127.0.0.1:8000/rest-auth/login/
http://127.0.0.1:8000/posts/ (POST,GET)
http://127.0.0.1:8000/posts/:pk (GET, PUT, DELETE)
http://127.0.0.1:8000/posts/:pk/comments (GET,POST)
http://127.0.0.1:8000/posts/:pk/comments/:comment_id (DELETE)
http://127.0.0.1:8000/users/ (POST,GET)
http://127.0.0.1:8000/users/:pk (GET, PUT, DELETE)
```
## Author
👤 Javier Oriol Correas Sanchez Cuesta
- Github: [@javitocor](https://github.com/javitocor)
- Twitter: [@JavierCorreas4](https://twitter.com/JavierCorreas4)
- Linkedin: [Javier Oriol Correas Sanchez Cuesta](https://www.linkedin.com/in/javier-correas-sanchez-cuesta-15289482/)
## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check the [issues page](https://github.com/javitocor/API-Blog-DRF/issues).
## Show your support
Give a ⭐️ if you like this project!
## Acknowledgments 🚀
- [Django Docs](https://docs.djangoproject.com/en/3.2/)
- [Django Rest Framework Docs](https://www.django-rest-framework.org/)
- [Django Rest Auth](https://django-rest-auth.readthedocs.io/)
## 📝 License
This project is [MIT](lic.url) licensed.
[contributors-shield]: https://img.shields.io/github/contributors/javitocor/API-Blog-DRF.svg?style=flat-square
[contributors-url]: https://github.com/javitocor/API-Blog-DRF/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/javitocor/API-Blog-DRF.svg?style=flat-square
[forks-url]: https://github.com/javitocor/API-Blog-DRF/network/members
[stars-shield]: https://img.shields.io/github/stars/javitocor/API-Blog-DRF.svg?style=flat-square
[stars-url]: https://github.com/javitocor/API-Blog-DRF/stargazers
[issues-shield]: https://img.shields.io/github/issues/javitocor/API-Blog-DRF.svg?style=flat-square
[issues-url]: https://github.com/javitocor/API-Blog-DRF/issuesover: