Questions tagged [django]

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
26 views

How to set up Apache WordPress and nginx Django on the same domain

please tell me I have an Apache server, it has a WordPress website, it is located on the domain smk-stb.ru . I want to install nginx gunicorn Django on this domain smk-stb.ru/Django .I don't want to ...
Denise 's user avatar
-1 votes
0 answers
27 views

Hello, I encountered such an error while creating a package in Python

Traceback (most recent call last): File "/usr/bin/flit", line 8, in <module> sys.exit(main()) File "/usr/lib/python3/dist-packages/flit/__init__.py", line 177, in ...
mehdi najafi's user avatar
0 votes
1 answer
87 views

install packages (for python/django) from a txt file in ubuntu that was meant for windows

i am new but also have a weird problem. i m not deep into programming and i m just a power user, but i have to fix a typo in a python app which would be no problem but to run it again i have to get ...
T Kluth's user avatar
0 votes
0 answers
47 views

pylucene: my webapp django crash after first query pylucene query (version 9.1)

This is messages that I get when I query many times pylucene (2 times). A fatal error has been detected by the Java Runtime Environment: SIGSEGV (0xb) at pc=0x00007fe2d913f03d, pid=3947943, tid=...
zabitstack's user avatar
0 votes
1 answer
216 views

libgdal26 looks broken on the ubuntu 22.04

I've upgraded my system to Ubuntu 22.04 and found problems using the libgdal26 package The libgdal26 package is used to have my Django v.2.2 application working. It works fine on Ubuntu 20.04. After ...
nnseva's user avatar
  • 101
0 votes
1 answer
362 views

Allow only certain files in Apache

The application I built with the django runs on the linux server. As a result of one process I have done in this app, the file.txt is created in this directory: /home/user/app/media/file.txt My goal ...
göktuğ Inal's user avatar
0 votes
0 answers
3k views

gunicorn.service: Failed with result 'exit-code'

I want to use a digitalocean droplet to host a django site. I'm trying to get the app running on the server with gunicorn and nginx, I'm getting a 502 error when I try to hit the server from my ...
ellen's user avatar
  • 277
0 votes
0 answers
302 views

Permission denied (publickey,password) Apache in Ubuntu 20.04LTS

I obtain the above mentioned error "Permission denied (publickey,password)" when trying to connect with ssh using my apache server. The framework I have used is Django and when deploying it ...
Angel del Pino's user avatar
0 votes
0 answers
94 views

I have problem when saving codes in VSCode

I just migrated to Ubuntu. I have a problem when saving codes in VSCode. It keeps asking me to enter the password. It seems that this problem occurs when working with Docker.
Joseph's user avatar
  • 1
0 votes
0 answers
932 views

Permission denied inside a container

I am trying to build Django app container with the following dockerfile and docker compose, but I have permission denied. Since a week I am looking how to solve this error. Dockerfile-prod FROM python:...
Jules Betfien's user avatar
0 votes
0 answers
649 views

Failed to load resource: the server responded with a status of 500 (Internal Server Error) server cannot be a server error When I run it in visual

When I run it in visual, it works, but when I deploy it to the server, the part with the url is https://domain/finance/ $.ajax({ url: 'https://example.ca/finance/', beforeSend : function(...
Master's user avatar
  • 1
1 vote
0 answers
378 views

How do I run daphne (or any python application) from a no-login user?

Bottom Line Up Front For security, I want a "your only purpose in life is to serve butter" user with only enough privileges to execute Daphne and my Django app as a systemd service. How do I ...
claypooj's user avatar
  • 161
0 votes
0 answers
27 views

How to recover deleted files in ubantu which is deleted by -delete comand? [duplicate]

While trying to reset my python Django project migrations due to 1st command my whole is deleted. How can I recover? find . - path "*/migrations/*.py" -not -name " __init.py__ " -...
Amol_G's user avatar
  • 101
0 votes
0 answers
2k views

Django mod_wsgi Apache error 403 Forbidden on Ubuntu 22.04

Django mod_wsgi on Apache application works fine in Ubuntu 20.04 and previous versions with the configuration mentioned below, but when I do the same configuration in Ubuntu 22.04 it gets 403 ...
Deepak Play's user avatar
0 votes
1 answer
123 views

How to open a terminal inside a sub-directory from django

I am learning django. I am stuck with this problem. I want to open a new terminal and execute a command in it. Here is the code that I used to do it. run(["gnome-terminal", "--", &...
Anshul Gupta's user avatar
1 vote
1 answer
52k views

CERTIFICATE_VERIFY_FAILED error

Python Django error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)> Exception Location: /usr/lib/python3.8/...
BlueDogRanch's user avatar
0 votes
0 answers
1k views

gunicorn active: failed, why don`t active gunicorn?

i hav ubuntu server 20.04 and a django project i set /etc/systemd/system/gunicorn.socket Description=gunicorn socket [Socket] ListenStream=/run/gunicorn.sock [Install] WantedBy=sockets.target and /...
amir's user avatar
  • 9
1 vote
1 answer
5k views

Django + Nginx, and Gunicorn: doesn't create gunicorn.sock

I have error when i do systemctl start gunicorn.socket systemctl status gunicorn.socket ● gunicorn.socket - gunicorn socket Loaded: error (Reason: Unit gunicorn.socket failed to load properly: ...
Kirill Inkin's user avatar
1 vote
1 answer
262 views

CronJob Not running

I have prepared a py Script to update my Django database once a day. Trying to use Crontab along with python to run the py script. 0 1 * * 4 /usr/bin/python3 /home/user/folder1/script1.py 0 2 * * * /...
oneclick's user avatar
1 vote
1 answer
2k views

crontab fails to write logs

I'm using crontab to run a python script every minute. This is my how my crontab file looks like: */1 * * * * source /root/.bashrc && source /home/env/bin/activate && python /home/...
Navid777's user avatar
  • 267
1 vote
1 answer
400 views

Python3 cannot be downloaded result, after $sudo apt --reinstall install python3 command.ubuntu 18.04

Whenever I try to update or upgrade anything,broken file /usr/lib/python3/dist-packages/django/contrib/admin/widgets.py is generating SyntaxError:Generator expression must be parenthesized How to ...
Guddi's user avatar
  • 61
-1 votes
1 answer
4k views

gunicorn.service failed with result 'exit-code'

i am trying to deploy my django project on digital ocean, and this error stoping me from doing that MY gunicorn.socket file [Unit] Description=gunicorn socket [Socket] ListenStream=/run/gunicorn.sock ...
Bharathwajan's user avatar
0 votes
0 answers
30 views

Can't push Django project to Heroku

I ran into a issue with Django pushing to heroku because of Python version, when I change in my terminal with sudo ln -sf /usr/bin/python3.6 /usr/bin/python changing the 3.6 to other versions ...
agega's user avatar
  • 1
0 votes
2 answers
336 views

Python3.5 claiming pip installations in virtualenv and its uninstallation causing errors

nmj@pc-nm:~$ sudo apt remove python3.5 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you ...
NMukama's user avatar
  • 356
0 votes
0 answers
1k views

Django Gunicorn got error Request Line is too large

I'm just a new to it. I've been trying to deploy a Django Project on Digitalocean, It worked fine except there was one url that thrown an error: Request Line is too large (4583 > 4094) As I know ...
Tri nguyen minh's user avatar
1 vote
1 answer
2k views

Linux Environment Variables in sudo

I have an AWS ec2 instance running and have hosted a DJango based web app on it. But the problem is I cannot access the environment variables in sudo mode. So while my DJango app's settings file tries ...
Sajjad Ahmed Shaaz's user avatar
0 votes
1 answer
9k views

ModuleNotFoundError: No module named 'django_filters'

When I try to collect all of my static files in my project in one location with python manage.py collectstatic, I get the error ModuleNotFoundError: No module named 'django_filters django_filters is ...
T_hall's user avatar
  • 1
1 vote
1 answer
3k views

How to fix gunicorn.service: Failed to load environment files: Is a directory

When i run sudo journalctl -u gunicorn I get: Oct 14 12:49:22 my-server-thing systemd[1]: gunicorn.service: Failed to load environment files: Is a directory Oct 14 12:49:22 my-server-thing systemd[1]:...
user11339690's user avatar
5 votes
1 answer
6k views

Django crontab is not running, even i setup everything

I am using crontab in django and my OS is ubuntu def my_scheduled_job(): print("1") This is code in settings.py CRONJOBS = [ ('*/1 * * * *', 'stocks.cron.my_scheduled_job') ] If I ...
Huzaifa Zahoor's user avatar
1 vote
0 answers
336 views

ascii error code in django apache2 mysql

I deployed my Django project that uses Apache and MySQL. all apps features work fine, but in an application's views.py, when I try to access it, it raises this error. UnicodeDecodeError: 'ascii' codec ...
artiest's user avatar
  • 113
0 votes
0 answers
404 views

Ubuntu server with apache2 shows index of/

I am fairly new to the world of Ubuntu and apache2. And I've become a little confused of the directories and some other stuff. I have read that the default web directory is /var/www/. I have my ...
Lasse Jonassen's user avatar
1 vote
1 answer
3k views

Deploying a django application and Im having issues with the gunicorn service failing with result "service-start-limit-hit"

I'm deploying on digital-ocean, on Ubuntu 18.04.3. This is my first time deploying a Django application so I have lots of exposure to this new deployment stuff but next to no ability. When I start and ...
user avatar
6 votes
2 answers
6k views

Permission denied to a 777 file

I have a Django app which is configured to write db queries into a /tmp/db.log file. "debug_console_to_file": { "level": "DEBUG", "...
Todor's user avatar
  • 2,368
0 votes
0 answers
1k views

apache2 Ubuntu django : can't upload my django app

I tried to upload my Django 2.2 project, but I get this error in Ubuntu 18.04 when I type cat /var/log/apache2/error.log : (13)Permission denied: mod_wsgi (pid=7692): Unable to stat Python home /root/...
artiest's user avatar
  • 113
1 vote
1 answer
1k views

AttributeError: /usr/lib/libgdal.so.1: undefined symbol: OGR_F_GetFieldAsInteger64

I am getting the error AttributeError: /usr/lib/libgdal.so.1: undefined symbol: OGR_F_GetFieldAsInteger64 when I try to deploy Django project on google cloud can anyone please give the GDAL dockerfile ...
Sarthak  tiwari's user avatar
0 votes
2 answers
4k views

Error: You don't have permission to access that port

I have django application running on ubuntu 18.04 LTS. All of a sudden I started getting below error while running server. $ python manage.py runserver localhost:9000 Performing system checks... ...
Kamal Mehta's user avatar
0 votes
1 answer
507 views

Django Nginx Gunicorn is not taking the changse for new urls

I recently deployed my first project on digital Digital ocean. I got it working and the site is live, but later when I updated some files I got stuck because the new urls I created are not being ...
victor rizo's user avatar
1 vote
0 answers
63 views

Upgrade from 19.10 to 20.04 broke all my venvs. How do I fix them?

I just upgraded my cloud server to 20.04. Unfortunately all of my python django driven websites stopped working because all of my venvs do not work. I can actually activate a venv, but then if I try ...
bradrice's user avatar
  • 115
0 votes
1 answer
860 views

Upgrade to Ubuntu 20 breaking mysqlclient pip package

Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/home/tom/cs344/group8-rw334-project-2/venv/lib/python3.7/site-packages/...
Thomas's user avatar
  • 1
0 votes
1 answer
777 views

updated from ubuntu 18.04 to 20.04 and now my django project is not working

when I activate my virtual environment and enter python manage.py runserver it gives me following error: (myenv) nouman@nouman-G3:~/Documents/test/myshop$ python manage.py runserver Traceback (most ...
Nouman Javed's user avatar
0 votes
1 answer
1k views

nginx fails while the website somehow still works

Description I have built my Django3, gunicorn, nginx, Ubuntu 18.04, Digital Ocean project based on this guide. I only had 1 problem that it does not shows the CSS and all other static files like ...
sogu's user avatar
  • 155
1 vote
2 answers
2k views

Django Project Runs With runserver, But Not With Gunicorn and nginx

I have a django project installed on a Digital Ocean droplet with ubuntu 18.04.3(LTS). I've installed python 3 and Django 3. In my virtual environment, the command python --version returns 3.6.9 The ...
curt's user avatar
  • 133
2 votes
0 answers
2k views

Renewing certificate on server with Let's Encrypt when first issued with docker

I am running a dockerized django on an EC2 instance. I configured nginx in a docker container and got a certificate also in a docker container. (I followed this guide: https://www.humankode.com/ssl/...
Micromegas's user avatar
2 votes
1 answer
5k views

Installing mysqlclient using pip problem

I am deploying Django on DigitalOcean using MySQL and Apache. I am following a step-by-step tutorial on Youtube and everything is fine until when I start installing the python package mysql-client. ...
Kaiss Bouali's user avatar
3 votes
1 answer
177 views

For every Framework new Python Env?

I'm very new to Linux so it could be that I think more in a Windows way. I want to develop something in Python, especially Django and Discord Bot. I have a folder PythonEnvironment where I set up a ...
黒성배's user avatar
0 votes
1 answer
2k views

django-admin --version can not find installed version

I have installed latest django(2.2) using pip3 command. Although it is successfully installed I getting below error for the command- django-admin --version Error: Cannot find installed version of ...
Suparna Podder's user avatar
1 vote
1 answer
8k views

Django + Guncorn + nginx: 111: Connection refused; bad gateway 502

For some reason, it does not work. Do you see any issues in this code? Thank you for your review in advance! Error.log: 2019/11/10 18:02:02 [error] 8761#8761: *1 connect() to unix:/run/gunicorn....
Demid Cerkov's user avatar
4 votes
2 answers
14k views

"pip install requirements.txt" command returns many errors, including 404 not found

(myenv1) root@p-VirtualBox:~/online-exam/onlineexam# pip install requirements.txt Collecting requirements.txt Exception: Traceback (most recent call last): File "/root/online-exam/myenv1/lib/...
Pushkar Kakade's user avatar
0 votes
1 answer
4k views

pam_unix(sudo:auth): authentication failure - Restarting apache2

I am deploying my website on a Linux Virtual Machine (Ubuntu 19) on Linode. My deployment worked when allowed: xx.xx.xx.xx:8000 To allow HTTP/TCP traffic I did: sudo delete allow 8000 sudo allow ...
Magofoco's user avatar
  • 121
0 votes
2 answers
355 views

Visual studio code extensions

Now, i'm trying to install some extensions from vscode, but i have this problem : Failed to install 'batisteo.vscode-django'. Download Manually
محمد علاء's user avatar