I began to learn Django, now I'm creating my first app, I followed every step in the tutorial (https://docs.djangoproject.com/en/1.9/intro/tutorial01/) but it doesn't work and it throws me the following error lines when doing python manage.py runserver:
Unhandled exception in thread started by <function wrapper at 0x7ffdfa76d8c0>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver .py", line 116, in inner_run
self.check(display_num_errors=True)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 426 , in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 75, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 10, in check_url_config
return check_resolver(resolver)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 19, in check_resolver
for pattern in resolver.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 417, i n url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 410, i n urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/boss/Descargas/Python-2.7.5/mysite/testsite/testsite/urls.py", line 21, in <module>
url(r'^polls/', include('polls.urls')),
NameError: name 'include' is not defined
You forgot to import include in mysite/urls.py.
from django.conf.urls import include, url
Related
When i run python manage.py runserver 8000
one file fuzzy.xml comes first and when I delete that file from that directory it sends error
/home/yelesee/Desktop/Mirab/Mirab/web/data/fuzzy.xml
System check identified no issues (0 silenced).
September 05, 2018 - 06:51:30
Django version 1.11, using settings 'Mirab.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C
and the last line of error is
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '/home/yelesee/Desktop/Mirab/Mirab/web/data/fuzzy.xml'
I don't know where to search and remove that from code.
where should I find that?
Unhandled exception in thread started by <function wrapper at 0x7f2c20bbca28>
Traceback (most recent call last):
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/utils/autoreload.py", line 227, in wrapper
fn(*args, **kwargs)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 125, in inner_run
self.check(display_num_errors=True)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/core/management/base.py", line 359, in check
include_deployment_checks=include_deployment_checks,
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/core/management/base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/core/checks/urls.py", line 16, in check_url_config
return check_resolver(resolver)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/urls/resolvers.py", line 254, in check
for pattern in self.url_patterns:
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/urls/resolvers.py", line 405, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/urls/resolvers.py", line 398, in urlconf_module
return import_module(self.urlconf_name)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/yelesee/Desktop/Mirab/Mirab/Mirab/urls.py", line 26, in <module>
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 50, in include
urlconf_module = import_module(urlconf_module)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/yelesee/Desktop/Mirab/Mirab/web/urls.py", line 5, in <module>
from . import views
File "/home/yelesee/Desktop/Mirab/Mirab/web/views.py", line 25, in <module>
from lists import *
File "/home/yelesee/Desktop/Mirab/Mirab/web/lists.py", line 6, in <module>
tree = et.parse(xml_file)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/home/yelesee/anaconda3/envs/venv/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '/home/yelesee/Desktop/Mirab/Mirab/web/data/fuzzy.xml'
knysys#kshahidLT ~/Desktop/firsrproject $ python manage.py runserver
Performing system checks...
Unhandled exception in thread started by <function wrapper at 0x7fbcdea6e050>
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 125, in inner_run
self.check(display_num_errors=True)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 359, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 16, in check_url_config
return check_resolver(resolver)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/usr/local/lib/python2.7/dist-packages/django/urls/resolvers.py", line 254, in check
for pattern in self.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/urls/resolvers.py", line 405, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/urls/resolvers.py", line 398, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/knysys/Desktop/firsrproject/firsrproject/urls.py", line 22, in <module>
url(r'^', include('marcador.urls')),
File "/usr/local/lib/python2.7/dist-packages/django/conf/urls/__init__.py", line 50, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/knysys/Desktop/firsrproject/marcador/urls.py", line 6, in <module>
name='marcador_bookmark_user'),
File "/usr/local/lib/python2.7/dist-packages/django/conf/urls/__init__.py", line 85, in url
raise TypeError('view must be a callable or a list/tuple in the case of include().')
TypeError: view must be a callable or a list/tuple in the case of include().
From the error logs, it seems that your urlpatterns contains strings on line number 22 in urls.py.
In django 1.10, you cannot pass import paths to url(), need to pass the view function.
change this url(r'^', include('marcador.urls')) to url(r'^posts/$', postSuccess) and you need to import from marcador.views import postSuccess.
Suppose your marcador.views.py :
from django.shortcuts import render
from django.http import HttpResponse
def postSuccess(request):
response = "<h1>Success</h1>"
return HttpResponse(response)
I am trying to follow this simple tutorial to show markers on my leaflet meap on my webpage. However, I get the following error:
from django.contrib.gis.geos.geometry import Polygon ImportError:
cannot import name Polygon
as a result of this statement from djgeojson.views import GeoJSONLayerView in my urls.py
I'm not sure how to solve this, I have installed all the required dependencies for geodjango and can't find a package called 'Polygon'..
Here's the full error:
Unhandled exception in thread started by <function wrapper at 0x7fbe7c083050>
Traceback (most recent call last):
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run
self.check(display_num_errors=True)
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/core/management/base.py", line 426, in check
include_deployment_checks=include_deployment_checks,
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/core/checks/registry.py", line 75, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 10, in check_url_config
return check_resolver(resolver)
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 19, in check_resolver
for pattern in resolver.url_patterns:
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 417, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 410, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/mohamed/Dropbox/newsparse/newsparser/src/newsparser/urls.py", line 22, in <module>
url(r'^', include('textnews.urls')),
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 52, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/mohamed/Dropbox/newsparse/newsparser/src/textnews/urls.py", line 19, in <module>
from djgeojson.views import GeoJSONLayerView
File "/home/mohamed/Dropbox/newsparse/newsparser/local/lib/python2.7/site-packages/djgeojson/views.py", line 6, in <module>
from django.contrib.gis.geos.geometry import Polygon
ImportError: cannot import name Polygon
The import seems broken with Django 1.9 https://github.com/makinacorpus/django-geojson/issues/68
I'm currently trying to upgrade an existing django-cms site from 3.0.16 to 3.1.4 with django 1.7.11
I followed the instructions given in http://docs.django-cms.org/en/latest/upgrade/3.1.html but when I get to python manage.py migrate
I get the following error:
django.db.utils.OperationalError: (1054, "Unknown column 'cms_page.path' in 'field list'")
Any hints on how I can debug this? Thanks!
Update:
Here is the full traceback:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/path/to/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/path/to/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/path/to/venv/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/path/to/venv/local/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/path/to/venv/local/lib/python2.7/site-packages/debug_toolbar/apps.py", line 15, in ready
dt_settings.patch_all()
File "/path/to/venv/local/lib/python2.7/site-packages/debug_toolbar/settings.py", line 228, in patch_all
patch_root_urlconf()
File "/path/to/venv/local/lib/python2.7/site-packages/debug_toolbar/settings.py", line 216, in patch_root_urlconf
reverse('djdt:render_panel')
File "/path/to/venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 522, in reverse
app_list = resolver.app_dict[ns]
File "/path/to/venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 329, in app_dict
self._populate()
File "/path/to/venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 269, in _populate
for pattern in reversed(self.url_patterns):
File "/path/to/venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 372, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/path/to/venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 366, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/path/to/project/project/urls.py", line 14, in <module>
url(r'^admin/', include(admin.site.urls)),
File "/path/to/venv/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 262, in urls
return self.get_urls(), self.app_name, self.name
File "/path/to/venv/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 246, in get_urls
url(r'^%s/%s/' % (model._meta.app_label, model._meta.model_name), include(model_admin.urls))
File "/path/to/venv/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 598, in urls
return self.get_urls()
File "/path/to/venv/local/lib/python2.7/site-packages/cms/admin/placeholderadmin.py", line 138, in get_urls
from cms.urls import SLUG_REGEXP
File "/path/to/venv/local/lib/python2.7/site-packages/cms/urls.py", line 20, in <module>
urlpatterns = get_app_patterns()
File "/path/to/venv/local/lib/python2.7/site-packages/cms/appresolver.py", line 215, in get_app_patterns
for title in title_qs.exclude(page__application_urls=None).exclude(page__application_urls='').order_by('-page__path').select_related():
File "/path/to/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 141, in __iter__
self._fetch_all()
File "/path/to/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 966, in _fetch_all
self._result_cache = list(self.iterator())
File "/path/to/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 265, in iterator
for row in compiler.results_iter():
File "/path/to/venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 701, in results_iter
for rows in self.execute_sql(MULTI):
File "/path/to/venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 787, in execute_sql
cursor.execute(sql, params)
File "/path/to/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 81, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/path/to/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/path/to/venv/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/path/to/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/path/to/venv/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 129, in execute
return self.cursor.execute(query, args)
File "/path/to/venv/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/path/to/venv/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
django.db.utils.OperationalError: (1054, "Unknown column 'cms_page.path' in 'field list'")
I'm not sure why this worked, but the traceback indicated that there was some problem in my projects urls.py
I commented out all of the url rules in this file, migrated the cms app, then uncommented my url rules. That seems to solve the migration problem.
I have recently upgraded the version of Django from 1.5.5 to 1.6.2 and Mezzanine to 3.0.9.
When I run
python manage.py test
All the tests run without problem.
But When I run project specific tests using
python manage.py test <project-name>
Then I get ImportError. I get that its something to do with Circular Imports.
Here is the stack trace. Please help.
======================================================================
ERROR: Failure: ImportError (cannot import name DisplayableAdmin)
---------------------------------------------------------------------- Traceback (most recent call last): File
"/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/nose/loader.py",
line 411, in loadTestsFromName
addr.filename, addr.module) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/nose/importer.py",
line 47, in importFromPath
return self.importFromDir(dir_path, fqname) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/nose/importer.py",
line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc) File "/Users/devarajn/repos/pari/pari/album/tests.py", line 8, in
from pari.album.admin import AlbumAdmin, AlbumImageInline File "/Users/devarajn/repos/pari/pari/album/admin.py", line 2, in
from mezzanine.core.admin import TabularDynamicInlineAdmin File
"/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/mezzanine/core/admin.py",
line 4, in
from django.contrib.auth.admin import UserAdmin File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/contrib/auth/admin.py", line 182, in
admin.site.register(Group, GroupAdmin) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/mezzanine/boot/lazy_admin.py", line 26, in register
super(LazyAdminSite, self).register(*args, **kwargs) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 92, in register
admin_class.validate(model) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/contrib/admin/options.py", line 105, in validate
validator = cls.validator_class() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/contrib/admin/validation.py",
line 20, in init
models.get_apps() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/db/models/loading.py",
line 139, in get_apps
self._populate() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/db/models/loading.py",
line 78, in _populate
self.load_app(app_name) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/db/models/loading.py",
line 99, in load_app
models = import_module('%s.models' % app_name) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/utils/importlib.py",
line 40, in import_module
import(name) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/debug_toolbar/models.py",
line 63, in
patch_root_urlconf() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/debug_toolbar/models.py",
line 51, in patch_root_urlconf
reverse('djdt:render_panel') File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 480, in reverse
app_list = resolver.app_dict[ns] File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 310, in app_dict
self._populate() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 262, in _populate
for pattern in reversed(self.url_patterns): File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 346, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File
"/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 341, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/utils/importlib.py",
line 40, in import_module
import(name) File "/Users/devarajn/repos/pari/pari/urls.py", line 7, in
admin.autodiscover() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/mezzanine/boot/init.py",
line 77, in autodiscover
django_autodiscover(*args, **kwargs) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/contrib/admin/init.py",
line 29, in autodiscover
import_module('%s.admin' % app) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/utils/importlib.py",
line 40, in import_module
import(name) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/mezzanine/forms/admin.py",
line 24, in
from mezzanine.pages.admin import PageAdmin File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/mezzanine/pages/admin.py",
line 12, in
from mezzanine.core.admin import DisplayableAdmin, DisplayableAdminForm ImportError: cannot import name
DisplayableAdmin
django-debug-toolbar module was causing the issue.
I rolled back from django-debug-toolbar v1.0.1 to v0.11.
This fixed the error.