Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikebz/djangovue
a starter project with Django and Vue.js
https://github.com/mikebz/djangovue
django vue vuejs2 webpack3
Last synced: about 1 month ago
JSON representation
a starter project with Django and Vue.js
- Host: GitHub
- URL: https://github.com/mikebz/djangovue
- Owner: mikebz
- License: mit
- Created: 2017-09-15T05:38:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-10T18:34:50.000Z (over 3 years ago)
- Last Synced: 2024-09-28T22:08:12.128Z (about 2 months ago)
- Topics: django, vue, vuejs2, webpack3
- Language: Python
- Size: 24.4 KB
- Stars: 17
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# djangovue
![Vue.js Logo](https://github.com/mikebz/djangovue/raw/master/frontend/img/logo.png "Vue.js")This is a starter project for Django with Vue.js. I fell in love with the readability you get in Vue.js and
decided to create a project where all components are laid out in the most readable way.Note that this doesn't have features like hot reloading for webpack, but it's a good webpack starting point to build on.
## How to get started?
1. Get a copy of the repo on your machine
```
git clone https://github.com/mikebz/djangovue.git
cd djangovue
```2. Set up virtual environment
```
python3 -m venv venv
source venv/bin/activate
```3. Install the necessary libraries.
```
pip install -r requirements.txt
npm install
```4. Build the Vue.js front end.
```
npm run build
```5. Run the Django project
```
python3 manage.py runserver
```At this point in time you should be able to navigate to your localhost:8000 and see a template rendered. You can also run
the `npm run watch` in a separate window if you want to rebuild your frontend. Note that for simplicity there is no hot
reloading so you would need to refresh the page when you save your front end files.## Sources
This only worked because people before me created some wonderful examples.
- https://github.com/djstein/vue-django-webpack
- https://github.com/ezhome/django-webpack-loader