django + quasar
-
Hi,
I want to create a fullstack app with Django + Quasar.
Ideally I’d like to keep the developer experience (webpack, hot reloading) while serving everything from a Django app
Is there any reference I can use?I’ve been successful integrating Django + Vue such as in https://github.com/rokups/hello-vue-django
Awesome framework btw!
-
The best way that I can think of to do this would be to have a Quasar / Vue app as the frontend and have it communicate with a Django instance using the Django REST framework (or something similar). See the docs here: http://www.django-rest-framework.org/
Quasar (and Vue to a large extent) isn’t really designed to be served directly from a Django instance. It’s really made to be its own thing that communicates with backends as necessary. If you really wanted to serve HTML from a Django instance, a Material Design CSS library would be more appropriate.
-
We already have a Django + AngularJS app running and we want to migrate client side to Vue.js (we use django-rest-framework btw)
The integration I’m more interested in is the webpack build process and developer experience. In the example that I mentioned above (https://github.com/rokups/hello-vue-django) they use a django module to detect when webpack has finished compiling and update the django templates with the bundle names just created. They also support hot module reloading: django serves templates through one port (lets say 8000) and webpack communicates with the running app through another port (8001) to push the module replacements.
My main difficulty here is that Quasar’s webpack configuration structure is really different: I need to understand it and see where I need to add what, and before going that way I’d rather ask for others experience before.
-
It’s just a guess, but I’d venture to say, you don’t need the serving of the index.html file/ template through django for development purposes. You just need to serve Quasar through one port (and Node) and use another port for the API from Django.
The automation you’d be looking for is putting the generated index.html from Quasar’s build process in that index.html template, so django can serve it later in production.
Scott
-
@javierabadia I am trying to get together django and quasar!
I believe the point is still the same, how to make webpack works as it works with vuejs,
I’ve just asked on Stackoverflow about it. https://stackoverflow.com/questions/65622432/config-webpack-bundle-tracker-from-vue-config-js-to-quasar-conf-jsPlease give a hint if you solve this!
Thanks!