How to use .vue files in Django project

55 views
Skip to first unread message

Salima Begum

unread,
Feb 25, 2021, 5:55:51 AM2/25/21
to django...@googlegroups.com
Hi all,
I have developed a project by using django and for front end functionality I am using vuejs so, how to use .vue files in django project in my project .vue files are not accepting.

Thanks
~salima

Ryan Nowakowski

unread,
Feb 25, 2021, 5:35:42 PM2/25/21
to django...@googlegroups.com
On Thu, Feb 25, 2021 at 04:24:25PM +0530, Salima Begum wrote:
> I have developed a project by using django and for front end functionality
> I am using vuejs so, how to use .vue files in django project in my project
> .vue files are not accepting.

Can you provide more details like the error messages you're seeing?

You might need to use the Vue CLI[1] to transform the .vue files into .js
that you can then serve using Django's staticfiles. There are several[3]
tutorials[4] online.

[1] https://vuejs.org/v2/guide/single-file-components.html#For-Users-New-to-Module-Build-Systems-in-JavaScript
[2] https://docs.djangoproject.com/en/3.1/howto/static-files/
[3] https://www.valentinog.com/blog/vue-django/#serving-the-single-page-with-django-in-production
[4] https://www.google.com/search?q=django+vuejs

Luciano Martins

unread,
Feb 26, 2021, 6:40:04 AM2/26/21
to Django users
Good morning, in our project we created a folder called FRONTEND and inside it we put all Quasar / VueJs code and used the DRF (Django Rest Framework) to consume Django data.

RANGA BHARATH JINKA

unread,
Feb 26, 2021, 8:40:41 AM2/26/21
to django...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/04d66d78-f98a-42ed-975c-c41b8b48abf8n%40googlegroups.com.


--
Thanks and Regards

J. Ranga Bharath
cell: 9110334114
Reply all
Reply to author
Forward
0 new messages