<commit_before>-----
About
-----

A drop in replacement for Django's built-in runserver command. Features include:

* An extendable interface for handling things such as real-time logging.
* Integration with the werkzeug interactive debugger.
* An improved runserver allowing you to process requests simultaneously.

.. image:: http://www.pastethat.com/media/files/2010/02/10/Screen_shot_2010-02-10_at_10.05.31_PM.png
   :alt: devserver screenshot


------------
Installation
------------

To install the latest stable version::

	pip install git+git://github.com/dcramer/django-devserver#egg=django-devserver


django-devserver has some optional dependancies, which we highly recommend installing.

* ``pip install sqlparse`` -- pretty SQL formatting
* ``pip install werkzeug`` -- interactive debugger
* ``pip install guppy`` -- tracks memory usage (required for MemoryUseModule)
* ``pip install line_profiler`` -- does line-by-line profiling (required for LineProfilerModule)

You will need to include ``devserver`` in your ``INSTALLED_APPS``::

	INSTALLED_APPS = (
	    'devserver',
	    ...
	)

Specify modules to load via the ``DEVSERVER_MODULES`` setting::

	DEVSERVER_MODULES = (
	    'devserver.modules.sql.SQLRealTimeModule',
	    'devserver.modules.sql.SQLSummaryModule',
	    'devserver.modules.profile.ProfileSummaryModule',

	    # Modules not enabled by default
	    'devserver.modules.ajax.AjaxDumpModule',
	    'devserver.modules.profile.MemoryUseModule',
	    'devserver.modules.cache.CacheSummaryModule',
	    'devserver.modules.profile.LineProfilerModule',
	)

You may also specify prefixes to skip processing for. By default, ``ADMIN_MEDIA_PREFIX`` and ``MEDIA_URL`` will be ignored (assuming ``MEDIA_URL`` is relative)::

	DEVSERVER_IGNORED_PREFIXES = ['/media', '/uploads']

-----
Usage
-----

Once installed, using the new runserver replacement is easy. You must specify verbosity of 0 to disable real-time log output::

	python manage.py runserver

Note: This will force ``settings.DEBUG`` to ``True``.

Please see ``python manage.py runserver --help`` for additional options.

You may also use devserver's middleware outside of the management command::

	MIDDLEWARE_CLASSES = (
		'devserver.middleware.DevServerMiddleware',
	)

-------
Modules
-------

django-devserver includes several modules by default, but is also extendable by 3rd party modules.
<commit_msg>Document changes in the README<commit_after>-----
About
-----

A drop in replacement for Django's built-in runserver command. Features include:

* An extendable interface for handling things such as real-time logging.
* Integration with the werkzeug interactive debugger.
* An improved runserver allowing you to process requests simultaneously.

.. image:: http://www.pastethat.com/media/files/2010/02/10/Screen_shot_2010-02-10_at_10.05.31_PM.png
   :alt: devserver screenshot


------------
Installation
------------

To install the latest stable version::

	pip install git+git://github.com/dcramer/django-devserver#egg=django-devserver


django-devserver has some optional dependancies, which we highly recommend installing.

* ``pip install sqlparse`` -- pretty SQL formatting
* ``pip install werkzeug`` -- interactive debugger
* ``pip install guppy`` -- tracks memory usage (required for MemoryUseModule)
* ``pip install line_profiler`` -- does line-by-line profiling (required for LineProfilerModule)

You will need to include ``devserver`` in your ``INSTALLED_APPS``::

	INSTALLED_APPS = (
	    'devserver',
	    ...
	)

Specify modules to load via the ``DEVSERVER_MODULES`` setting::

	DEVSERVER_MODULES = (
	    'devserver.modules.sql.SQLRealTimeModule',
	    'devserver.modules.sql.SQLSummaryModule',
	    'devserver.modules.profile.ProfileSummaryModule',

	    # Modules not enabled by default
	    'devserver.modules.ajax.AjaxDumpModule',
	    'devserver.modules.profile.MemoryUseModule',
	    'devserver.modules.cache.CacheSummaryModule',
	    'devserver.modules.profile.LineProfilerModule',
	)

You may also specify prefixes to skip processing for. By default, ``ADMIN_MEDIA_PREFIX`` and ``MEDIA_URL`` will be ignored (assuming ``MEDIA_URL`` is relative)::

	DEVSERVER_IGNORED_PREFIXES = ['/media', '/uploads']

-----
Usage
-----

Once installed, using the new runserver replacement is easy. You must specify verbosity of 0 to disable real-time log output::

	python manage.py runserver

Note: This will force ``settings.DEBUG`` to ``True``.

By default, ``devserver`` would bind itself to 127.0.0.1:8000. To change this default, ``DEVSERVER_DEFAULT_ADDR`` and ``DEVSERVER_DEFAULT_PORT`` settings are available. 

Please see ``python manage.py runserver --help`` for additional options.

You may also use devserver's middleware outside of the management command::

	MIDDLEWARE_CLASSES = (
		'devserver.middleware.DevServerMiddleware',
	)

-------
Modules
-------

django-devserver includes several modules by default, but is also extendable by 3rd party modules.

{'fraction_non_alphanumeric': 0.1175996778091019, 'fraction_numerical': 0.011679420056383408, 'mean_word_length': 4.0477642276422765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3976761', 'n_tokens_mistral': 1506, 'n_tokens_neox': 1402, 'n_words': 454}