Issue #40 new

problem with syncdb

Oleksandr Shtalinberg
created an issue

Django==1.6.4 debug_toolbar>=1.1 python manage.py syncdb

  File "/.venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/.venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/.venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/.venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 284, in execute
    self.validate()
  File "/.venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 310, in validate
    num_errors = get_validation_errors(s, app)
  File "/.venv/local/lib/python2.7/site-packages/django/core/management/validation.py", line 34, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/.venv/local/lib/python2.7/site-packages/django/db/models/loading.py", line 196, in get_app_errors
    self._populate()
  File "/.venv/local/lib/python2.7/site-packages/django/db/models/loading.py", line 75, in _populate
    self.load_app(app_name, True)
  File "/.venv/local/lib/python2.7/site-packages/django/db/models/loading.py", line 99, in load_app
    models = import_module('%s.models' % app_name)
  File "/.venv/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/.venv/local/lib/python2.7/site-packages/debug_toolbar/models.py", line 9, in <module>
    dt_settings.patch_all()
  File "/.venv/local/lib/python2.7/site-packages/debug_toolbar/settings.py", line 215, in patch_all
    patch_root_urlconf()
  File "/.venv/local/lib/python2.7/site-packages/debug_toolbar/settings.py", line 203, in patch_root_urlconf
    reverse('djdt:render_panel')
  File "/compat/localeurl/models.py", line 12, in reverse
    return utils.locale_url(path, locale)
  File "/compat/localeurl/utils.py", line 72, in locale_url
    path = locale_path(path, locale)
  File "/compat/localeurl/utils.py", line 57, in locale_path
    locale = supported_language(locale)
  File "/compat/localeurl/utils.py", line 38, in supported_language
    locale = locale.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

in utils.py i change line 38

    if locale is None:
        return None
    locale = locale.lower()

work fine

Comments (3)

  1. Log in to comment