Installation error in with byteflow-0.7 - python

I am installing byteflow-0.7 on python 2.6.5 with django 1.3 on windows7(64-bits). Database used is MySQL 5.0.51b on wamp 2.0 server. I installed all the prerequisites well and have run the syncdb command. That run well and the database was created successfully. When I run the server and hit the localhost:8000 on my browser, I see the following:
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\django\core\servers\basehttp.py", line 283, in run
self.result = application(self.environ, self.start_response)
File "C:\Python26\lib\site-packages\django\contrib\staticfiles\handlers.py", line 68, in __call__
return self.application(environ, start_response)
File "C:\Python26\lib\site-packages\django\core\handlers\wsgi.py", line 250, in __call__
self.load_middleware()
File "C:\Python26\lib\site-packages\django\core\handlers\base.py", line 45, in load_middleware
mod = import_module(mw_module)
File "C:\Python26\lib\site-packages\django\utils\importlib.py", line 35, in import_module
__import__(name)
File "D:\djangowork\piranha-byteflow-98c3681f5a8f\apps\pingback\middleware.py", line 3, in <module>
class PingbackMiddleware(object):
File "D:\djangowork\piranha-byteflow-98c3681f5a8f\apps\pingback\middleware.py", line 4, in PingbackMiddleware
xmlrpc_url = reverse('xmlrpc')
File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 391, in reverse
*args, **kwargs)))
File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 312, in reverse
possibilities = self.reverse_dict.getlist(lookup_view)
File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 229, in _get_reverse_dict
self._populate()
File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 197, in _populate
for pattern in reversed(self.url_patterns):
File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 279, in _get_url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Python26\lib\site-packages\django\core\urlresolvers.py", line 274, in _get_urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "C:\Python26\lib\site-packages\django\utils\importlib.py", line 35, in import_module
__import__(name)
File "D:\djangowork\piranha-byteflow-98c3681f5a8f\urls.py", line 45, in <module>
url(r'^admin/(.*)', admin.site.root, name='admin'),
AttributeError: 'AdminSite' object has no attribute 'root'
What do I need to do?

It seems that AdminSite.root had been marked deprecated in Django 1.1 and apparently it is now removed in Django 1.3. So you either have to downgrade Django to 1.0 (as this is what ByteFlow website says in requirements) or use a newer Byteflow version that has this issue fixed.
PS. Found a fix in a forked repo.

Related

CS50 Python & JS Web: Cannot operate website after trying to 'makemigrations'

I have been working through the Web with Python and Django with the CS50 course.
When i got to the stage of 'makemigrations' it didnt run and not i cant use the command 'runserver' either.
PS C:\Users\44777\code\airline> python3 manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
Exception in thread django-main-thread:
Traceback (most recent call last):
File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 591, in url_patterns
iter(patterns)
TypeError: 'module' object is not iterable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Python38\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "D:\Python38\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "D:\Python38\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "D:\Python38\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run
self.check(display_num_errors=True)
File "D:\Python38\lib\site-packages\django\core\management\base.py", line 392, in check
all_issues = checks.run_checks(
File "D:\Python38\lib\site-packages\django\core\checks\registry.py", line 70, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "D:\Python38\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "D:\Python38\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
return check_method()
File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 409, in check
messages.extend(check_resolver(pattern))
File "D:\Python38\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
return check_method()
File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 408, in check
for pattern in self.url_patterns:
File "D:\Python38\lib\site-packages\django\utils\functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 598, in url_patterns
raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e
django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'flights.urls' from 'C:\\Users\\44777\\code\\airline\\flights\\urls.py'>' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import.
PS C:\Users\44777\code\airline> python3 manage.py makemigrations
Traceback (most recent call last):
File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 591, in url_patterns
iter(patterns)
TypeError: 'module' object is not iterable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "D:\Python38\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line
utility.execute()
File "D:\Python38\lib\site-packages\django\core\management\__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "D:\Python38\lib\site-packages\django\core\management\base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "D:\Python38\lib\site-packages\django\core\management\base.py", line 368, in execute
self.check()
File "D:\Python38\lib\site-packages\django\core\management\base.py", line 392, in check
all_issues = checks.run_checks(
File "D:\Python38\lib\site-packages\django\core\checks\registry.py", line 70, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "D:\Python38\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "D:\Python38\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
return check_method()
File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 409, in check
messages.extend(check_resolver(pattern))
File "D:\Python38\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
return check_method()
File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 408, in check
for pattern in self.url_patterns:
File "D:\Python38\lib\site-packages\django\utils\functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 598, in url_patterns
raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e
django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'flights.urls' from 'C:\\Users\\44777\\code\\airline\\flights\\urls.py'>' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import.
I was told that I could use the CS50 API to make things easier, but I am using VS Code on a Windows machine. I also know that the lecturer uses Mac. Does anyone know how to solve my problem? Thanks
-Max
EDIT:After going through the tutorial again from scratch i got the same problem. While looking through the syntax there was an error:
ModuleNotFoundError: No module named 'flights.url'
I went to the location that this was displayed and then realised i had forgotten a 's' in flights.urls. This was possibly not the problem i had in the past but now my code is allowing me to makemigrations.

django.db.utils.OperationalError: no such table

I'm upgrading a Django project from 1.8 to 1.9,
I deleted the database file and all cache files, then I tried to run
python manage.py migrate
or
python manage.py migrate --run-syncdb
but always raise this error django.db.utils.OperationalError: no such table:
here is the full traceback
Traceback (most recent call last):
File "manage.py", line 25, in <module>
execute_from_command_line(sys.argv)
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
utility.execute()
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 342, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/core/management/base.py", line 398, in execute
self.check()
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/core/management/base.py", line 426, in check
include_deployment_checks=include_deployment_checks,
File "/home/basha/UpgradeMloss/venv1.9/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/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 10, in check_url_config
return check_resolver(resolver)
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 19, in check_resolver
for pattern in resolver.url_patterns:
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/basha/UpgradeMloss/venv1.9/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/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/basha/UpgradeMloss/venv1.9/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/basha/UpgradeMloss/mloss/urls.py", line 30, in <module>
(r'^community/', include('community.urls')),
File "/home/basha/UpgradeMloss/venv1.9/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/basha/UpgradeMloss/mloss/community/urls.py", line 32, in <module>
'extra_context' : get_latest_news()
File "/home/basha/UpgradeMloss/mloss/community/summary.py", line 68, in get_latest_news
latest_posts = get_latest_posts()
File "/home/basha/UpgradeMloss/mloss/community/summary.py", line 32, in get_latest_posts
for forum in all_forums:
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/db/models/query.py", line 258, in __iter__
self._fetch_all()
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/db/models/query.py", line 1074, in _fetch_all
self._result_cache = list(self.iterator())
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/db/models/query.py", line 52, in __iter__
results = compiler.execute_sql()
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 852, in execute_sql
cursor.execute(sql, params)
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/db/utils.py", line 95, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/basha/UpgradeMloss/venv1.9/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 323, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: community_forum
it works fine on django1.8 without any error!
Are there any edits or updates should I make in Settings.py?
This question isn't related to your upgrade. You have a query inside your urls.py, where you do 'extra_context' : get_latest_news(). That executes as soon as the URLs are imported; so the migrations can never have a chance to run.
Note that as well as blocking the migrations, this code would give you out-of-date results, for the same reason: it is executed on import, not when the request is run. Remove that query and move it into the view itself.
Nevertheless, you really shouldn't have deleted the database, or the migration files.
After python3 manage.py makemigrations or python manage.py makemigrations
I did python3 manage.py migrate --fake or python manage.py migrate --fake.
It somehow worked. I did this fake migration after that I had commented out a ForeignKey, the model to the ForeignKey and the model in admin.py. I then went and looked in the admin, and the ForeignKey model was gone. So I did add that ForeignKey, model and admin.site.register back and did a real migration, the error was gone.

files add before after running server

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'

CKAN won't start

On my FreeBSD 10, I managed to install PostgreSQL, Apache Solr and CKAN but when I run paster serve /etc/ckan/default/development.ini I get these error messages (I know there is an issue with CKAN because on my ip:5000 I have a error: connection failed).
Here are the error messages:
$ paster serve /etc/ckan/default/production.ini
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/serve.py", line 284, in command
relative_to=base, global_conf=vars)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/serve.py", line 321, in loadapp
**kw)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
return context.create()
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
return self.object_type.invoke(self)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
val = callable(*args, **kw)
File "/root/ckan/lib/default/src/ckan/ckan/config/middleware.py", line 58, in make_app
load_environment(conf, app_conf)
File "/root/ckan/lib/default/src/ckan/ckan/config/environment.py", line 232, in load_environment
p.load_all(config)
File "/root/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 134, in load_all
load(*plugins)
File "/root/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 170, in load
plugins_update()
File "/root/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 116, in plugins_update
environment.update_config()
File "/root/ckan/lib/default/src/ckan/ckan/config/environment.py", line 357, in update_config
plugin.configure(config)
File "/root/ckan/lib/default/src/ckan/ckanext/datastore/plugin.py", line 115, in configure
self._check_urls_and_permissions()
File "/root/ckan/lib/default/src/ckan/ckanext/datastore/plugin.py", line 159, in _check_urls_and_permissions
self._log_or_raise('The read-only user has write privileges.')
File "/root/ckan/lib/default/src/ckan/ckanext/datastore/plugin.py", line 140, in _log_or_raise
raise DatastoreException(message)
ckanext.datastore.plugin.DatastoreException: The read-only user has write privileges.
What should I do?
Your read-only postgresql user for the datastore database is not setup correctly: the user has write privileges. The relevant part of the docs is: http://docs.ckan.org/en/latest/maintaining/datastore.html#set-permissions
I too faced the problem like this....I have deleted the user "datastore_default" from the postgres. For Deleting the Postgres User Please refer: Postgres Delete user
And create again the postgres user "datastore_default" as per the CKAN Documentation. Please ref: Create User datastore_default for CKAN

Mezzanine ImportError when running tests

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.

Categories

Resources