Re: Hidden field in Admin without label

2009-05-11 Thread PierreR
Thanks Andy, I don't know if there is a good way to do this without hacking the admin too much. I have been trying to get all hidden fields in a separate fieldset which seem more in line with the "fieldset" philosophy. I have created an __init__ method in my custom admin class (the one that exte

Re: Hidden field in Admin without label

2009-05-07 Thread Andy
Hello Pierre. I recently came across the exact same problem (and for the exact same reason) I don't think my solution was any less ugly that yours. I modified fieldset.html to look for a specific fieldset name. Anything in that fieldset is displayed in a manner which honors the hidden field prop

Re: Hidden field in Admin without label

2009-05-07 Thread PierreR
Thanks for your reply. My intention is to use this field as a version/timestamp to implement a form of optimistic locking. I need to receive it back from the user through a form and check it against the current version/timestamp of the updated record. I don't think "exclude" will work for me.

Re: Hidden field in Admin without label

2009-05-07 Thread Daniel Roseman
On May 7, 9:23 am, PierreR wrote: > That is what I do ! > (another way is to define a custom model field and override the > "formfield" method). > > But ... I cannot get rid off the label in the admin console. That is > my problem. > > Any easy way to remove the label of an hidden field in the ad

Re: Hidden field in Admin without label

2009-05-07 Thread PierreR
Well so far the only "not so ugly way" (in the sense that it is only one line of code) I have found to do this is to change the css directly (in my case admin.css): /* Hacky way to remove hidden field lavel in the Admin console */ div.form-row.last_modified { display: none;} On 7 mai, 09:23, Pier

Re: Hidden field in Admin without label

2009-05-07 Thread PierreR
That is what I do ! (another way is to define a custom model field and override the "formfield" method). But ... I cannot get rid off the label in the admin console. That is my problem. Any easy way to remove the label of an hidden field in the admin console ? Thanks. On 6 mai, 17:24, Daniel R

Re: Hidden field in Admin without label

2009-05-06 Thread Daniel Roseman
On May 6, 4:48 pm, PierreR wrote: > I don't seem to find a good way to have a hidden field in the admin > console. I can of course get the hidden field easily but the label is > still showing up. This problem is really related to the Admin app. > > I have been trying to "hack" the "fieldset.html"