Questions tagged [django]
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
159
questions
0
votes
1
answer
3k
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
2
answers
6k
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
0
answers
141
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
1
answer
7k
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
0
answers
844
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
1
answer
350
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
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:
...
0
votes
1
answer
3k
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
1
answer
111
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
0
answers
15k
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
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....
0
votes
2
answers
1k
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
2
answers
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
2
answers
449
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 ...
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 ...
0
votes
0
answers
2k
views
Why is my crontab task (python script) not executing periodically?
I need to to execute a python script for periodically for my django project.So I'm using django_crontab.
This is what crontab -e has
*/1 * * * * /home/myvenv/bin/python /home/user/myproj/manage.py ...
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(...
0
votes
3
answers
2k
views
Django and uWSGI in a Docker container
I'am trying to run a project that uses Django and uWSGI in a Docker container. But I'm new to Docker and uWSGI so I'm not quite sure how I'm supposed to do it.
First I built the project with this ...
0
votes
1
answer
98
views
Do I need Django-2.0.checksum.txt to check if the downloaded tar.gz is not malware ?
I am a newbie in Ubuntu and bash.
I want to install Django on my Ubuntu 14.04 by typing bash commands in the terminal.
I downloaded Django latest release from here https://www.djangoproject.com/...
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+...
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 ...
8
votes
3
answers
31k
views
Failed building wheel for twisted
I made a virtualenv, and a new blank django project. I want to install Channels. I'm using Python 3.6.3. I typed pip install -U channels and this is output:
...
Failed building wheel for twisted
...
...
0
votes
1
answer
2k
views
403 forbidden for django + gunicorn + systemd + apache?
I have followed this guide and this to deploy my django with guniconrn and apache.
But I dont quite get what this guide it says:
(You still need to specify Alias and for the static and
media ...
-1
votes
1
answer
110
views
Add keybinding in Vim
I am using vim pretty often with my work. I am a web developer in Django. I would like to build a keybinding so that each time it is executed it will print the line import ipdb; ipdb.set_trace(). ...
2
votes
1
answer
4k
views
Crontab executes Django command, but nothing happens
(x-posted from StackOverflow)
I have set up cron to execute the following command for django-cron (django 1.10.5, python 3.5, anaconda 4.2.0) in ubuntu 16.04:
PATH=/user/project/projectname/website
*...
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 ...
0
votes
0
answers
581
views
cron tab not working in ubuntu 16.04
I want to automate my application to run on server reboot,
following my code for adding shell script to crontab.
# m h dom mon dow command
@reboot sh ~/start.sh
start.sh contains running the ...
2
votes
0
answers
5k
views
PYTHONPATH environment variable, not found
I have recently updated ubuntu from 14.04 to 16.04 and my PYTHONPATH has apparently been spoiled,
Traceback (most recent call last):
File "./manage.py", line 17, in <module>
"Couldn't import ...
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 ...
0
votes
0
answers
5k
views
NGINX sometimes has (No such file or directory) error
After sometime my nginx server will have an error regarding static files, I'm using NGINX in one server that serve static files and as proxy for Django app on another server.
I copies the static ...
0
votes
1
answer
513
views
Run both Apache with mod_wsgi and Nginx with Gunicorn on same server?
I have a droplet on Digital Ocean that I'm using to host projects and learn about different technology. I already have a couple of things running using Apache2 and mod_wsgi running a Flask app. I'm ...
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.
...
0
votes
1
answer
436
views
Setting up mysqlclient for python3 on ubuntu mate
I am having getting the following error when setting up mysql:
Setting up python-mysqldb (1.3.4-2) ...
/var/lib/dpkg/info/python-mysqldb.postinst: 6:
/var/lib/dpkg/info/python-mysqldb.postinst: ...
0
votes
1
answer
2k
views
problem getting gunicorn.conf file to work in /etc/init
I am trying to configure a gunicorn service.
The content of /etc/init/gunicorn.conf is something like this:
start on runlevel [2345]
stop on runlevel [!2345]
respawn
setuid nero
set gid www-data
...
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
1
answer
635
views
Django 1.8 to 1.9 migrations upgrade problem
Just installed Django 1.9 and am attempting to upgrade my 1.8 app.
After trying to follow the release notes carefully, I still get the following trace (see below).
I thought it had something to do ...
4
votes
1
answer
7k
views
ImportError: No module named context_processors
I installed django-paypal library using pip, but after this my original django version is upgraded and because of this my running code was throwing an error.
So I un-installed django-paypal. But 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
3
answers
2k
views
How to set a server that sends request to my API?
I am working with Linux, Ubuntu and an API made in Django.
My questions are:
How do I configure a server (preferably in apache) in order to send http requests to my API?
How do I 'catch' the data on ...
2
votes
1
answer
4k
views
'mysqld' using a lot of ram in Ubuntu 16.04, is it normal?
I am working on my Django project and recently installed mysql-server on my ubuntu 16.04. It is using a lot of ram approx 800 MB to 1GB, is it normal?
Picture attached :
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
votes
1
answer
1k
views
importerror: no module named bootstrap3_datetime
While runing "python manage.py migrate"
i got error "importerror: no module named bootstrap3_datetime"
but in my pip freeze it is installed.
django-bootstrap3==7.0.1
0
votes
1
answer
772
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 -...
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/...
0
votes
1
answer
1k
views
Terminal blank and not executing commands
I have been trying to set up a Python virtual environment with Django and pip on my Ubuntu VM through the terminal using these guidelines.
I last logged out of the terminal after trying to install ...
0
votes
2
answers
3k
views
django - how to change localhost from 127.0.0.1 to 127.0.0.1:8000?
I'm using Wagtail cms on django framework, problem is localhost address, I want to access to the site running in 127.0.0.1:8000 by localhost?
I tried hosts file, but no luck !
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-...
0
votes
1
answer
1k
views
How to configure DJANGO with apache2
I have a Django project known as "wsp" which is running just fine on a port. However, I want to move my project from a port to its own subdirectory (for example, localhost/wsp instead of localhost:...