Note that there are some explanatory texts on larger screens.

plurals
  1. POerror in admin page when editing using django-multilingual-ng on django 1.3
    primarykey
    data
    text
    <p>am trying to switch my application to use multilingual-ng, unfortunutely though, there is very little documentation and FAQ's online. I hope someone would be able to tell what is going on with my practice, </p> <p>following is my model</p> <pre><code>class Main(models.Model): """ Main Class for all categories """ slug = models.SlugField() is_active = models.BooleanField(default=True) site = models.ForeignKey(Site) parent = models.ForeignKey('self', blank=True, null=True) class Translation(TranslationModel): title = models.CharField(max_length=100) label = models.CharField(max_length=100, blank=True, null=True) description = models.TextField(blank=True, null=True) disclaimer = models.TextField(blank=True, null=True) class Meta: unique_together = (("slug", "parent")) def __unicode__(self): return self.title if self.title is not None else _("No translation") </code></pre> <p>and following is my admin.py </p> <pre><code>class MainAdmin(MultilingualModelAdmin): ''' Multilingual interface for Main category ''' class ListAdmin(MultilingualModelAdmin): ''' Multilingual interface for Main category ''' admin.site.register(Main, MainAdmin) admin.site.register(List, ListAdmin) </code></pre> <p>When I access my admin panel, I can see the model, list of items, add new items but when I try to edit an existing item or delete one I get the followng error</p> <pre><code> Environment: Request Method: GET Request URL: http://mazban.com/admin/category/main/1/ Django Version: 1.3 Python Version: 2.6.1 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.admindocs', 'compressor', 'django.contrib.gis', 'multilingual', 'mazban.lib.apps.core', 'mazban.lib.apps.gis', 'mazban.apps.global', 'mazban.apps.listing', 'mazban.apps.listing.post', 'mazban.apps.listing.home', 'mazban.apps.listing.engine', 'mazban.apps.listing.category'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware', 'mazban.lib.MiddleWare.custom.RequestIsMobile') Traceback: File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response 111. response = callback(request, *callback_args, **callback_kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/contrib/admin/options.py" in wrapper 307. return self.admin_site.admin_view(view)(*args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapped_view 93. response = view_func(request, *args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func 79. response = view_func(request, *args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/contrib/admin/sites.py" in inner 197. return view(request, *args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/multilingual/admin.py" in wrapped 31. resp = func(cls, request, *args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/multilingual/admin.py" in change_view 277. return super(MultilingualModelAdmin, self).change_view(*args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapper 28. return bound_func(*args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapped_view 93. response = view_func(request, *args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/utils/decorators.py" in bound_func 24. return func(self, *args2, **kwargs2) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/db/transaction.py" in inner 217. res = func(*args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/contrib/admin/options.py" in change_view 947. obj = self.get_object(request, unquote(object_id)) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/contrib/admin/options.py" in get_object 451. return queryset.get(pk=object_id) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/db/models/query.py" in get 341. clone = self.filter(*args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/db/models/query.py" in filter 550. return self._filter_or_exclude(False, *args, **kwargs) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/db/models/query.py" in _filter_or_exclude 568. clone.query.add_q(Q(*args, **kwargs)) File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/db/models/sql/query.py" in add_q 1172. can_reuse=used_aliases, force_having=force_having) Exception Type: TypeError at /admin/category/main/1/ Exception Value: add_filter() got an unexpected keyword argument 'force_having' </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload