Questions tagged [django]
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
161
questions
1
vote
1
answer
264
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 * * * /...
1
vote
2
answers
2k
views
Difference between "pip install sompackage and python pip install somepackage" commands
I had to install Sphinx on Ubuntu for use with python (django) and I came across this two commands: pip install Sphinx, and then I saw this too python -m pip install Sphinx.
Are there any difference ...
1
vote
1
answer
686
views
Django Model to manipulate LDAP Entry [closed]
I am currently working on a project involving Django framework and OpenLDAP. But i ran into a problem.
In my LDAP database, I have a entry named Accounts, with the following attributes:
dn: ou=...
1
vote
1
answer
951
views
Setting up Django and Posgtresql on ubuntu
I am running Kubuntu 12.04 LTS.
I have been reading the django book and I have hit a snag where I'm unable to set up posgresql to work with the django app.
I have installed both python-postgresql ...
1
vote
1
answer
242
views
Django 1.4 dependency when packaging a Precise application
I am trying to package a program I wrote that depends on Django 1.4.1 in Ubuntu 12.04. As Django 1.4.1 isn't available in Precise I am wondering if it is best to:
Package up Django 1.4.1 and drop ...
1
vote
1
answer
420
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 ...
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]:...
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 ...
1
vote
1
answer
2k
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 ...
1
vote
3
answers
5k
views
different pip version conflicts how can I solve this
$ sudo -H pip3 install django~=1.11.0
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 666, in _build_master
ws.require(...
1
vote
1
answer
1k
views
pip install is stuck at cloning - is it possible to download the package separately, store it and install it from that?
I am trying to install and configure a Django/MongoDB setup.
I'm using these instructions
These commands worked fine:
pip install git+https://github.com/django-nonrel/djangotoolbox
pip install git+...
1
vote
1
answer
343
views
Why do I need to install every Django dependency after upgrade to Ubuntu 16.04 (Xenial Xerus)?
I upgraded from Ubuntu 14.04 (Trusty Tahr) to 16.04 (Xenial Xerus), and I installed Python 3.4 and Django 1.9.2.
Now when I run a Django Project with:
python3.4 manage.py runserver
I get import ...
1
vote
2
answers
6k
views
Running python script from django views
Want to run a python script from django views. And I dont want to wait till the script execution. The python script should do its work in the background and in the meanwhile, I will send response to ...
1
vote
1
answer
8k
views
"No module named 'pysqlite2'" Error
I am trying to run a server, but I get this error:
$ python manage.py runserver
Traceback (most recent call last):
File "/home/user/Demo/lib/python3.4/site-packages/django/db/backends/sqlite3/base....
1
vote
1
answer
2k
views
pip produces warnings upon trying to install Django and setuptools- Xubuntu 14.04 x64
I'm trying to set up Django on my laptop for web development testing. When I run
sudo pip install Django
I get the following errors/warnings:
The directory '/home/aaron/.cache/pip/log' or its ...
1
vote
1
answer
2k
views
'module' object has no attribute 'PY2'
I am using ubuntu 14.04, was trying to install python-memcache. I have got an error like
Downloading/unpacking python-memcached
Downloading python-memcached-1.53.tar.gz
Cleaning up...
Exception:
...
1
vote
1
answer
2k
views
Python - pip module install 2.6 instead of 2.7
I use Django 1.3 with Python 2.7 on Ubuntu 10.04.
$ python
Python 2.7.1 ...
>>>
I'm trying to install the python module django-grappelli.
$ pip install django-grappelli
Requirement ...
1
vote
2
answers
12k
views
How to solve the DJANGO_SETTINGS_MODULE error?
i installed wsgi, python, apache and django on my Ubuntu 10.04 but when i
django-admin.py runserver
i get this error
Error: Settings cannot be imported, because environment variable ...
1
vote
0
answers
390
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 ...
1
vote
0
answers
339
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 ...
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 ...
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 ...
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 ...
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....
1
vote
0
answers
140
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 ...
1
vote
0
answers
840
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 ...
1
vote
1
answer
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:
...
1
vote
0
answers
3k
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
1
answer
2k
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....
1
vote
0
answers
588
views
Pip Error while installing: virtualenv, django and upgrading pip [duplicate]
I'm trying to start a Django project, don't know what I'm doing to be honest. I started following the tutorial. Installed python 3.6 (altough this shows 2.7, probably came with ubuntu). And then ...
1
vote
1
answer
2k
views
celery django daemonization
I'm trying to use celery with Django, and I was able to set them up so, that I can start celery with
(virtualenv)$ celery -A dbbs worker -l info
and it does tasks sent by Django server.
Now I was ...
1
vote
0
answers
1k
views
Trying to setup Django site, but always getting the Apache default page
I am moving my Django site to a new server and I cannot get it running on the new server. I had it running previously, but I fumbled through that a year ago and don't really remember the details.
...
1
vote
0
answers
177
views
Unable to install Pillow on Ubuntu 15.10
I m trying to install pillow via the command :
pip install pillow
on my Ubuntu machine but I repeatedly get this error:
command 'x86_64-linux-gnu-gcc' failed with exit status 1
How can I fix this ...
1
vote
0
answers
303
views
bash command doesn't run in upstart
I'm setting up a django project following H. Percival's TDD.
By the end of the chapter I setup an Upstart process to start the server with Gunicorn using Nginx as well.
My upstart file /etc/init/...
1
vote
1
answer
160
views
Getting correct version of the package python-django
I have python-django package installed on Ubuntu 14.04. However the version numbers I get with dpkg -s and django-admin --version does not match.
$ dpkg -s python-django | grep Version
Version: 1.6.1-...
1
vote
0
answers
135
views
Eclipse PyDev won't recognize Django
I recently got involved in a project that requires the following:
Python 3.3 or greater
Django 1.8 or greater
Eclipse as IDE with the PyDev plug-in
The part where I have a lot of trouble is the ...
1
vote
0
answers
107
views
unable to setup django in production on EC2 instance running Ubuntu 14.04
I have set up an EC2 instance with Ubuntu and able to login via ssh.
Now I have installed Apache, MySQL (worked fine). I need to install Django and configure it to run smoothly with apache. I have ...
1
vote
0
answers
386
views
Ubuntu 14.04 + pyes 0.99.2 + Elasticsearch 1.2.1
Im using Ubuntu 14.04 in a Django Project with ElasticSearch and after I install pyes with pip install pyes==0.99.2 and try to acces to the ElasticSearch page, it returns an error from the OS:
'...
1
vote
2
answers
935
views
How to install django on ubuntu? [duplicate]
Im trying to install Django.
When I use sudo apt-get install pip, there is an error pip not found.
I used sudo easy_install pip, there is an error command easy_install not found.
I used sudo apt-...
0
votes
2
answers
21k
views
how to make python manage.py runserver still running if terminal close? [duplicate]
python manage.py runserver 0.0.0.0:8000
how to make this command running if terminal close
for now i use screen and it works any other way to do that?
i mean for production how to link it to ngix or ...
0
votes
2
answers
2k
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
1
answer
2k
views
environment variable not working
i am doing a python-django project, And what i want to do is, i want to set
variables like password,db_name etc as an environment variable. And i want
to access it as os.environ["db_name"]
i ...
0
votes
2
answers
4k
views
Python 3.5 is unable to access packages installed with pip3 like django
I have both python 2.7 and python 3.5 installed on my Ubuntu 16.04 LTS. I have also installed python3-pip to be used for installing external packages to python 3.5.
Using pip3 I have installed django ...
0
votes
1
answer
770
views
Error while creating a projrct with djangocms -p test1 test1 with exit status 1?
Please help me here. Stocked for 2 days. I tried all methods in internet but however not able to make a djangocms project.
Ubuntu version : Ubuntu 14 LTS
(myPython2.7.9) sameer@sameer:~$ djangocms -...
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 ...
0
votes
2
answers
447
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
1
answer
1k
views
What are the differences between mod-wsgi and libapache2-mod-wsgi-py3?
I am learning about virtual hosting. I have a Django project and need WSGI module. Reading multiple tutorials, I see that people install different packages of mod-wsgi, for example mod-wsgi and ...
0
votes
1
answer
332
views
TangoWithDjango .bashrc edit causing errors
I'm currently doing the Tango with Django module and I've edited my .bashrc as it lists.
Appending
[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc
to the end ...
0
votes
1
answer
6k
views
How to remove django [closed]
Running Ubuntu 10.04 LTS i had a testdrive with django from Sources. But now i want to change to latest django 1.6.
So how to remove the older django 1.4.3?
I ask this after going thru the obvious ...
0
votes
3
answers
16k
views
Error is not recoverable: exiting now
I want to install django. I have the following instructions to do this:
wget "http://www.djangoproject.com/download/1.4/tarball/" -O Django-1.4.tar.gz
tar xzvf Django-1.4.tar.gz
cd Django-...