Giter VIP home page Giter VIP logo

django-api-practice's Introduction

django-api-practice

django x vue.js x RestAPI

Reference Book

現場で使えるDjango Rest Frameworkの薄い本

Make Environment

# install pyenv
brew install pyenv

# edit .bash_profile
vi ~/.bash_profile
# add lines
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# load .bash_profile
source ~/.bash_profile

# install python
pyenv install 3.6.5
pyenv global 3.6.5

# check pyenv-virtualenv
pyenv versions

# install pipenv
brew install pipenv

# install library with pipenv => make Pipfile
pipenv install django djangorestframework pylint djangorestframework-simplejwt djoser

# Add setting.json with VS Code.
// Whether to lint Python files.
"python.linting.enabled": true,
// Whether to lint Python files using pylint.
"python.linting.pylintEnabled": true,

Create Django Project

# shell login
pipenv shell
# create django Project
django-admin startproject config .
# create app
python manage.py startapp shop
python manage.py startapp apiv1

Build Setup

# migration
python manage.py makemigrations shop
python manage.py migrate
python manage.py createsuperuser
# example: admin / pass12345

# start web server. 
# access to http://localhost:8000/vuejs/api/
python manage.py runserver

django-api-practice's People

Contributors

dependabot[bot] avatar naotaro0123 avatar

Watchers

 avatar  avatar

django-api-practice's Issues

JWT Auth Not working

以下のリポジトリでも正しく動作できず、自分の環境に何か設定が漏れているのかも
https://github.com/akiyoko/drf-vue-sample

WIP Branch
https://github.com/naotaro0123/django-api-practice/tree/develop

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.