Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 1.92 KB

README_en.md

File metadata and controls

68 lines (47 loc) · 1.92 KB

django-vue-boilerplate

README: English | 中文

an application using VueJs and Django (RestFramework).

Prerequisites

Install

Install Template

$ git clone https://github.com/zenghongtu/django-vue-boilerplate django-vue
$ cd django-vue

Install Dependencies

$ pipenv install --dev & pipenv shell
$ python manage.py migrate
$ cd frontend & yarn install

Running Development Servers

$ yarn run serve

Deploy

Build

$ yarn run build

'Type 'yes' to continue, or 'no' to cancel:'

输入 yes

Configuration

Set ALLOWED_HOSTS on backend.settings.prod.py

  • Apache: Set project path on backend.Apache.backend.conf

Upload files to server

Template Structure

Location Content
/backend Django Project & Backend Config
/backend/api Django App (/api)
/frontend Vue App .
/frontend/src/main.js JS Application Entry Point
/frontend/public/index.html Html Application Entry Point (/)
/frontend/src/assets Static Assets
/backend/dist/ Bundled Assets Output (generated by python manage.py build or yarn run build)

Others

The sample part code refers to [django-vue-template] (https://github.com/gtalarico/django-vue-template/), thanks @gtalarico