Skip to content

Commit

Permalink
With Django 1.7 django_pdb needs to come BEFORE apps it overrides
Browse files Browse the repository at this point in the history
To override "runserver" from 'django.contrib.staticfiles', it needs to
come BEFORE it, because Django uses the list of app configs in reversed
order.

From django/core/management/__init__.py(76)get_commands():

    for app_config in reversed(list(apps.get_app_configs())):
        path = os.path.join(app_config.path, 'management')
        commands.update({name: app_config.name for name in find_commands(path)})
  • Loading branch information
blueyed committed Mar 26, 2015
1 parent 0a1d313 commit 4999f7a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.rst
Expand Up @@ -19,12 +19,17 @@ Install using pip::

pip install django-pdb

Add to your settings.py
Add it to your settings.py.

For Django before 1.7 it needs to be added AFTER any apps that override the
`runserver` or `test` commands (includes south and django.contrib.staticfiles).

For Django after 1.7 it needs to be added BEFORE them.

.. code:: python
# Make sure to add django_pdb AFTER any apps that override the 'runserver'
# or 'test' commands (includes south and django.contrib.staticfiles)
# Order is important and depends on your Django version.
# With Django 1.7+ put it towards the beginning, otherwise towards the end.
INSTALLED_APPS = (
...
'django_pdb',
Expand Down

0 comments on commit 4999f7a

Please sign in to comment.