Questions tagged [django]

Django is an open source server-side web application framework, written in Python. It is designed to reduce the effort required to create complex data-driven websites and web applications, with a special focus on less code, no-redundancy and being more explicit than implicit.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Unsure about validity of NGINX .conf settings

This NGINX config file appears to be working as expected, but when checking for syntax validation, an error is identified "upstream" directive is not allowed here in /etc/nginx/sites-...
user avatar
  • 184
0 votes
0 answers
40 views

How to assign a local IP address to a public IP/Port address using NGINX with UWSGI?

I have a web application that is running on a local server using a local IP address and port 80. However, I would like to be able to access the web application from the Internet. Thus, I have got a ...
user avatar
0 votes
0 answers
31 views

Is there a way of knowing if a Django server is running in DEBUG mode?

Given a project running Django on a cloud platform behind NGINX or Apache, is there a way of knowing: the project is indeed using Django as a framework whether DEBUG is set to True or False For ...
user avatar
  • 111
0 votes
1 answer
414 views

Start Django App When Windows Starts

I would like to start a Django App automatically when Windows starts. I created a .bat file (that I intend to execute using Task Scheduler) containing the following: C:\Users\HP\project-name\Scripts\...
user avatar
0 votes
0 answers
25 views

django images failing to load on EB aws using apache

I have set up a django app on AWS elastic beanstalk using apache. problem I have is when logging into django admin, I cannot get to /admin/images on the app. the apache logs error [proxy_http:error] [...
user avatar
0 votes
0 answers
206 views

django celery shows the error -- Process "ForkPoolWorker-1" pid:41 exited with "exitcode 70"

I have a celery scheduled task in my django which runs at 4 PM. After the implementation of this scheduled task it worked smoothly and doesn’t shows any error. Yesterday my celery task was failed due ...
user avatar
0 votes
0 answers
37 views

How to run this premade django docker image (pinry)

I want to run a Pinry server on my local network so I can make pin boards in private. I haven't gotten it to work somehow. I have not used django or docker before so it is likely very simple. As per ...
user avatar
  • 308
0 votes
0 answers
51 views

Django gunicorn nginx cannot connect each other

I want to deploy my django app on a linux server. For this I use gunicorn (version 20.1.0) nginx/1.18.0 Django==3.0.5 sites-available/bunn_nginx.conf upstream django { server unix:///home/app/...
user avatar
1 vote
0 answers
372 views

Python manage.py permission denied in Windows

I created a Python project and then tried to run the command python manage.py runserver in VS Code terminal but it keeps on displaying permission denied.
user avatar
  • 11
0 votes
1 answer
52 views

multiple django + reactjs, two web server setting?

I have multiple project set )WebApp_A Django_A + ReactJs_A )WebApp_B Django_B + ReactJs_B For now I am using apache for ReactJS_B and use nginx for Django_A mydomain.com comes to Apache(ReactJS_A) ...
user avatar
  • 497
0 votes
0 answers
3k views

gunicorn.service: Failed to determine user credentials: No such process

I keep getting an error when trying to set gunicorn with my django project ● gunicorn.service - gunicorn daemon Loaded: loaded (/etc/systemd/system/gunicorn.service; disabled; vendor preset: ...
user avatar
0 votes
1 answer
30 views

How to kill running Ports using Linux Console?

In my scenario I am try to run Django code using ~$ python manage.py runserver command. While running it, I get: port 8000 already running How can I kill the running process of port number?
user avatar
0 votes
1 answer
2k views

gunicorn.service: Failed at step EXEC spawning {PATH}/env/bin/gunicorn: Permission denied

After creating my gunicorn.service file, I ran sudo systemctl enable gunicorn.service sudo systemctl start gunicorn.service However, I receive the following error below. This is the log returned ...
user avatar
0 votes
1 answer
41 views

How can I handle a sensitive settings file during deployment?

I am deploying a Django application to AWS using the following steps: Push updates to GIT Log into my server. Pull updates from GIT The issue I am having is my settings production.py file. I have it ...
user avatar
  • 3
0 votes
0 answers
159 views

can not connect to my vps server vis ssh , Permission denied

i've looked similar question but none of them worked in my case 've build a website using django and apache but today it suddenly raised an error when i try to open my website it show only Apache2 ...
user avatar
0 votes
1 answer
131 views

Transferring django app to server through scp?

Firstly I want to note that I am both beginner in deploying Django app and Linux overall. I saw that it's possible to transfer Django app to the server through SCP in one of Corey Schafer's videos ...
user avatar
  • 1
1 vote
0 answers
1k views

Django Invalid HTTP_HOST header from suspicous domain

I am getting warnings on my Django deployment server. To be precise: Invalid HTTP_HOST header: 'ip.ws.126.net:443'. The WHOIS entry for this domain is pretty opaque just as the domain: https://www....
user avatar
1 vote
0 answers
314 views

I can't connect to django in a Docker container (but doing the same thing works for Apache)

I have been going around and around trying to run a simple Django application in a container and then access it from a browser. I googled and read dozens of postings explaining how to to do it and ...
user avatar
  • 11
0 votes
2 answers
24 views

Opening a .py file directly

While working with Django, I have to modify views.py and a variety of other files. What's bugging me is that I have to open these .py files through the python IDLE application every time and then ...
user avatar
0 votes
0 answers
57 views

after installing Python3 and Django in Windows 7, problems with web page display

I have some trouble after installing django in Windows. The admin page, "http://127.0.0.1:8000/admin/" displays in text mode. I suspect this is a problem with the environment variables, but I can't ...
user avatar
  • 1
2 votes
0 answers
225 views

django + uwsgi + nginx, python files download instead of parse/execute

I am trying to get a new webserver up and running. php files will parse correctly but python files will not. I changed the file to +x, an this has no effect. I am not getting any errors in my logs ...
user avatar
  • 41
1 vote
0 answers
51 views

Django apache2, & wsgi without vitrualenv (global installation)

I'm running django app globally on Ubuntu server running apache2. Below is my configuration file: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ...
user avatar
  • 11
0 votes
0 answers
43 views

isplaying data of an existing database in Django admin site

I'm struggling with displaying data of an existing database in Django admin site. I created a model reflecting the table in an existing database, register in admin.py, run the makemigrations and ...
user avatar
0 votes
1 answer
79 views

Django HoneyPot Change Password Issue

I would appreciate if you could give me any clue! As I don't have experience in this, probably I've misunderstood smth. I'm using honeypot, more specifically honeypot.middleware.HoneypotMiddleware ...
user avatar
1 vote
0 answers
38 views

Run Django cause Pycharm behave unexpectedly

After running python manage.py runserver in terminal, PyCharm behave unexpectedly. Code analysis stop working and after restart PyCharm it hangs and only compute reboot fix issue. PyCharm ...
user avatar
0 votes
0 answers
121 views

How to use custom domains without specifying A records or Nameserver

I have a Django website hosted on Heroku and I want to host to use a custom domain bought on GoDaddy. Heroku does not provide any free A records or free Nameservers, so how am I supposed to use my ...
user avatar
  • 101
1 vote
1 answer
1k views

pipenv ModuleNotFoundError: "No module named 'datetime'" after reinstalling Python

I had recently tried reinstalling Python, and after Python was installed successfully, after activating my virtual environment using pipenv shell whenever I try to run python manage.py I get the ...
user avatar
0 votes
2 answers
956 views

How do I get a channel layer from Django-Channels lib to communicate with Redis in Oracle VM using Docker Toolbox?

I am using Django Channels and am trying to make sure that a channel layer can communicate with Redis. However, I have Windows 10 Home edition which means I had to use Docker Toolbox to create an ...
user avatar
2 votes
1 answer
4k views

Apache2 (reverse proxy) + Django + Gunicorn

I have a problem with my Apache2 web server as reverse proxy server. The simplified server setup with my domain "example.com" looks like this: If clients now go to the page https://example.com/...
user avatar
  • 23
1 vote
0 answers
61 views

I am unable to find Django while creating a project in Pycharm

I tried uninstalling and installing it and also tried with older versions but I still have same issues. I have manually created a virtual environment before and tried but didn't work but I can see ...
user avatar
1 vote
1 answer
7k views

Could not find a version that satisfies the requirement Django==2.0.6 (from versions: )

I am following a tutorial on https://djangogirls.org/ and I am frustratingly running into issues installing django or any other package. Per the tutorial, after creating and activating a Virtual Env, ...
user avatar
  • 21
0 votes
1 answer
256 views

Django on Ubuntu Linux: "Could not find a version that satisfies the requirement"

Trying to install django on Linux Ubuntu (via virtual machine). Python3, pip3 successfully installed (because I can successfully verify the version of each on my machine). > sudo apt-get ...
user avatar
1 vote
0 answers
1k views

Docker is not reading static files from Django

I am facing a problem that has consumed a chunk of my time already. I am trying to deploy an application using docker and django but I cannot read the static files once it says it cannot be found. I ...
user avatar
0 votes
1 answer
65 views

All browsers load local CSS but not applying it

All browsers in my computer doesn't apply local CSS but it loads it if it was from website. Here as you see it loads CSS, but does not apply it: But if I changed one character at least, then it is ...
user avatar
1 vote
0 answers
69 views

Django compressor issue - media assets from the forms.py won't update in the front-end django template

We are currently experiencing an issue with the Django compressor: We have an app that has forms.py and its media assets from the forms.py won't update in the frontend django template (only stuff ...
user avatar
0 votes
0 answers
189 views

LDAP Authentication not working in Graphite

I have Installed Graphite in RHEL7 server. I have done the LDAP configuration in Graphite local_settings.py ## LDAP / ActiveDirectory authentication setup USE_LDAP_AUTH = True LDAP_SERVER = "ldap-...
user avatar
0 votes
0 answers
3k views

Permission denied accessing volume in docker-compose

I've followed this tutorial for deploying a web application using django, gunicorn, nginx and postgresql. When working with the empty application in the tutorial, everything seems ok, but then I ...
user avatar
  • 81
0 votes
1 answer
9k views

Django gunicorn service not working, Got error failed at step EXEC spawning {PATH}/env/bin/gunicorn: No such file or directory

I am trying to setup a django project in local machine with gunicorn, nginx. I did setup gunicorn /etc/systemd/system/gunicorn.service by following this tutorial https://www.digitalocean.com/...
user avatar
4 votes
3 answers
12k views

Where does django look for SQLite instance? (SQLite 3.8.3 or later is required (found 3.7.17))

I've cloned a django project to a vps and I'm trying to run it now, but I get this error when trying to migrate: $ python manage.py migrate django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 ...
user avatar
  • 143
0 votes
1 answer
1k views

AWS ACCESS KEY ISSUE

I accidentally pushed my access keys up to github and amazon contacted me with instructions on "fixing" the issue. I messed up and accidentally deleted the access key, thinking thats what i was ...
user avatar
1 vote
2 answers
825 views

Incoming Host Header Doubled

I'm using an Nginx webserver on an Ubuntu 18.04 server with Gunicorn and Django. My server is currently down because the incoming host header is always duplicated. When I make a request to the ...
user avatar
  • 13
0 votes
1 answer
84 views

After renewing letsencrypt SSL certifications, server only returns response code 400

I recently tried to renew my letsencrypt ssl certificate, but once I did that, I’ve been coming down with 400 server responses whenever I try to connect to my website. I’ve tried absolutely everything ...
user avatar
  • 13
0 votes
1 answer
545 views

Nginx gives 404 for some files

Getting 404 for /static/js/admin-extra.js but not for other files, like /static/admin/js/core.js All static files are copied by Django to the static file directory from both my app, and third party ...
user avatar
3 votes
0 answers
226 views

Why is my Django server still serving old files after changing filenames and clearing cache?

I have made some changes to my Ubuntu server running Django with Apache. I modified some HTML, JS and CSS files, but nothing has changed. Things I have tried: Clearing browser cache Renaming files ...
user avatar
0 votes
1 answer
1k views

django 2.1.7 installation failed on python 3.4

Downloading Django-2.1.7-py3-none-any.whl (7.3MB): 4.3MB downloaded Downloading/unpacking Django Requirement already up-to-date: pytz in /usr/local/lib/python3.4/dist-packages (from Django) ...
user avatar
  • 101
1 vote
0 answers
728 views

Could not send email with password reset using SendGrid with Django on PythonAnywhere

Could someone point me in the right direction on how the password reset, that is built-in with Django admin, is going to send an email for the password reset. I am using the following: PythonAnywhere ...
user avatar
  • 11
0 votes
1 answer
577 views

Django CMS: 'NoneType' object has no attribute 'subject_location' after deleting an image plugin

Im exploring Django CMS on Divio for one of my sites. Running into an issue when I delete an image that is being used by a picture plugin. Getting: """ 'NoneType' object has no attribute '...
user avatar
1 vote
1 answer
259 views

Django + Daphne + Caddy + File Upload = 413 Error

I have a Django web application that is deployed, production, with Caddy. IN production, I use Caddy as a reverse proxy pointing to daphne which is pointing to my Django app. However, when I try to ...
user avatar
  • 11
0 votes
1 answer
1k views

cannot curl on localhost, django server

I make a draft django website with django-admin startproject mysite I go into the directory and run the server python manage.py runserver I check localhost:8000 with my browser and it shows the ...
user avatar
2 votes
1 answer
438 views

How to connect Django running in a container with datadog agent running in host

I followed all the instructions in datadog but can't get it to work. Steps I have done so far: I followed the instructions in Tracing Docker Applications, and configured my Django with something like:...
user avatar
  • 131