Questions tagged [django-webpack-loader]

Django webpack loader is a library in webpack that takes the output generated by webpack-bundle-tracker and use the generated extract in django.

31 questions
1
vote
1 answer

Refused to execute script from 'bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled

I have an application with CRA with frontend and django backend. I use react-app-rewired to override webpack configuration on frontend so that to save output from webpack-dev-server for django to use. But I hit the issue as shown in below…
1
vote
1 answer

django modelformset_factory raises form not valid: id Select a valid choice. That choice is not one of the available choices

i am trying to create a student attendance sheet in django using django modelformset_factory...but when i save the formset it thows me the id is not valid here is my implementation i have two models one StudentAttendance and StudentClass: 1:…
1
vote
0 answers

Vue server and django running on same machine, django server not able to fetch client files

I am trying to run vuejs server and django server on a same machine. It works very well on my local machine where django by default runs on http://127.0.0.1:8000 and vue.config.js has public path listed as 0.0.0.0:8080. But when I run this on my…
Praveen
  • 46
  • 7
1
vote
0 answers

How can I designate 'url' of 'BUNDLE_DIR_NAME' correctly?

I'm using Django and react with webpack While setting up WEBPACK_LOADER in settings.py, I've faced the problem! My file tree is like this. My File Tree Cebula4 - back - manage.py - front - bundles -…
1Sun
  • 2,305
  • 5
  • 14
  • 21
0
votes
3 answers

KeyError at / 'assets' and ModuleNotFoundError: No module named 'webpack_loader'

When I am at http://127.0.0.1:8000/ I'm getting this error KeyError at / 'assets' In settings.py Installed apps INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', …
AnonymousUser
  • 690
  • 7
  • 26
0
votes
1 answer

Django Template Syntax Error - Django Webpack

I'm working on a django webpack bundle. I got a ready template on github. I made a few changes on it. I prepare for future use according to my own file hierarchy. But I am having a problem with template synxtax. First, there is base.html in my…
user8886201
0
votes
1 answer

How can i load changes to my code in a Vue app?

I deployed a Django+VueJS app that uses django webpack loader in order to render Vue apps in my Django templates. I used Nginx and Gunicorn to deploy the app to a DigitalOcean VPS, everything works without any problem but i have some doubts on how…
JayK23
  • 287
  • 1
  • 15
  • 49
0
votes
1 answer

Loading MEDIA_ROOT files with Django Webpack Loader

After I setup a vue frontend with a django webpack loader, the media files are not rendering. settings.py STATIC_URL = '/static/' MEDIA_URL = "/media/" MEDIA_ROOT = os.path.join(BASE_DIR, "media") STATICFILES_DIRS = (os.path.join(BASE_DIR,…
yvl
  • 620
  • 7
  • 25
0
votes
2 answers

Changing API endpoint between development and production (React/Django)

I am developing a react app inside of a django project and connect them using the Django rest framework. For making API calls from within the react app I am using axios. Now in my development environment, I obviously call a localhost URL to access…
Philipp K
  • 193
  • 2
  • 18
0
votes
1 answer

Django Webpack Loader Apache2

I have a project with webpackloader djangorest-react js , all works fine in production but i need to launch django server everytime... My goal is to run django and my react project with apache2 by mod_wsgi, i can run the django project but the react…
0
votes
1 answer

Why we need `django-webpack-looader` to serve Vue SPA application through django?

I want to serve my Vue application (as SPA) through django, and I passed across this article. The author use django-webpack-loader to achieve this, but is not adding a simple TemplateView around dist/index.html will do the job: url(r'^app/',…
0
votes
1 answer

Webpack not finding file

I'm recently following a tutorial on using webpack with Django and for the life of me the local host just can't find my bundle file This is what the console shows when I inspect on my local host: GET http://127.0.0.1:8000/static/bundles/bundle.js…
Lucy Gu
  • 369
  • 1
  • 3
  • 10
0
votes
1 answer

my main.css is not rendering,I am using multiple entry points webpack.config

My main.css is not rendering,I am using multiple entry points in webpack.config.js file % load render_bundle from webpack_loader %}
0
votes
0 answers

How to get webpack file in django?

I've made a webpack file(as MainPage.js) in output folder which I set up on webpack.config.js However, when I access to my main page it says there is no MainPage.js. What's wrong with it?? (I'm using Django on backend and React on…
1Sun
  • 2,305
  • 5
  • 14
  • 21
0
votes
0 answers

How to get webpack js file correctly in django?

I think my problem is more or less a simple question, but I'm not still accustomed to using webpack and so on, So your advice will be helpful to me. (I'm using Django on backend and React on frontend) Hierarchy of folder Cebula4 - back …
1Sun
  • 2,305
  • 5
  • 14
  • 21