formsets management_form

2010-03-04 Thread gregor kling
Hello, I may do something, what the formsets are not intended for. I have forms which assort data of several different Models. This is because of aggregating data in logical blocks in the UI. Additionally I have some fields, which have to be filled dynamically. There is as well the possibility fo

Re: accessing pk of an existing object in ModelForm

2009-11-23 Thread Gregor Kling
Daniel Roseman wrote: > On Nov 23, 2:57 pm, hg7581 wrote: > >> Hello there, >> For doing some sanity checks, I need the primary key (pk) of an >> (already existing) object in a ModelForm. >> >> What works for me in the meantime, ist the following (admin interface): >> >> class NF(ModelForm): >>

Re: ModelForm/clean_

2009-03-06 Thread gregor kling
Daniel Roseman wrote: > On Mar 6, 10:37 am, gregor kling > wrote: >> Hello List, >> >> I have a form inheriting from ModelForm. >> class C(ModelForm): >> >> >> class Meta: >> model = SomeModel >> >> def cl

ModelForm/clean_

2009-03-06 Thread gregor kling
Hello List, I have a form inheriting from ModelForm. class C(ModelForm): class Meta: model = SomeModel def clean_somefield: enhanced checks Now my problem is how to access session data (request.session) from within the clean method. Does anyone have a clue how

User tampered with session cookie

2007-01-16 Thread Gregor Kling
hon-django 0.95-1,no php,apache2.2.3-3.2. Another question is how to delete a session explicitly. I want to give the user the possibilty to logout. I do not find anything to delete the session? thx. -- Gregor Kling DV-Zentrum Fachhochschule G

Re: iteration over non-sequence and other quirks

2006-12-20 Thread Gregor Kling
Damn me, it was all my fault :-) Django gave me exactly, nearly, the hint. Regrettably django provided me with the false line number. So I have searched everywhere but the right position. django claimed 'The iteration over non sequence error' at the outer for-loop, but the problen was indeed in o

Re: iteration over non-sequence and other quirks

2006-12-20 Thread Gregor Kling
Gregor Kling wrote: {% for ndata in ndatas %} <--- iteration over nonsequence Netzdaten Ethernet-Adresse:* DHCP aktivieren ?:* {% for doption in dhcpopti

iteration over non-sequence and other quirks

2006-12-20 Thread Gregor Kling
Hello, I do get an iteration over non sequence error. If I make a normal in python code everything works as assumed, but I if let django iterate over , it says iteration over The weird thing is, that it worked sometime ago, but I can't recall whats the difference between know and the time i