Giter VIP home page Giter VIP logo

wordplease's Introduction

WordPlease

A blog platform with an API REST enterely made with Django

Initiating the project:

For installing dependencies:

pip install -r requirements.txt

For creating a superuser

python manage.py createsuperuser

When running the project, we can use the URLS:

Web

http://127.0.0.1:8000/

It's important to highlight that the categories will be created using the admin panel

API

http://127.0.0.1:8000/api/posts

GET: This url will return all posts if we are logged as superuser, if not we will have to add a blog parameter, as in this case: http://127.0.0.1:8000/api/posts/?blog=pedro

Adding this parameter we will visualize all the posts of this blog that have been publicated, unless we identify ourselves as the owner or the blog (or a superuser), in this case the API will return all the posts, included those that are not publicated yet.

POST: Creting a new post. For this action we have to be authenticated.

http://127.0.0.1:8000/api/posts/<post-id>

GET: We will get the detail of the post (if it's publicated yet, we are the author or a superuser)

PUT: Will update the post (if we are the author or superuser)

DELETE: Will delete the post (if we are the author or superuser)

http://127.0.0.1:8000/api/blogs

GET: This url will return the list of blogs with the names and URLs of these, GET will be the only method accepted

http://127.0.0.1:8000/api/users

GET: This url will return a list of users in the case of being a superuser.

POST: It allows the creation of new users without the need of being authenticated.

http://127.0.0.1:8000/api/users/<user-id>

GET: We will get the detail of the user (if we are the user or a superuser)

PUT: Will update the user (if we are the user or a superuser)

DELETE: Will delete the user (if we are the user or a superuser)

wordplease's People

Contributors

pedroondh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.