├── .gitignore ├── LICENSE ├── MANIFEST.in ├── README.md ├── django_werkzeug ├── __init__.py └── management │ ├── __init__.py │ └── commands │ ├── __init__.py │ ├── runserver.py │ └── runserver_classic.py ├── requirements.txt └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Deployment files 2 | *.egg-info 3 | dist 4 | 5 | # Environment files 6 | site-packages 7 | instance 8 | build 9 | env 10 | .cache 11 | *.py[cod] 12 | settings_local.py 13 | 14 | # OS-specific files 15 | .DS_Store 16 | Desktop.ini 17 | Thumbs.db 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Joe Esposito 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.txt 2 | include *.md 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Django Werkzeug 2 | =============== 3 | 4 | [![Current version on PyPI](http://img.shields.io/pypi/v/django-werkzeug.svg)][pypi] 5 | 6 | Enhances Django `runserver` with [Werkzeug][]. 7 | 8 | This project uses [Django Extensions][] under the hood. It "wraps" it, along 9 | with Werkzeug, so you don't have to add an explicit `werkzeug` dependency 10 | to your `requirements.txt` or remember a new command. 11 | 12 | 13 | Why 14 | --- 15 | 16 | Werkzeug and its builtin error page has proven to be indispensable in a number 17 | of Django projects. While Django Extensions is also a great tool, the full 18 | extent of it is not always needed in specific projects. 19 | 20 | Also, when committing to Werkzeug, it's convenient to run the `runserver` 21 | instead of learning a new command. This brings newcomers to your team up to 22 | speed without further instruction and doesn't require existing members to 23 | change their muscle memory during their day-to-day. 24 | 25 | If you want to use Werkzeug on certain projects, but don't want to keep track 26 | of which ones, this package is for you. 27 | 28 | 29 | Requirements 30 | ------------ 31 | 32 | Django Werkzeug requires Django 1.8 or later. 33 | 34 | 35 | Installation 36 | ------------ 37 | 38 | ```bash 39 | $ pip install django-werkzeug 40 | ``` 41 | 42 | Then enable it by adding it to `INSTALLED_APPS` in your `settings.py` file: 43 | 44 | ```python 45 | INSTALLED_APPS = [ 46 | 'django_werkzeug', 47 | ... 48 | ] 49 | ``` 50 | 51 | 52 | Usage 53 | ----- 54 | 55 | ```bash 56 | $ python manage.py runserver 57 | ``` 58 | 59 | Or to run Django's classic builtin server, run: 60 | 61 | ```bash 62 | $ python manage.py runserver_classic 63 | ``` 64 | 65 | 66 | Contributing 67 | ------------ 68 | 69 | 1. Check the open issues or open a new issue to start a discussion around 70 | your feature idea or the bug you found 71 | 2. Fork the repository and make your changes 72 | 3. Create a new pull request 73 | 74 | 75 | [pypi]: http://pypi.python.org/pypi/django-werkzeug/ 76 | [werkzeug]: https://github.com/pallets/werkzeug 77 | [django extensions]: https://github.com/django-extensions/django-extensions 78 | -------------------------------------------------------------------------------- /django_werkzeug/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joeyespo/django-werkzeug/ce5a2cb4667d096cbd5c1cf1475bb7c7cf893365/django_werkzeug/__init__.py -------------------------------------------------------------------------------- /django_werkzeug/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joeyespo/django-werkzeug/ce5a2cb4667d096cbd5c1cf1475bb7c7cf893365/django_werkzeug/management/__init__.py -------------------------------------------------------------------------------- /django_werkzeug/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joeyespo/django-werkzeug/ce5a2cb4667d096cbd5c1cf1475bb7c7cf893365/django_werkzeug/management/commands/__init__.py -------------------------------------------------------------------------------- /django_werkzeug/management/commands/runserver.py: -------------------------------------------------------------------------------- 1 | from django_extensions.management.commands.runserver_plus import Command 2 | 3 | __all__ = ['Command'] 4 | -------------------------------------------------------------------------------- /django_werkzeug/management/commands/runserver_classic.py: -------------------------------------------------------------------------------- 1 | from django.core.management.commands.runserver import Command 2 | 3 | __all__ = ['Command'] 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | django-extensions 2 | werkzeug 3 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | from setuptools import setup, find_packages 3 | 4 | 5 | def read(filename): 6 | with open(os.path.join(os.path.dirname(__file__), filename)) as f: 7 | return f.read() 8 | 9 | 10 | setup( 11 | name='django-werkzeug', 12 | version='1.0.0', 13 | description='Enhances Django runserver with Werkzeug.', 14 | long_description=__doc__, 15 | author='Joe Esposito', 16 | author_email='joe@joeyespo.com', 17 | url='http://github.com/joeyespo/django-werkzeug', 18 | license='MIT', 19 | platforms='any', 20 | packages=find_packages(), 21 | install_requires=read('requirements.txt').splitlines(), 22 | zip_safe=False, 23 | ) 24 | --------------------------------------------------------------------------------