HassenPy / django-pdb

Gives you `manage.py runserver --pdb` and `manage.py test --pdb`
395 stars 61 forks source link

`runserver` command doesn't start with django 2.0.2 #41

Closed gh640 closed 6 years ago

gh640 commented 6 years ago

After installing this package, runserver commands raises the following error related with MIDDLEWARE_CLASSES.

python manage.py runserver
Traceback (most recent call last):
  File "site/manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "/(the path)/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "/(the path)/lib/python3.6/site-packages/django/core/management/__init__.py", line 365, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/(the path)/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/(the path)/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 62, in execute
    super().execute(*args, **options)
  File "/(the path)/lib/python3.6/site-packages/django/core/management/base.py", line 335, in execute
    output = self.handle(*args, **options)
  File "/(the path)/lib/python3.6/site-packages/django_pdb/management/commands/runserver.py", line 61, in handle
    middleware = settings.MIDDLEWARE_CLASSES
  File "/(the path)/lib/python3.6/site-packages/django/conf/__init__.py", line 57, in __getattr__
    val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'MIDDLEWARE_CLASSES'

My environment is:

This may be related to #40. Thank you in advance.

HassenPy commented 6 years ago

Hey @gh640, merged your PR, don't hesitate to report any other issues, thanks!

gh640 commented 6 years ago

Thanks!