Re: Generic relations swamp

2009-04-14 Thread zayatzz
Ok your idea worked just fine, but i keep coming up with new questions :) The result of it was that when i opened poll i got poll with name So i wrote something (i dont know how its called - model instance? model manager?) to retrieve the actual value of translation and my poll model looks like

Re: Generic relations swamp

2009-04-14 Thread zayatzz
On Apr 14, 3:45 pm, matehat wrote: > Sorry about the last post (was a little tired from a sleepless night > of solving problems in physics ...). I think you can solve the issue > by putting "return unicode(self.name)" instead of "return self.name" > in all of the __unicode__ method of your mode

Re: Generic relations swamp

2009-04-14 Thread matehat
Sorry about the last post (was a little tired from a sleepless night of solving problems in physics ...). I think you can solve the issue by putting "return unicode(self.name)" instead of "return self.name" in all of the __unicode__ method of your models. The things is that you must make sure to r

Re: Generic relations swamp

2009-04-12 Thread zayatzz
Admin for language: from kyss.front.models import lang from django.contrib import admin class FrontAdmin(admin.ModelAdmin): fieldsets = [ ('General info', {'fields': ['name', 'short', 'locale', 'encoding', 'url', 'fdef', 'bdef']}), ('SEO stuff', {'fields':

Re: Generic relations swamp

2009-04-12 Thread matehat
Hi, can you show us the code for each of your admin classes? This probably has something to do with some method overrides, but I can't say much about the cause of your problem from the error message you gave... Cheers Mathieu --~--~-~--~~~---~--~~ You received th

Re: Generic relations swamp

2009-04-11 Thread zayatzz
I realise im kind of spamming here, but does nobody really has encountered similar problem? Alan. On Apr 11, 12:07 am, zayatzz wrote: > Ok, I did some search on web and i took closer look at the > errormessage. : > > Request information > GET > > No GET data > POST > Variable        Value > pol

Re: Generic relations swamp

2009-04-10 Thread zayatzz
Ok, I did some search on web and i took closer look at the errormessage. : Request information GET No GET data POST VariableValue poll-trans-content_type-object_id-0-keel u'1' poll-trans-content_type-object_id-0-id u'' poll-trans-content_type-object_id-1-keel u'2' poll-trans-content_type

Re: Generic relations swamp

2009-04-10 Thread zayatzz
does anyone know how to solve this problem? Alan On 9 apr, 21:54, zayatzz wrote: > Thanks. > > That worked for enabling translations for poll names - i had to insert > 'from django.contrib.contenttypes import generic', right? > It worked, but it raised few more questions. When creating poll i g

Re: Generic relations swamp

2009-04-09 Thread zayatzz
Thanks. That worked for enabling translations for poll names - i had to insert 'from django.contrib.contenttypes import generic', right? It worked, but it raised few more questions. When creating poll i get lines for name translations now and in front of each of them there is language drop down m

Re: Generic relations swamp

2009-04-09 Thread matehat
First of all, the ModelAdmin needs to know about how to handle the generic relations and whether you even need them to appear. You need to subclass "generic.GenericTabularInline" (in the same way you subclassed "admin.ModelAdmin") and specify fields you want to be able to edit on that Trans object