X
X
xxx2017-04-22 16:34:05
Django
xxx, 2017-04-22 16:34:05

Problem after django update?

Updated django, version Now when I start any project I get:
(1, 11, 0, u'final', 1)

Unhandled exception in thread started by <function wrapper at 0x7ff1bd57c938>
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 227, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 117, in inner_run
    autoreload.raise_last_exception()
  File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 250, in raise_last_exception
    six.reraise(*_exception)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 227, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 116, in populate
    app_config.ready()
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/apps.py", line 23, in ready
    self.module.autodiscover()
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py", line 26, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/module_loading.py", line 50, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/ivan/Рабочий стол/git/Django-blog/mysite/blog/admin.py", line 5, in <module>
    from pagedown.widgets import AdminPagedownWidget
  File "/usr/local/lib/python2.7/dist-packages/pagedown/widgets.py", line 3, in <module>
    from django.forms.widgets import flatatt
ImportError: cannot import name flatatt

How to treat?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
marazmiki, 2017-04-22
@Heavy10110

Django 1.11 changed the widget system: previously, the HTML generated by them was hardcoded, but now templates are used.
Probably the application in the pagedown package (I don't know what it is, but a quick search showed that there is some django-pagedown, which is basically similar) has not yet been updated. Or you didn't update it. Try to do pip install --upgrade django-pagedown(if I guessed right with the app, of course)

G
GDApsy, 2017-04-22
@GDApsy

And look at this issue from github: https://github.com/nkunihiko/django-bootstrap3-dat...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question