Skip to main content

A gunicorn based django runserver command.

Project description

django-serve

A gunicorn based django runserver command.

Install

python3 -m pip install django-serve

and add to INSTALLED_APPS

#!python
INSTALLED_APPS = [
    ...
    "django_serve.apps.ServeConfig",
    ...
]

Usage

./manage.py serve

options

  • --addr The socket address to bind [default=127.0.0.1]
  • --port The socket port to bind [default=8000]
  • --workers The number of worker processes for handling requests [default max(2, cpu - 1)]
  • --name A base to use with setproctitle for process naming [default=django]
  • --wsgi Dotted path to wsgi application [default=settings.WSGI_APPLICATION]
  • `--config' The Gunicorn config file [default=None]
  • --log-level The granularity of Error log outputs (debug, info, warning, error, critical) [default=info]
  • --logformat The access log format (default='"%(m)s %(U)s%(q)s %(H)s" %(s)s %(B)s' same as default django runserver)
  • --logger-class The logger you want to use to log events [default=gunicorn_color.Logger if installed else gunicorn default one]

CHANGES

0.1.1

  • add gunicorn-color as required

0.1.0

  • initial implementation
  • add support for gunicorn config file
  • add custom django reloader
  • add log-level option
  • add logformat configuration
  • add logger-class option

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-serve, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django_serve-0.1.1-py3-none-any.whl (9.6 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page