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
vote
1answer
52 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]:...
1
vote
0answers
87 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 ...
0
votes
0answers
24 views

Ubuntu for pentium dual core [duplicate]

which Ubuntu will be better for my old pc (pentium dual core, 3 gb ram) for using python(update version), Django, other web development tools?
1
vote
0answers
100 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 ...
0
votes
0answers
84 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 ...
1
vote
0answers
67 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 ...
5
votes
2answers
358 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", "...
0
votes
0answers
98 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/...
0
votes
0answers
24 views

(13)Permission denied django apache server [duplicate]

I tried to upload my django project (apache2 + Ubuntu Server). This is my config file: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog /var/...
1
vote
1answer
220 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 ...
0
votes
2answers
229 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... ...
0
votes
0answers
13 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 ...
1
vote
0answers
24 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 ...
0
votes
0answers
34 views

Ubuntu keeps installing postgresql 12.2 instead of 9.5

I am trying to set up a local environment with postgresql 9.5 for my Django app but for some reason pg_config --version keeps saying the version running is 12.2. I've purged all existing ...
0
votes
1answer
210 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/...
0
votes
0answers
48 views

I've Destroyed My Ubuntu Server (18.04)

My noob ways have led me full circle to understand the importance of virtual environments and python/django management within the Ubuntu server. A component of that learning lesson is now that I am ...
0
votes
1answer
199 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 ...
0
votes
0answers
28 views

Why am I still getting apache2 default page?

I have a django project set up to work with apache (but the fact that it's django is not actually super relevant). Say the project has a name, name Now I got a remote machine on aruba (...
0
votes
0answers
19 views

Django app push rejected on Heroku

I'm trying to deploy a django app on heroku but its failing guess its an error on the in requirements.txt file getting below output: please help
0
votes
1answer
375 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 ...
1
vote
2answers
371 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 ...
2
votes
0answers
409 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/...
2
votes
1answer
3k 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. ...
3
votes
1answer
147 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 ...
0
votes
0answers
59 views

Django, PostgreSQL and Peer Authentication

I am setting up a Django site to run through Apache using Mod WSGI. I have setup PostgeSQL to accept local, Unix socket connections, and limit authentication to peer users only. Necessarily I setup ...
0
votes
1answer
612 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 ...
1
vote
1answer
2k 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....
2
votes
2answers
7k 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/...
0
votes
1answer
2k 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 ...
-1
votes
2answers
227 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
0
votes
2answers
911 views

PyCharm Pro ImportError and Broken Virtualenv

Issue: The solution was to uninstall the virtualenv. While I was trying to set-up a Django Project. On the manage.py: ImportError("Couldn't import Django. Are you sure it's installed and " "...
0
votes
1answer
66 views

write a complex text into file(include double quotation and single quotation)

I want write a complex string into a file in python but the problem is my text itself have a command and double quotation and single quotation too so python can't write it and assume its a command too....
2
votes
1answer
1k views

systemctl .service can't read the environment variable

I'm using django and now trying to configure server with nginx and uwsi. now i'm running nginx+socket+uwsgi_emperor well . for running uwsgi i use below command in terminal: /usr/local/bin/uwsgi --...
0
votes
1answer
910 views

Access python os.environ var in virtualenv with sudo?

I am working on a django project where I have to keep secrete information to python's os.environ. by following below link http://barkas.com/2016/set-environment-variables-activating-virtualenv/ code ...
0
votes
2answers
4k views

Mkvirtualenv: command not found 19.04

Trying to install Django Framework. This when I am trying to activate an virtual environment for the very first time: mkvirtualenv test mkvirtualenv: command not found Location of the ...
1
vote
0answers
94 views

Not being able to install the latest version of Django

I tried installing the latest version of django using the following command:sudo apt-get install Django==2.0.5 But this is giving an error saying that the system requirements allow me to install only ...
3
votes
1answer
3k views

How to run Django cron in crontab?

I have a Django application which uses django-cron (https://django-cron.readthedocs.io/en/latest/installation.html), and I need to execute python manage.py runcrons every 5 mins in AWS EC2 running on ...
1
vote
0answers
632 views

facing issue Couldn't import Django. Are you sure it's installed and after installing docker

I continuously get this message: Couldn't import Django. Are you sure it's installed on running this command: python manage.py runserver after installing docker in my ubuntu 16.04. Done with Below ...
0
votes
1answer
170 views

django app deployment without subdomain

I have deployed a django app to the server i have. Let say its ip is 192.168.1.1. So i was able to access the any site there with 192.168.1.1/my_site. I have now deployed the Django App which is a ...
1
vote
1answer
2k views

Unmet dependencies while trying to install python3-pip in Ubuntu 18.04 [duplicate]

lokesh@lokesh-pc:~$ python3 --version Python 3.6.5 lokesh@lokesh-pc:~$ pip3 --version bash: pip3: command not found lokesh@lokesh-pc:~$ sudo apt-get install python3-pip [sudo] password for lokesh: ...
0
votes
1answer
2k views

Cannot install Django using pip

I'm trying to install Django 1.11 on ubuntu 16.04 using pip (python 2.7) I ran the following command: sudo pip install Django but I get: Could not find a version that satisfies the requirement ...
0
votes
1answer
91 views

Advice about installing Django

I have installed Ubuntu Desktop within VMware. Python 3 is working OK. I am starting to feel comfortable working with Spyder IDE. Very soon I would like to install Django. Some Python novice must ...
0
votes
0answers
9k views

I'm getting an “ERROR (spawn error)” when I try to start my celery/supervisor instance

I've gone through how to use celery on my django production server using supervisor. However when I try to start supervisor with sudo supervisorctl start app-celery - it returns: app-celery: ERROR ...
1
vote
0answers
2k views

Permission Denied - Django Deployment on Ubuntu 16.04 with web server Nginx

I am trying to deploy a django website on a Ubuntu 16.04 system using nginx but I am having issues. ERRORS Error I get from my nginx error.log file: connect() to unix:/home/teddycrepineau/...
1
vote
1answer
1k views

The package “software-properties-gtk” needs to be reinstalled, but I can't find an archive for it

I'm using ubuntu 16.04. Whenever I tried to install new package, "The package software-properties-gtk needs to be reinstalled, but I can't find an archive for it." this error is occurred: Thanks....
0
votes
2answers
629 views

source command not working in Bash on Ubuntu 17.10

I am use Ubuntu 17.04 and the following code is not working, although it worked for me in the past. #!/bin/bash APP=personalBlog USER=root cd /opt/src/personalblog/conf/ source /opt/venv/ecomex/...
0
votes
0answers
553 views

nginx+uwsgi+django: why socket doesn't switch on?

I am trying to deploy django with nginx and uwsgi. Nothing works on socket. I tried to change privileges but fruitless. Err_connection_refused. In error.log nothing. How can I solve this problem? ...
0
votes
2answers
1k views

How to install pip? [duplicate]

The error: sudo apt-get install python-pip E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is ...
0
votes
2answers
417 views

while creating module getting error

used this command to create module - python manage.py startapp todos getting this error: Traceback (most recent call last): File "manage.py", line 17, in "Couldn't import Django. Are ...
0
votes
1answer
1k views

Using update-alternatives to assign 'Python' to Python version 3.6

I am trying to use update-alternatives to assign python 3.6 ; Instead it is using python 3.52. update-alternatives --install /usr/bin/python python /usr/bin/python3 1 Any idea what I have to do ...