Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
django_vue
frontend
README.md Add Django + Vue example project May 14, 2019
manage.py
poetry.lock Add Django + Vue example project May 14, 2019
pyproject.toml

README.md

Integrate Django and Vue.js

This is the Django + Vue.js project as configured in my blog post, "Integrate Django and Vue.js".

To get started, create a virtual environment and install the Python dependencies (Django). I use Poetry:

poetry shell
poetry install

Next, change into the frontend directory, install the Node dependencies, build the Vue.js application, and run the Vue dev server. I use Yarn:

cd frontend
yarn install
yarn build
yarn serve

Finally, run the Django development server in a different terminal:

./manage.py runserver

Now you can view the production Vue application at 127.0.0.1:8000, and the development application at localhost:8080. Both will use the local Django instance as the API.

Thanks for visiting!

You can’t perform that action at this time.