You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On latest develop, django 1.6.2, one language installed, i18n disabled.
Through the admin, when I try to create a static placeholder I get the following:
Environment:
Request Method: POST
Request URL: http://educationsante.dev:8000/admin/cms/staticplaceholder/add/
Django Version: 1.6
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'djangocms_admin_style',
'django.contrib.admin',
'south',
'django_extensions',
'djangocms_text_ckeditor',
'cms',
'mptt',
'menus',
'sekizai',
'filer',
'cmsplugin_filer_file',
'reversion',
'easy_thumbnails',
'debug_toolbar')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.common.CommonMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware')
Traceback:
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
114. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
430. return self.admin_site.admin_view(view)(*args, **kwargs)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
99. response = view_func(request, *args, **kwargs)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
52. response = view_func(request, *args, **kwargs)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
198. return view(request, *args, **kwargs)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
29. return bound_func(*args, **kwargs)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
99. response = view_func(request, *args, **kwargs)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
25. return func(self, *args2, **kwargs2)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/transaction.py" in inner
339. return func(*args, **kwargs)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in add_view
1129. self.save_model(request, new_object, form, False)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in save_model
858. obj.save()
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/models/base.py" in save
545. force_update=force_update, update_fields=update_fields)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
573. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/models/base.py" in _save_table
654. result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/models/base.py" in _do_insert
687. using=using, raw=raw)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/models/manager.py" in _insert
232. return insert_query(self.model, objs, fields, **kwargs)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/models/query.py" in insert_query
1511. return query.get_compiler(using=using).execute_sql(return_id)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
898. cursor.execute(sql, params)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
69. return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
53. return self.cursor.execute(sql, params)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/utils.py" in __exit__
99. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/vagrant/.virtualenvs/education_sante/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
53. return self.cursor.execute(sql, params)
Exception Type: IntegrityError at /admin/cms/staticplaceholder/add/
Exception Value: null value in column "site_id" violates not-null constraint
I'm not yet very used to the way static_placeholder works, but looking at the code it seems that only the template tag is creating it with a site assigned.
Should I override the Model save method to always put the current site_id ? Use a signal ? Whats the recommended way ?
The text was updated successfully, but these errors were encountered:
On latest develop, django 1.6.2, one language installed, i18n disabled.
Through the admin, when I try to create a static placeholder I get the following:
I'm not yet very used to the way static_placeholder works, but looking at the code it seems that only the template tag is creating it with a site assigned.
Should I override the Model save method to always put the current site_id ? Use a signal ? Whats the recommended way ?
The text was updated successfully, but these errors were encountered: