31 questions
2
votes
3
answers
1k
views
django webpack loader render_bundle error
We have a legacy Django-webpack app using Django webpack loader. The app code moved into a /app directory and the render_bundle stopped working. The error message is
File "/usr/local/lib/...
1
vote
0
answers
223
views
Django webpack_loader: `Regex` Undefined?
I've updated a Django app to Python 3.9 and Django 4.0, and I'm getting an error on launch:
TypeError: expected string or bytes-like object
I tracked it down to this function in python3.9/site-...
1
vote
0
answers
154
views
Django, Webpack and Heroku: Error reading /app/webpack-stats.json
I'm trying to use Django with Webpack on Heroku via django-webpack-loader. After pushing the files from the repository to Heroku, I run webpack to generate the static files in /dist as well as webpack-...
2
votes
0
answers
195
views
Django, webpack and NPM. Packaging seems to work, but can't access the code
Related questions appear not to be applicable in my case. As I do not understand where the issues lies, perhaps I am just not finding the solution.
I have some experience with Django, but this is my ...
1
vote
1
answer
485
views
Django webpack loader vuejs+typescript Refused to execute script frombecause its MIME type ('text/html') is not executable
I am using Django as backend and Vue3 as frontend in my application. In development server i did not have problem but now in production i am having problems to render the page. I have followed all the ...
0
votes
3
answers
2k
views
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....
0
votes
1
answer
1k
views
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 ...
1
vote
1
answer
2k
views
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.
...
0
votes
1
answer
274
views
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 ...
0
votes
1
answer
207
views
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, &...
3
votes
1
answer
370
views
How to import a variable from django into vue.js instance
I want to import a variable from a django generated html page into my App.vue component.
My goal is to pass a String, which represent the user AuthGroup, eg. 'milkman', 'hairdresser' or 'supplier'
The ...
0
votes
2
answers
2k
views
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 ...
4
votes
1
answer
1k
views
Django webpack loader: how to refer to static images compiled by webpack
I'm setting up webpack for a a Django application, for which django-webpack-loader appears to be the obvious choice. I can compile my js and scss files just fine, but I've hit a wall when it comes to ...
0
votes
1
answer
145
views
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 ...
0
votes
1
answer
410
views
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/...
1
vote
1
answer
355
views
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 ...
0
votes
1
answer
1k
views
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:
...
2
votes
1
answer
1k
views
how to use VueJs components in Django using django webpack loader?
I followed this tutorial and integrated Django and VueJs using django-webpack-loader, now the main.js output from django-webpack-loader is loading to my index.html
This is my project directory ...
0
votes
1
answer
664
views
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 %}
<!DOCTYPE html>
<html>
<head>
<meta name='...
1
vote
0
answers
248
views
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 ...
2
votes
2
answers
2k
views
django-webpack-loader not rendering react app using react-app-rewired
I'm working on tying my react(16.6.3) and Django(2.0) apps together. Right now I'm just working to get the dev server working and will focus on production later. I've been following a handful of ...
0
votes
0
answers
168
views
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 ...
0
votes
0
answers
95
views
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)
...
1
vote
0
answers
171
views
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
-...
0
votes
0
answers
109
views
Why BUNDLE_DIR_NAME of webpack is shown wrongly ?
I'd like to use webpack in Django
Then, I set up like this.
WEBPACK_LOADER = {
'DEFAULT' : {
'BUNDLE_DIR_NAME': 'front/bundles/',
'STATS_FILE': os.path.join(BASE_DIR, '...
3
votes
0
answers
4k
views
Chunk files not calling/ loading in the browser
Trying to use reactjs + django webpack loader + webpack 4.
Everything builds perfectly main and other chunks files are generated successfully.
Unfortunately, page getting blank and its seems like ...
10
votes
1
answer
14k
views
React- Webpack: Cannot read property 'tap' of undefined
I have a React application configured with Django Application. I have different webpack config files for development and production, When I run "npm run start", it gives me error that:
Cannot read ...
4
votes
1
answer
1k
views
Django + Vue with multiple apps
There are plenty of tutorials and helpful posts how to use Django and Vue properly (in various options) all over the Internet.
But I didn't find a single one who describes how to create a Django ...
6
votes
2
answers
3k
views
Why should we use django-webpack-loader?
I use both webpack and django. Now I move bundled assets to /static/ directory of django each time, so I'd like to make more effective process.
I read some articles and many people recommend to use ...
2
votes
1
answer
3k
views
'webpack_loader' is not a registered tag library
I am starting to learn some react, and trying to learn how to combine ReactJS and Django. I am currently following the proposed tutorial here
After setting up the django urls, and installing django-...
7
votes
3
answers
2k
views
Webpack setup with Django
I working on a Vue app in Django via django-webpack-loader, running locally I'm able to get it to work by using the following in my base.html file:
{% load render_bundle from webpack_loader %}
...
......