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.
140
questions
0
votes
0
answers
11
views
Dictionary with unknown depth in Python Django [closed]
i have following data:
[
{'I. Intangible Assets': ['1. Concessions, Licenses']},
{'II. Tangible Assets': [
'1. Land, Buildings and Similar Rights',
'2. Machinery and ...
0
votes
3
answers
11k
views
Windows CMD cannot use Python Virtualenv or Django commands
I'm trying to use python Virtualenv and Django. I have successfully installed both using Pip. On every tutorial I've found, it tells me to open CMD and type in a command. For example: C:\Users\USER\...
2
votes
1
answer
8k
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, ...
1
vote
1
answer
5k
views
Hosting a local website to the public using a VPN?
Is it possible to host a local website for a select number of people who I give access to my VPN address?
My thought process is this. I will get a Windows computer to host a VPN network, and with the ...
2
votes
2
answers
5k
views
Installing libssl-dev, libffi-dev on OS X?
I tried using command brew install libssl-dev libffi-dev but it's not working for me.
Does anyone know how to install it on Mac?
2
votes
1
answer
4k
views
Install mod_wsgi on Ubuntu with Python 3.6, Apache 2.4, and Django 1.11
How do I get mod_wsgi for Apache2 that was compiled for Python 3.6.1?
(or any future Python version)
I am using a Python 3.6.1 virtual environment with Django 1.11 and Everything is working ...
0
votes
1
answer
4k
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 ...
2
votes
1
answer
3k
views
Can't reach Django web dev server from Host OS using VirtualBox
I'm having trouble trying to reach my Django web dev server inside VirtualBox (4.2.8). What I'm trying to do is connect through the web browser in my Host OS to the web dev server running in the Guest ...
0
votes
1
answer
148
views
Installation of Tandoor on shared webhoster (no root access)
I'm trying to install Tandoor (https://tandoor.dev) on my uberspace (https://uberspace.de - shared webhoster). Docker is not supported by uberspace, so I tried the manual installation guide: https://...
0
votes
0
answers
392
views
Weird requests to home server and possible security breaches
I am trying my hands on hosting a Django web app on my home server. I never fail to get weird requests from unknown IPs all around the world, such as the ones below:
Not Found: /ecp/Current/exporttool/...
1
vote
0
answers
58
views
Where is "erd" and "dot" program?
I have problem in vscode ERD diagram preview. (As seen above print-screen my VSCode)
Have tried: https://marketplace.visualstudio.com/items?itemName=kaishuu0123.vscode-erd-preview#configuration
What ...
0
votes
0
answers
107
views
Django cant find the temporary folder when it try to save a big file
I am trying to save big images in my Django project, but when Django does it I get this stack traceback:
Traceback (most recent call last):
File "/Users/sokov/PycharmProjects/4utra/venv/lib/...
1
vote
1
answer
475
views
Nginx cors issue when using upstream
I am pretty frustrated with this as I can not seem to figure out why this is happening.
I have a Django webapp that was working fine. When I tried changing the worker_connections I started getting ...
0
votes
1
answer
544
views
Django, Nginx, CORS issue when server behind upstream but if query server directly responds fine [duplicate]
I currently have the following nginx file
server_tokens off;
upstream backend {
server unix:/home/www/api.to/app.sock weight=1;
#server 1.2.3.4 weight=1;
#server api3.example.com weight=1;
...
0
votes
1
answer
1k
views
Is there a way of knowing if a Django server is running in DEBUG mode?
Given a third party 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 ...
2
votes
1
answer
277
views
"This page isn't redirecting properly" on one particular site with one particular user
I administer a web site (https://fury.games) and one of our users is reporting that they cannot load the main page and get the following error:
I cannot reproduce the error, no other users have ...
1
vote
2
answers
8k
views
Apache virtual host shows "index of" page instead of website
Typing in the domain name in a brower shows the "index of /" page, instead of the content of my website. I'm using django, mod-wsgi and apache on ec2.
My apache conf file looks like this:
<...
0
votes
1
answer
2k
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\...
1
vote
0
answers
850
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.
4
votes
3
answers
14k
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 ...
1
vote
1
answer
1k
views
Is it possible to delete unused media from the file system in Django, systematically?
I have a django project in which the admins are able to upload media. As items sell, they are deleted from the site, thus removing their entry in the MySQL database. The images associated with the ...
0
votes
1
answer
114
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) ...
1
vote
0
answers
7k
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: ...
0
votes
1
answer
70
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 ...
0
votes
1
answer
170
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?
0
votes
2
answers
1k
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 ...
0
votes
0
answers
343
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 ...
0
votes
1
answer
146
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 ...
20
votes
2
answers
22k
views
brew install gettext, should i force link it?
I am doing some web development and the translation engine requires gettext. Should I force link it?
$ django-admin.py makemessages -l es
CommandError: Can't find xgettext. Make sure you have GNU ...
0
votes
1
answer
260
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
...
0
votes
1
answer
6k
views
I am not able to send post request properly with 'curl' command
I am very new to django programming.After reading some basic curl command, I am sent the following post request to python server using curl
curl --data "system_uuid=b28964bf-3e9e-47d7-af5e-...
0
votes
1
answer
13k
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/...
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....
3
votes
0
answers
308
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 ...
1
vote
0
answers
387
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 ...
0
votes
1
answer
84
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 ...
0
votes
2
answers
69
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 ...
0
votes
1
answer
2k
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 ...
0
votes
0
answers
85
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 ...
2
votes
0
answers
338
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 ...
1
vote
0
answers
112
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
...
0
votes
0
answers
88
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 ...
1
vote
0
answers
40
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 ...
4
votes
3
answers
6k
views
debian stretch upgrade - mariadb removed libmysqlclient.so.18 - how to get it back?
I upgraded to debian stretch from jessie.
My mysql database migrated and I can read it. I have a django project that relies on libmysqlclient.so.18 to access mysql.
i have mariadb-server and ...
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 ...
2
votes
1
answer
2k
views
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-sTRicb-build/
I am trying to install Django and I get the following error, please
let me know what seems to be the issue.
Thanks,
(ENV) AP-MacBook-Pro:bin $ sudo -H pip install django/
Processing ./django
...
4
votes
3
answers
5k
views
Should I be using vagrant destroy/up/reload/provision or something of the sort every time I want to change one of my source files?
I have recently started developing a little with vagrant and django in a vm.
To get my machine up I use vagrant up, and to destroy it I use vagrant down.
Both of these commands are time-consuming as ...
2
votes
1
answer
6k
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/...
1
vote
0
answers
72
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 ...
0
votes
1
answer
347
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 ...