Questions tagged [django-dev-server]

django-dev-server refers to lightweight web server provided by Django for development purposes

django-dev-server refers to lightweight web server provided by Django for development purposes.

See documentation.

Also django-dev-server can refer to pluggable django app that replaces Django's built-in runserver command.

51 questions
1
vote
1 answer

Django - distinguish development server (manage.py runserver) from the regular one (eg. Apache)

I need a way to distinguish development server in Django (run eg. by ./manage.py runserver 0.0.0.0:8000) from the one being run on Apache. In case of Apache I use WSGI daemon mode, but I would like to find some more reliable solution for detecting…
Tadeck
  • 132,510
  • 28
  • 152
  • 198
0
votes
1 answer

In Django, is it possible to see which method is generating a SQL query?

When creating a custom User (inherits from AbstractUser) we have a signal which creates a randomized password (from Django's get_random_string) and send it out in an email in a celery task to the user. # accounts/models.py class User(AbstractUser): …
kunambi
  • 756
  • 1
  • 10
  • 25
0
votes
1 answer

How to run django app on windows server ec2 instance with mysql database and costum domain

I have Copied my files to the server and also setup the domain in the route 53 and also installed the xampp server now When i try starting the server with the command Python manage.py runserver 0.0.0.0:80 it gives me the following error Error:…
0
votes
0 answers

Django Dev Server - sleep(N) in Middleware makes requests sleep multiple N seconds

Working on a middleware that slows down dev server response time. To simplify it I've created a very simple example that measures get_response time and then sleeps so the whole request cycle takes approximately 2 seconds. The problem is that when…
Milano
  • 18,048
  • 37
  • 153
  • 353
0
votes
1 answer

Django Heroku how to go back to development server to make more changes

So I just deployed my Django app to Heroku, and everything is working fine. The current version of the app isn't perfect, so I want to edit it, but my current process is: 1. **make changes in files 2. git status (just to make sure changes are…
0
votes
1 answer

Django Serve Static Files with out seperate Web server(i.e, without nginx??)

I have a issue with running my django application on the production server, Its working fine when i use nginx webserver to serve the static files. But i have my django application running on one server and my webserver is running on other server.So,…
0
votes
1 answer

Django dev server extremely slow

We have an app that works perfectly fine on production but very slow on the dev machine. Django==2.2.4 I'm using Ubuntu 20.04 but other devs are using macOS and even Windows. Our production server is a very small compared to the dev laptops (it…
user1532587
  • 993
  • 1
  • 14
  • 39
0
votes
0 answers

ModuleNotFoundError: No module named 'django.contrib.admin' in pythonanywhere

hi i know this is repetitive question but i checked everywhere and i checkd my urls and import stuffs but it does not fix i don't know which file path is incorrect i clone my project from github and my project in localhost works all right but in…
0
votes
1 answer

Error importing devserver module devserver.modules.sql: "cannot import name util"

Just upgraded from django 1.8 to 1.9 and getting this error while migrating: Error importing devserver module devserver.modules.sql: "cannot import name util" Although they say it is fixed it…
moddayjob
  • 606
  • 5
  • 17
0
votes
0 answers

How to query data using the build in Django functions in postgresql database?

I am wanting to query data using the build in Django functions on postgresql database. When the highlighted line of code runs, I get the following error: django.db.utils.ProgrammingError: can't adapt type 'SimpleLazyObject'. When I change the…
0
votes
2 answers

Django: Moving from development server to deployment (Apache+mod_wsgi)

I'm developing application on Django, and ready to move to deployment server. I'm able to run a new django project on apache(I can see the welcome page). However, when I copy my original project's files to apache project directory, I start getting…
Neo
  • 13,179
  • 18
  • 55
  • 80
0
votes
2 answers

Django dev server STILL won't serve static files

Okay, all. I know this is a question that many people have solved in various cases, but I cannot for the life of me get my Django 1.9 development server to serve static content on my local computer. Static files worked fine pre-deployment, and are…
0
votes
0 answers

Is there a best practice way to direct output of the development server to stdout for a front-end dev server?

Let's say I have a a hybrid application (the django templater is required to serve the page with the form widgets, data, etc, however there is still a decent amount of js/ejs/lodash/etc wizardry going on in the front-end). The front-end engineers…
Escher
  • 5,418
  • 12
  • 54
  • 101
0
votes
1 answer

Why is Django development server bringing my app under another app's address?

After going through Django Project's tutorial on creating a polling app, named polls, I started my own project on the same virtual environment, under another name. Now, what I did in my new app under the the index view, is still being only shown at…
OddvarK
  • 1
  • 2
0
votes
1 answer

Quit Django dev server but process doesn't stop

I'm developing on Mac OSX 10.8. Lately I've been noticing that when I've been running the dev server for a while, and then -C to exit, the process continues to run in the background. I have to do a ps to find the process and kill it, or it won't let…
RossGK
  • 515
  • 2
  • 7
  • 19