Use this to manage yours apps inside your backend directory:
.
|____django_dir
| |____apps
| | |____your_app_folder
| |__settings.py
|____manage.pyAllows to couple Django and Vue-cli easily, without any plugin or additional library.
Note : Hot Reload is active with this configuration.
| """User forms.""" | |
| from django import forms | |
| from django.contrib.auth import get_user_model | |
| from django.contrib.auth.forms import UserCreationForm | |
| from django.utils.translation import gettext_lazy as _ | |
| User = get_user_model() |
The goal of this workflow is to couple vue-cli to Django, in a transparent way in dev and in prod. The hot-reload is active in the backend as well as in the frontend, and the frontend is accessed through Django, from the index page ;)
Note: We also use the router's historical mode, for a more professional integration.
Note²: Do not forget to build the vue-cli project for production!