an application using VueJs and Django (RestFramework).
$ git clone https://github.com/zenghongtu/django-vue-boilerplate django-vue
$ cd django-vue
$ pipenv install --dev & pipenv shell
$ python manage.py migrate
$ cd frontend & yarn install
$ yarn run serve
$ yarn run build
'Type 'yes' to continue, or 'no' to cancel:'
输入 yes
Set ALLOWED_HOSTS on backend.settings.prod.py
- Apache: Set project path on
backend.Apache.backend.conf
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 ) |
The sample part code refers to [django-vue-template] (https://github.com/gtalarico/django-vue-template/), thanks @gtalarico