219 questions
-2
votes
1
answer
57
views
'WSGIRequest' object has no attribute 'get' django 5.1.4 [duplicate]
hey guys im new to django and in my first project i trying to save the cart of a visitor in session
when i try to add some product in cart of session i have this error says < WSGIRequest object has ...
0
votes
0
answers
85
views
Django and railway, ModuleNotFoundError: No module named 'mainApp.wsgi'
I deployed my project on railway from GitHub. I searched the internet for a solution, but I can't figure out what the proble is.
link @GitHub https://github.com/DanielThisShouldWork/Dead_Calculator
...
0
votes
1
answer
65
views
Deployment: Procfile with Django Project Structure for more than one App
I need to know how you normally solve this issue.
When you start a project, django creates a folder for the project and a second one inside it with the exact same name and the files like: settings.py, ...
0
votes
1
answer
235
views
No module found [my_app] with Apache and mod_wsgi
This is my directory structure, in /var/www:
team_django
--team_db
---- __init__.py
-----settings.py
-----wsgi.py
My wsgi.py:
import os
from django.core.wsgi import get_wsgi_application
os.environ....
0
votes
1
answer
122
views
Unable to update models with File field on Django admin or through post method
I have a Django application in the production environment. It works fine when I use runserver by IP address, even in the production environment. but when I try to access it through domain it does not ...
0
votes
1
answer
128
views
Multiple python commands does not run from bash
I have a bash script that launches wsgi for python and celery as well. The pythib project launes nicely though celery does not work. Below i incluse two ways of invoking the wsgi project and celery ...
0
votes
1
answer
271
views
Django on Apache2 WSGI using wrong python
I'm trying to run my Django website on Apache 2 using WSGI running Ubuntu 22 server, however I found that it is using the incorrect Python. When I try to connect to the website, it fails, and the ...
1
vote
1
answer
327
views
Django project crashes server when admin backend is accessed
Problem
I am running apache2 on my local ubuntu server. I set up a Django project using django-admin startproject site and set up my virtual host to use a WSGI Daemon process to run the Django project....
0
votes
0
answers
285
views
How do I set up my Django Website using Apache and WSGI
I've joined the unhappy ranks of people who have tried to set up a Django website served by Apache (on Amazon-linux EC2).
I have successfully configured Apache and compiled mod_wsgi against Python3.4 ...
0
votes
1
answer
426
views
How to solve an ImportError: Module "django.middleware.csrf" does not define a "Cs‚rfViewMiddleware" attribute/class
I am working on a django project. After I successfully did the registration and login form, I have logged into the admin panel and shortly after that somehow I got this error:
settings.py
...
1
vote
1
answer
705
views
nginx 502 bad gateway error with Django webapp hosted on AWS EC2
Ever since rebooting my Ubuntu EC2 instance, I have an issue with nginx giving a 502 error for my site. I didn't change any settings before the reboot and the site was working fine before then.
Error ...
0
votes
1
answer
446
views
AttributeError: 'WSGIRequest' object has no attribute 'is_ajax' in Django 4 + highcharts
I'm trying to configure the display of graphs in Django using highcharts and I encounter this error:
AttributeError: 'WSGIRequest' object has no attribute 'is_ajax'
Code:
views.py
import random
...
0
votes
1
answer
315
views
DJANGO WSGI: ModuleNotFound when deploying as monorepo
I am trying to deploy a dockerized django app to digitalocean. It passes the build section, but shows the following error in deploying section: No module named 'backend-server'. 'backend-server' is ...
0
votes
0
answers
181
views
Django runserver error "TypeError: __init__() takes 1 positional argument but 2 were given"
I understand that somewhere 2 parameters are passed when 1 is needed only, but I can't seem to figure out where.
I was in the process of updating Django from 1.9 to 1.11.
Most answers relate to views, ...
0
votes
1
answer
181
views
Uploading files show permission denied (CentOS7 + Apache + mod_wsgi + django)
I deployed a beta version of my django app to DigitalOcean and I am serving it using Apache and WSGI.
Everything works well include static files and 'get' media files(I saved it directly to DB), ...
3
votes
1
answer
1k
views
uWSGI log format to capture request number and count
The default log format includes the request number and number of requests. However I don't see a way to reference those variables in a custom log format.
Any idea how I can sprinkle them in?
(see the ...
2
votes
2
answers
2k
views
Running separate infinite background thread in a python webapp (fastapi/flask/django)
How can i launch an application which does below 2 things:
Expose rest endpoint via FastAPI.
Run a seperate thread infintely (rabbitmq consumer - pika) waiting for request.
Below is the code through ...
0
votes
1
answer
253
views
How to serve a subdomain and the domain on a single django-cms? [duplicate]
Is is possible to serve a subdomain and the main domain on the same django-cms instance ?
For example: how to serve the following submains and the main domain on the same Django-CMS instance ?
abc....
0
votes
1
answer
577
views
XAMPP with WSGI not rendering django page
I am trying to run django on XAMPP Apache server and followed the steps mentioned here. Here are the changes in Apache config:[![enter image description here][1]][1]
When access the application in ...
0
votes
1
answer
2k
views
Pythonanywhere - something went wrong - error running wsgi - modulenotfound error
I am new to django and I am doing a coursera course with little applications deployed on pythonanywhere, which has worked well so far. No I am stuck, because does not load at all. Pythonanywhere says ...
0
votes
1
answer
266
views
Main page with host name is not opening in Django app on live server
I am hosting a Django app on managed server with passenger_wsgi.py file. Lets say my domain name is food.menu , when i visit 'https://food.menu' browser shows me
Not Allowed
but when i visit 'https:/...
3
votes
1
answer
1k
views
StreamingHttpResponse not working with ASGI but work fine with WSGI
I'm trying to use channels for some WebSockets-related stuff, but it keeps loading and not showing any streaming response when I reload my web page. Here is my code which works fine with this setting:
...
0
votes
0
answers
460
views
'WSGIRequest' object has no attribute 'template' (Attribute Error while rendering a class based view in django)
What my view does, is takes an even from id, and returns an html page containing a table of all the details.
It is a simple enough view:
class Edetails(View, SuperuserRequiredMixin):
template = '...
0
votes
1
answer
536
views
fork not supported for subinterpreters error in production
I have deployed a Django project to production that fails to handle requests properly due to python multiprocess in my backend script. The problem is in my contact form in the webpage, where user ...
0
votes
1
answer
978
views
Config Apache WSGI and Django always getting `500 Internal Server Error` - Apache
I'm trying to serve a Django app (helios) with Apache2, but I'm always receiving this "There was an error while handling your request. when trying to access the server. The server have the ...
1
vote
1
answer
545
views
How does Django handles multiple request
This is not a duplicate of this question
I am trying to understand how django handles multiple requests. According to this answer django is supposed to be blocking parallel requests. But I have found ...
0
votes
0
answers
633
views
ModuleNotFoundError: No module named 'mysite' import from wsgi.py
I'm trying to run a python file in a django project and I get this error :
I only get this error on a server and not locally. Locally I did not specify the path.
I'm running the command with : python3 ...
0
votes
0
answers
388
views
How to configure settings to deploy my existing Django project to PythonAnywhere?
I am having a hard time deploying my finished Django project to PythonAnywhere. It looks like it has to do with my Django secret key, which I never seem to handle correctly. The secret key is exposed ...
0
votes
0
answers
440
views
Django for windows, using WSGIPythonPath for multiple instances of Virtual Host
Im using Windows 10
In httpd.conf (Apache) how to use WSGIPythonPath for multiple instances of Virtual Host for different project and ports since WSGIDaemonProcess is not supported on Windows.
httpd....
0
votes
1
answer
1k
views
AttributeError at /update_item/ 'WSGIRequest' object has no attribute 'data'
i was trying to make my first e-commerce website using django and i received this error.
I already search in google but I can't find how to fix it. please help me to find the error.
this is attached. ...
0
votes
1
answer
218
views
Django Apache2 VirtualEnv - no response from server
So I am trying to migrate my app to a new production server. I'm not getting a reply from the server Apache server when I access it. The server is on AWS and it's a standard Apache config with just ...
0
votes
0
answers
773
views
In Python 3.7 ,Django3.1.1 ,Apache/2.4.46 (cPanel) getting ther error : AttributeError: 'module' object has no attribute 'lru_cache'
I am new to deploying the Django project on cpanel.
My cpanel was on python 2.7 but my project need python3.7 so I have installed a separate version of python 3.7 on cpanel by following this tutorial ...
0
votes
0
answers
224
views
elastic bean stalk, django, and wsgipath
I am finding issue with my WSGIPath in my django elasticbeanstalk deployment.
my .ebextensions folder is in root, my django.config file contains the following:
option_settings:
aws:elasticbeanstalk:...
5
votes
2
answers
2k
views
Problem finding .env with WSGI using Django stack with dotenv
I have a Django app and I'm trying to secure my SECRET_KEY using dotenv. manage.py runserver works just fine but the site hosted with apache2 does not work and apache give me the error log:
mod_wsgi (...
0
votes
1
answer
1k
views
Django ModuleNotFoundError: No module named 'mysite.settings' when trying to host application with wsgi server
So I wanted to deploy my first django application on a cherryPy webserver using wsgi. And I have issues with os.environ['DJANGO_SETTINGS_MODULE']. When trying to run application callable it throws ...
0
votes
1
answer
655
views
Run startup code when wsgi worker thread restarts
I have a django project running a wsgi application using gunicorn. Ahhh too much for the python newbie like me.
I have a below gunicorn command which runs at the application startup.
exec ./env/bin/...
14
votes
2
answers
29k
views
Matplotlib created a temporary config/cache directory
Matplotlib created a temporary config/cache directory at /var/www/.config/matplotlib because the default path (/tmp/matplotlib-b33qbx_v) is not a writable directory; it is highly recommended to set ...
0
votes
0
answers
74
views
Django 'WSGIRequest' object has no attribute 'completed_todo'
I get an error WSGIRequest object has no attribute completed_todo when I go to a link in my Django project
Here it is my code:
My models.py:
class Todo(models.Model):
text = models.CharField(...
2
votes
1
answer
280
views
Development wsgi server is getting stuck while returning a HttpResponse() in Django (debug=True)
I am sending username from the frontend using an ajax call to backends login() (in view.py) in django . where first I am verifing and then setting the session variables for the same. After this, I am ...
0
votes
1
answer
351
views
wsgi autoreload for django on windows subsystem for linux
I am trying to get WSGI to auto-reload after any changes to the code in my django project.
Everything is set up and the website runs without errors however for some reason when I modify a python code ...
0
votes
1
answer
895
views
wsgi.py cannot be loaded as Python module Error / No module named 'django.core'
I have configured Django 2.1.15 on Centos 7 with Apache 2.4.6-93., mod_wsgi, Virtualenv and Postgres.
And here is my apache conf file:
<VirtualHost *:80>
DocumentRoot /var/www/
...
0
votes
0
answers
68
views
unicode url path gets error 500 in django production server
I have "myproject" in django that is for mywebsite.com
I have url's such as "mywebsite.com/path1" that is working perfectly in both development (27.0.0.1:8000) and production ...
0
votes
1
answer
796
views
SSL Certificate for WSGI application
I have a Django project that I deployed using only the WSGI server provided by Django(no webserver like apache, ngnix ...).
The problem is that I want to upload an SSL certificate for the HTTPS ...
0
votes
0
answers
72
views
Saving changes of very simple model in admin view fires several errors on GoogleComputeEngine, WHY?
I have an OpenLiteSpeed Django app in Google Cloud Compute Engine which connects a SQLite DB. I've created some models and views, in those views I can show lists and graphics of SQLite data. I am also ...
1
vote
1
answer
827
views
Deploying Django restfule service using WAMP and mod_wsgi
I am trying to deploy an API built on Django rest-framework using mod_wsgi and WAMP.
When I created a new Django project using 'django-admin startproject Predictor' and deployed it on WAMP, it was ...
0
votes
1
answer
2k
views
django w/ uwsgi Fatal Python error: initfsencoding: Unable to get the locale encoding
I am trying to do a uwsgi installation and I get the following error
Fatal Python error: initfsencoding: Unable to get the locale encoding
in my logs.
in my .ini I set the pythonpath
$ cat /etc/...
0
votes
1
answer
2k
views
Facing ModuleNotFoundError: No module named 'blog_project.wsgi'
I am trying to deploy the django application on heroku. The build was successfull however when I launched the application, I faced the import error. " No module named 'blog_project.wsgi'" . The ...
0
votes
2
answers
1k
views
Redirect Django site request on multiple ports with nginx
I have a domain say 'mydjango.com' . When its called i want to handle the request on multiple ports on the same IP. 122.34.55.1:8000 , 122.34.55.1:8001, 122.34.55.1:8002
This is expected for load ...
0
votes
1
answer
160
views
Django, AWS EB ERROR, Your WSGIPath refers to a file that does not exist
I have been trying to deploy my project with AWS EB console, not CLI, and I have encountered this "Your WSGIPath refers to a file that does not exist." again and again. I changed the WSGIPath from ...
0
votes
1
answer
141
views
Target WSGI script '/home/rajeshkumarponnu/Documents/OFFICE/IAB_PROJECT/iab_pro/wsgi.py' cannot be loaded as Python module
I am struggling to deploy the django rest api in apache with wsgi and getting 500 error. Here is my files, please suggest/help me where i am wrong.
Even so many facing same issues and i refered that ...