error in admin page when editing using django-multilingual-ng on django 1.3
mo-mughrabi opened this issue · comments
Hi, am not sure if this is the right place to report this issue and also am not sure if what am facing is an issue in multilingual-ng or am just doing it wrong :)
so, here is what i did and what I got
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")
in my admin.py
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)
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
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
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/contrib/admin/options.py" in wrapper
response = callback(request, _callback_args, *_callback_kwargs)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapped_view
return self.admin_site.admin_view(view)(_args, *_kwargs)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
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
response = view_func(request, _args, *_kwargs)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/multilingual/admin.py" in wrapped
return view(request, _args, *_kwargs)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/multilingual/admin.py" in change_view
resp = func(cls, request, _args, *_kwargs)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/utils/decorators.py" in _wrapper
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 _wrapped_view
return bound_func(_args, *_kwargs)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/utils/decorators.py" in bound_func
response = view_func(request, _args, *_kwargs)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/db/transaction.py" in inner
return func(self, _args2, *_kwargs2)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/contrib/admin/options.py" in change_view
res = func(_args, *_kwargs)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/contrib/admin/options.py" in get_object
obj = self.get_object(request, unquote(object_id))
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/db/models/query.py" in get
return queryset.get(pk=object_id)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/db/models/query.py" in filter
clone = self.filter(_args, *_kwargs)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/db/models/query.py" in _filter_or_exclude
return self._filter_or_exclude(False, _args, *_kwargs)
-
File "/users/mo/Projects/python-envs/mazban/lib/python2.6/site-packages/django/db/models/sql/query.py" in add_q
clone.query.add_q(Q(_args, *_kwargs))
-
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'
any idea?
Please read the description of this project on github: THIS PROJECT IS NOT SUPPORTED AND SHOULD NOT BE USED UNLESS YOU KNOW EXACTLY WHAT YOU'RE DOING!!!
you didn't have to copy and paste the disclaimer from the homepage. It was obvious, but, I saw that people are reporting issues, and you responded to some of them. I didn't know you pick your audience though :)
@mo-mughrabi, sorry for the rude response. I'm not really picking my audience, I just really don't want to support this anymore, it's (as you also noticed) way too buggy. I just wanted to make that clear to you so you don't get your hopes up that I will fix this.