Git Product home page Git Product logo

one-two-django's Introduction

blog/homepage dev

this project is temporary develope purpose. don't be use it directly to your project. there may exists artifacts. that's not my F.A.U.L.T.

Recommended Happy Duppy Dev Tools

  1. Postman // super duper query shooter and it's frreee.
  2. vs-code //
  3. miniconda // help your python environment

Authentication method

I Use Token based auth.

setup

first, make your own environment. in my tutorial, I use miniconda.(minimal anaconda package manger) bash```

conda create -n ${your-env-name} python=3 pip install -r requrements.txt

and let's get inside directory, type ```cd fuck```

then you finally get to start developing.


# make ssl cert

openssl genrsa 2048 > django.key openssl req -new -x509 -nodes -config openssl.cfg -sha256 -days 365 -key ./django.key > django.crt```

Usage

first add user(you are admin user so, make your admin id)

bash```

python manage.py createsuperuser python manage.py runserver // run as http python manage.py runsslserver // run as sslserver(https)

then you can create admin id

to access my django-rest-api 

make token first.

open PostMan 
get the token by using api localhost:8000/get-token
![](./img/get-token.png)
look at the numbers carefully and follow them.

if you reach number __3__, then click send. then you can get token in number __4__.


write it to your header for authentication. 
select type as __OAuth2__.
write the token string you created earlier to the access token column.
![](./img/use-token.png)


to write your first post,
you need to create category.

create category
![](./img/create-category.png)
chnage method from __GET__ to __POST__.

and in Body, fill with category name, and type of category(private : only owner can access it, public : all user allow to access it.)
, parent_category(this is optional. actually it is created for some special purpose. it doesn't need for someones. :( )



then let's write and save your first post.




one-two-django's People

Contributors

fabyday avatar

Stargazers

 avatar

Watchers

 avatar

one-two-django's Issues

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.