mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 12:14:10 +00:00
15 lines
478 B
Plaintext
15 lines
478 B
Plaintext
![]() |
#!/usr/bin/env python
|
||
|
import sys
|
||
|
from waitress import serve
|
||
|
from waitress.adjustments import Adjustments
|
||
|
import django
|
||
|
from django.core.handlers.wsgi import WSGIHandler
|
||
|
from django.contrib.staticfiles.handlers import StaticFilesHandler
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
kw, args = Adjustments.parse_args(sys.argv[1:])
|
||
|
django.setup()
|
||
|
# These arguments are specific to the runner, not waitress itself.
|
||
|
del kw['call'], kw['help']
|
||
|
serve(StaticFilesHandler(WSGIHandler()), **kw)
|