pawnhearts / django_vue_generator

Generates vue frontend for django rest framework projects: forms for your serializers with validation, methods to call apis with vue-resource.
85 stars 10 forks source link

How to use this package? #1

Open stilet opened 4 years ago

stilet commented 4 years ago

from the command line?

pawnhearts commented 4 years ago

There is demo django project in demo/ directory. Basically: add "django_vue_generator" to INSTALLED_APPS. run "./manage.py start_frontend" that would create "frontend" directory with vue stuff and also urls.py, static/ templates/ folders. So it also acts as a django app. run "./manage.py build_frontend" to build vue project and create template. Add "frontend" to INSTALLED_APPS and include frontend.urls.urlpatterns to your urls.