Django==1.11.3, wagtail==1.11.1
I did a backup of my PostgreSQL on remote server and did a restore on my local server so I can get an exact copy of all the changes. I've done it this way for a long long time and its always worked like a charm. But this time, I did the restore and got the error below:
column wagtailcore_page.draft_title does not exist
LINE 1: ...ore_page"."numchild", "wagtailcore_page"."title", "wagtailco...
I deleted my database and restored fresh but that did nothing. I deleted all migrations, did the --fake migration to try and reset, but nothing; still getting the error. I am at a loss on this one and could use some feedback. Thank you.
Here's my trace file:
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8001/
Django Version: 1.11.3
Python Version: 3.5.0
Installed Applications:
['app',
'home',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django_summernote',
'rest_framework',
'wagtail.contrib.settings',
'wagtail.contrib.modeladmin',
'wagtail.wagtailcore',
'wagtail.wagtailadmin',
'wagtail.wagtaildocs',
'wagtail.wagtailsnippets',
'wagtail.wagtailusers',
'wagtail.wagtailimages',
'wagtail.wagtailembeds',
'wagtail.wagtailsearch',
'wagtail.wagtailsites',
'wagtail.wagtailredirects',
'wagtail.wagtailforms',
'wagtail.contrib.wagtailsitemaps',
'wagtail.contrib.wagtailroutablepage',
'wagtail.contrib.wagtailstyleguide',
'wagtailmenus',
'compressor',
'taggit',
'modelcluster',
'docs',
'wagtail.contrib.table_block']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'wagtail.wagtailcore.middleware.SiteMiddleware',
'wagtail.wagtailredirects.middleware.RedirectMiddleware']
Traceback:
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
65. return self.cursor.execute(sql, params)
The above exception (column wagtailcore_page.draft_title does not exist
LINE 1: ...ore_page"."numchild", "wagtailcore_page"."title", "wagtailco...
^
) was the direct cause of the following exception:
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/core/handlers/base.py" in _legacy_get_response
244. response = middleware_method(request)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/wagtail/wagtailcore/middleware.py" in process_request
20. request.site = Site.find_for_request(request)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/wagtail/wagtailcore/models.py" in find_for_request
129. return get_site_for_hostname(hostname, port)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/wagtail/wagtailcore/sites.py" in get_site_for_hostname
38. 'root_page'
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/query.py" in __iter__
250. self._fetch_all()
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/query.py" in _fetch_all
1118. self._result_cache = list(self._iterable_class(self))
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/query.py" in __iter__
53. results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/sql/compiler.py" in execute_sql
886. raise original_exception
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/sql/compiler.py" in execute_sql
876. cursor.execute(sql, params)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
80. return super(CursorDebugWrapper, self).execute(sql, params)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
65. return self.cursor.execute(sql, params)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/utils.py" in __exit__
94. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/utils/six.py" in reraise
685. raise value.with_traceback(tb)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
65. return self.cursor.execute(sql, params)
Exception Type: ProgrammingError at /
Exception Value: column wagtailcore_page.draft_title does not exist
LINE 1: ...ore_page"."numchild", "wagtailcore_page"."title", "wagtailco...
^
the error is due to the fact that you have not migrated the newest version of wagtail. just run python manage.py migrate and when you see it running, this will appear:
Running migrations:
Rendering model states ... DONE
Applying
wagtailcore.0040_page_draft_title
... OK
rerun your project and you're done.
After restoring your database backup, you need to run ./manage.py migrate. draft_title was added in Wagtail 1.11, so presumably your backup is from a site running Wagtail 1.10 or earlier.
(Running --fake is the opposite of what you want... it tells Django not to run any of the outstanding migrations, including the one that adds the draft_title column.)
Related
According to this guide I successfully connected to Sybase database in my django project in virtual environment.
After deployment in Apache the web writes this error message
Environment:
Request Method: GET
Request URL: http://localhost:8080/
Django Version: 1.8
Python Version: 3.6.9
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog',
'sybase_app')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware')
Traceback:
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/core/handlers/base.py" in get_response
132. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3.6/contextlib.py" in inner
51. with self._recreate_cm():
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/transaction.py" in __enter__
150. if not connection.get_autocommit():
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/backends/base/base.py" in get_autocommit
286. self.ensure_connection()
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/backends/base/base.py" in ensure_connection
130. self.connect()
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/utils.py" in __exit__
97. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/utils/six.py" in reraise
658. raise value.with_traceback(tb)
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/backends/base/base.py" in ensure_connection
130. self.connect()
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/backends/base/base.py" in connect
118. conn_params = self.get_connection_params()
File "/home/pd/sibp/env/lib/python3.6/site-packages/sqlany_django/base.py" in get_connection_params
517. root = Database.Root('PYTHON')
File "/home/pd/sibp/env/lib/python3.6/site-packages/sqlanydb.py" in __init__
466. 'libdbcapi_r.dylib')
File "/home/pd/sibp/env/lib/python3.6/site-packages/sqlanydb.py" in load_library
458. raise InterfaceError("Could not load dbcapi. Tried: " + ','.join(map(str, names)))
Exception Type: InterfaceError at /
Exception Value: Could not load dbcapi. Tried: None,dbcapi.dll,libdbcapi_r.so,libdbcapi_r.dylib
I edited /etc/apache2/envvars and appended a line
export LD_LIBRARY_PATH=/opt/sqlanywhere17/lib64:/opt/sqlanywhere17/lib32:$LD_LIBRARY_PATH
The error message changed to:
Environment:
Request Method: GET
Request URL: http://localhost:8080/
Django Version: 1.8
Python Version: 3.6.9
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog',
'sybase_app')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware')
Traceback:
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/core/handlers/base.py" in get_response
132. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3.6/contextlib.py" in inner
51. with self._recreate_cm():
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/transaction.py" in __enter__
150. if not connection.get_autocommit():
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/backends/base/base.py" in get_autocommit
286. self.ensure_connection()
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/backends/base/base.py" in ensure_connection
130. self.connect()
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/utils.py" in __exit__
97. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/utils/six.py" in reraise
658. raise value.with_traceback(tb)
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/backends/base/base.py" in ensure_connection
130. self.connect()
File "/home/pd/sibp/env/lib/python3.6/site-packages/django/db/backends/base/base.py" in connect
118. conn_params = self.get_connection_params()
File "/home/pd/sibp/env/lib/python3.6/site-packages/sqlany_django/base.py" in get_connection_params
517. root = Database.Root('PYTHON')
File "/home/pd/sibp/env/lib/python3.6/site-packages/sqlanydb.py" in __init__
480. API_VERSION_EX)
Exception Type: InterfaceError at /
Exception Value: Failed to initalize dbcapi context, dbcapi version 2 required. Perhaps you are missing some sqlanywhere libaries?
How can I fix it?
I solved it, so that I appended the file /opt/sqlanywhere17/bin64/sa_config.sh to /etc/apache2/envvars and restarted apache2.
I try to get my django page running on my server and stumble upon the following error message in my browser:
SuspiciousOperation at /lfp/filter/
The request's session was deleted before the request completed. The
user may have logged out in a concurrent request, for example.
The traceback you can find here:
Environment:
Request Method: GET
Request URL: http://localhost/pass/lfp/filter/
Django Version: 1.11.2
Python Version: 3.6.1
Installed Applications:
['django_tables2',
'pass_list.apps.PassListConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
65. return self.cursor.execute(sql, params)
File "/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py" in execute
328. return Database.Cursor.execute(self, query, params)
The above exception (attempt to write a readonly database) was the direct cause of the following exception:
File "/lib/python3.6/site-packages/django/contrib/sessions/backends/db.py" in save
87. obj.save(force_insert=must_create, force_update=not must_create, using=using)
File "/lib/python3.6/site-packages/django/db/models/base.py" in save
806. force_update=force_update, update_fields=update_fields)
File "/lib/python3.6/site-packages/django/db/models/base.py" in save_base
836. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/lib/python3.6/site-packages/django/db/models/base.py" in _save_table
903. forced_update)
File "/lib/python3.6/site-packages/django/db/models/base.py" in _do_update
953. return filtered._update(values) > 0
File "/lib/python3.6/site-packages/django/db/models/query.py" in _update
664. return query.get_compiler(self.db).execute_sql(CURSOR)
File "/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
1191. cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
886. raise original_exception
File "/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
876. cursor.execute(sql, params)
File "/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
80. return super(CursorDebugWrapper, self).execute(sql, params)
File "/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
65. return self.cursor.execute(sql, params)
File "/lib/python3.6/site-packages/django/db/utils.py" in __exit__
94. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/lib/python3.6/site-packages/django/utils/six.py" in reraise
685. raise value.with_traceback(tb)
File "/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
65. return self.cursor.execute(sql, params)
File "/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py" in execute
328. return Database.Cursor.execute(self, query, params)
During handling of the above exception (attempt to write a readonly database), another exception occurred:
File "/lib/python3.6/site-packages/django/contrib/sessions/middleware.py" in process_response
58. request.session.save()
File "/lib/python3.6/site-packages/django/contrib/sessions/backends/db.py" in save
94. raise UpdateError
During handling of the above exception (), another exception occurred:
File "/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/lib/python3.6/site-packages/django/utils/deprecation.py" in __call__
142. response = self.process_response(request, response)
File "/lib/python3.6/site-packages/django/contrib/sessions/middleware.py" in process_response
61. "The request's session was deleted before the "
Exception Type: SuspiciousOperation at /lfp/filter/
Exception Value: The request's session was deleted before the request completed. The user may have logged out in a concurrent request, for example.
How can I solve that issue?
I solved my problem. It was a problem with the access management. The file db.sqlite3 was just readable. Changing the rights solved my problem.
I upgraded Wagtail to version 1.10.1 and now when I try to log into admin I get column wagtailusers_userprofile.preferred_language does not exist error. The error seems obvious, but I am not sure how to fix it; I assumed the Wagtail upgrade would have handled it. Below is the traceback. Thank you.
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8001/admin/
Django Version: 1.11.2
Python Version: 3.5.0
Installed Applications:
['app',
'home',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django_summernote',
'rest_framework',
'wagtail.contrib.settings',
'wagtail.contrib.modeladmin',
'wagtail.wagtailcore',
'wagtail.wagtailadmin',
'wagtail.wagtaildocs',
'wagtail.wagtailsnippets',
'wagtail.wagtailusers',
'wagtail.wagtailimages',
'wagtail.wagtailembeds',
'wagtail.wagtailsearch',
'wagtail.wagtailsites',
'wagtail.wagtailredirects',
'wagtail.wagtailforms',
'wagtail.contrib.wagtailsitemaps',
'wagtail.contrib.wagtailroutablepage',
'wagtail.contrib.wagtailstyleguide',
'wagtailmenus',
'compressor',
'taggit',
'modelcluster',
'docs']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'wagtail.wagtailcore.middleware.SiteMiddleware',
'wagtail.wagtailredirects.middleware.RedirectMiddleware']
Traceback:
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/fields/related_descriptors.py" in __get__
385. rel_obj = getattr(instance, self.cache_name)
During handling of the above exception ('User' object has no attribute '_wagtail_userprofile_cache'), another exception occurred:
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
65. return self.cursor.execute(sql, params)
The above exception (column wagtailusers_userprofile.preferred_language does not exist
LINE 1: ...gtailusers_userprofile"."rejected_notifications", "wagtailus...
^
) was the direct cause of the following exception:
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/views/decorators/cache.py" in _cache_controlled
43. response = viewfunc(request, *args, **kw)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/wagtail/wagtailadmin/decorators.py" in decorated_view
25. if hasattr(user, 'wagtail_userprofile'):
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/utils/functional.py" in inner
239. return func(self._wrapped, *args)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/fields/related_descriptors.py" in __get__
393. rel_obj = self.get_queryset(instance=instance).get(**filter_args)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/query.py" in get
374. num = len(clone)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/query.py" in __len__
232. self._fetch_all()
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/query.py" in _fetch_all
1105. self._result_cache = list(self._iterable_class(self))
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/query.py" in __iter__
53. results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/sql/compiler.py" in execute_sql
886. raise original_exception
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/models/sql/compiler.py" in execute_sql
876. cursor.execute(sql, params)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
80. return super(CursorDebugWrapper, self).execute(sql, params)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
65. return self.cursor.execute(sql, params)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/utils.py" in __exit__
94. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/utils/six.py" in reraise
685. raise value.with_traceback(tb)
File "/Users/rooster/.pyenv/versions/3.5.0/envs/alpha_omega/lib/python3.5/site-packages/django/db/backends/utils.py" in execute
65. return self.cursor.execute(sql, params)
Exception Type: ProgrammingError at /admin/
Exception Value: column wagtailusers_userprofile.preferred_language does not exist
LINE 1: ...gtailusers_userprofile"."rejected_notifications", "wagtailus...
You need to run ./manage.py migrate.
After simple pip install -U django I'm receiving following error.
Environment:
Request Method: GET
Request URL: http://localhost:8000/shelf/
Django Version: 1.10
Python Version: 3.5.2
Installed Applications:
['django.contrib.sites',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'shelf',
'usermanagement',
'avatar',
'bootstrap3',
'star_ratings',
'imagekit',
'allauth',
'allauth.account',
'allauth.socialaccount']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\utils.py" in __getitem__
65. return self._engines[alias]
During handling of the above exception ('django'), another exception occurred:
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\backends\django.py" in get_package_libraries
126. module = import_module(entry[1])
File "C:\Users\piomo\DEV\Django\market-env\lib\importlib\__init__.py" in import_module
126. return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\templatetags\future.py" in <module>
4. from django.utils.deprecation import RemovedInDjango110Warning
During handling of the above exception (cannot import name 'RemovedInDjango110Warning'), another exception occurred:
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\core\handlers\exception.py" in inner
39. response = get_response(request)
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\core\handlers\base.py" in _legacy_get_response
249. response = self._get_response(request)
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\core\handlers\base.py" in _get_response
217. response = self.process_exception_by_middleware(e, request)
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\core\handlers\base.py" in _get_response
215. response = response.render()
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\response.py" in render
109. self.content = self.rendered_content
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\response.py" in rendered_content
84. template = self.resolve_template(self.template_name)
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\response.py" in resolve_template
66. return select_template(template, using=self.using)
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\loader.py" in select_template
44. engines = _engine_list(using)
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\loader.py" in _engine_list
72. return engines.all() if using is None else [engines[using]]
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\utils.py" in all
89. return [self[alias] for alias in self]
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\utils.py" in <listcomp>
89. return [self[alias] for alias in self]
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\utils.py" in __getitem__
80. engine = engine_cls(params)
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\backends\django.py" in __init__
30. options['libraries'] = self.get_templatetag_libraries(libraries)
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\backends\django.py" in get_templatetag_libraries
48. libraries = get_installed_libraries()
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\backends\django.py" in get_installed_libraries
113. for name in get_package_libraries(pkg):
File "C:\Users\piomo\DEV\Django\market-env\lib\site-packages\django\template\backends\django.py" in get_package_libraries
130. "trying to load '%s': %s" % (entry[1], e)
Exception Type: InvalidTemplateLibrary at /shelf/
Exception Value: Invalid template library specified. ImportError raised when trying to load 'django.templatetags.future': cannot import name 'RemovedInDjango110Warning'
Anyone? :)
Last time i saw RemovedInDjango110Warning it was in 1.9 and it was related to some = comparision in template, which was removed by me before update.
From the comments:
django/templatetags/future.py was deprecated and removed at version 1.10.
Uninstalling Django, removed django/ folder before re-installation will solve this issue.
https://github.com/digitalocean/netbox/issues/497
https://github.com/jazzband/django-debug-toolbar/issues/706
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I am testing django-userena demo project. I have installed sendmail.
I see this error when I sign up:
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/accounts/signup/
Django Version: 1.3.1
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'easy_thumbnails',
'guardian',
'south',
'userena',
'userena.contrib.umessages',
'demo_project.profiles']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'userena.middleware.UserenaLocaleMiddleware')
Traceback:
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/decorators.py" in _wrapped_view
28. return view_func(request, *args, **kwargs)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/views.py" in signup
69. if form.is_valid():
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/forms/forms.py" in is_valid
121. return self.is_bound and not bool(self.errors)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/forms/forms.py" in _get_errors
112. self.full_clean()
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/forms/forms.py" in full_clean
267. self._clean_fields()
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/forms/forms.py" in _clean_fields
287. value = getattr(self, 'clean_%s' % name)()
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/forms.py" in clean_username
49. user = User.objects.get(username__iexact=self.cleaned_data['username'])
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/manager.py" in get
132. return self.get_query_set().get(*args, **kwargs)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/query.py" in get
344. num = len(clone)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/query.py" in __len__
82. self._result_cache = list(self.iterator())
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/query.py" in iterator
273. for row in compiler.results_iter():
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter
680. for rows in self.execute_sql(MULTI):
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
735. cursor.execute(sql, params)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
34. return self.cursor.execute(sql, params)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py" in execute
86. return self.cursor.execute(query, args)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/MySQLdb/cursors.py" in execute
174. self.errorhandler(self, exc, value)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/MySQLdb/connections.py" in defaulterrorhandler
36. raise errorclass, errorvalue
Exception Type: DatabaseError at /accounts/signup/
Exception Value: (1146, "Table 'demo_project.auth_user' doesn't exist")
edit
Sorry I couldn't update this question earlier, i was so busy, when I run syncdb, i see this error
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/accounts/signup/
Django Version: 1.3.1
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'easy_thumbnails',
'guardian',
'south',
'userena',
'userena.contrib.umessages',
'demo_project.profiles']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'userena.middleware.UserenaLocaleMiddleware')
Traceback:
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/decorators.py" in _wrapped_view
28. return view_func(request, *args, **kwargs)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/views.py" in signup
70. user = form.save()
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/forms.py" in save
86. userena_settings.USERENA_ACTIVATION_REQUIRED)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/managers.py" in create_user
62. userena_profile = self.create_userena_profile(new_user)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/managers.py" in create_userena_profile
104. activation_key=activation_key)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/manager.py" in create
138. return self.get_query_set().create(**kwargs)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/query.py" in create
360. obj.save(force_insert=True, using=self.db)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/base.py" in save
460. self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
553. result = manager._insert(values, return_id=update_pk, using=using)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/manager.py" in _insert
195. return insert_query(self.model, values, **kwargs)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/query.py" in insert_query
1436. return query.get_compiler(using=using).execute_sql(return_id)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
791. cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
735. cursor.execute(sql, params)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
34. return self.cursor.execute(sql, params)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py" in execute
86. return self.cursor.execute(query, args)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/MySQLdb/cursors.py" in execute
174. self.errorhandler(self, exc, value)
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/MySQLdb/connections.py" in defaulterrorhandler
36. raise errorclass, errorvalue
Exception Type: DatabaseError at /accounts/signup/
Exception Value: (1146, "Table 'demo_project.userena_userenasignup' doesn't exist")
2nd EDIT
this is the output of syncdb
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
No fixtures found.
Synced:
> django.contrib.auth
> django.contrib.contenttypes
> django.contrib.sessions
> django.contrib.sites
> django.contrib.messages
> django.contrib.admin
> south
> demo_project.profiles
Not synced (use migrations):
- easy_thumbnails
- guardian
- userena
- userena.contrib.umessages
(use ./manage.py migrate to migrate these)
This is the output of ./manage.py migrate
Running migrations for easy_thumbnails:
- Nothing to migrate.
- Loading initial data for easy_thumbnails.
No fixtures found.
Running migrations for guardian:
- Nothing to migrate.
- Loading initial data for guardian.
No fixtures found.
Running migrations for userena:
- Nothing to migrate.
- Loading initial data for userena.
No fixtures found.
Running migrations for umessages:
- Nothing to migrate.
- Loading initial data for umessages.
No fixtures found.
please note that eventhough i am seeing the error, the username and email are being saved in the db.
if I login, it says your account has been disabled
if i try to reset my password it says
That e-mail address doesn't have an associated user account. Are you sure you've registered?
You need to run syncdb: manage.py syncdb
You've worked out that you need to also use the various south commands.
Now two questions arise: are you still getting these errors after running south (I assume you are); and secondly, does the table specified in the error message (Exception Value: (1146, "Table 'demo_project.userena_userenasignup' doesn't exist")) actually exist? Examine your database to work out if the table exists, and if so, if it exists in the right database.
I think you need to delete your database. Then do a manage.py syncdb and a manage.py migrate again on a fresh DB. When you run manage.py migrate it shouldn't give you the output you posted. Your output doesn't change or create any tables and that could be the issue. Perhaps the table you need hasn't been created.
This is what the output should look like after a manage.py syncdb.
This is what the output should look like after a manage.py migrate.
You should have 21 tables in total for the demo_project provided with userena.
For general help the steps to get this project working should be.
Create a virtual environment and pip install django-userena
Pull out the demo_project that comes with userena
Activate the virtualenv, cd to the project dir and do your manage.py syncdb and manage.py migrate
Run the project
I have done this now and can confirm that the demo_project will work if these steps are done.
*Remember that if you signup a user on the /accounts/signup/ page. That this user will not be able to signin to the /admin/ by default. And your superuser user will not be able to access his profile under /accounts/(profile)/ unless you give him a profile in the admin.