Re: custom form with admin look and feel
@Ayaz: I tried what you suggested, but the alignment of fields etc goes off for me. Is it possible for you to post an example django template, maybe on dpaste.com. Also I don't quite understand where all the javascript in the change_form is coming from.. On Jun 30, 8:29 pm, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote: > chefsmart wrote: > > I'm using django svn trunk. I have created several custom forms that > > show up in theadminsection of the website. However, these formslook > > nothing like theadminforms. I tried extending change_form.html > > template - unsuccessfully. > > > Does anyone know what my template should contain to achieveadminlook > > andfeel. > > > Thanks... > > Here is what I have been doing. I have been required to modify the > change_form templates in theadminfor some of the models. I open the > "add model item" page, view the source of the page, and copy the HTML > to a note pad. I then hack it, and use it to make the custom > change_form template. I only copy and hack the HTML within the > "breadcrumb" and "body content" blocks. The blocks above those, I > copy from the change_form.html template provided in > django/contrib/admin/templates/admin. The custom pages I have madelookno > different > than the DjangoAdminones. ;) > > -- > Ayaz Ahmed Khan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: custom form with admin look and feel
chefsmart wrote: > I'm using django svn trunk. I have created several custom forms that > show up in the admin section of the website. However, these forms look > nothing like the admin forms. I tried extending change_form.html > template - unsuccessfully. > > Does anyone know what my template should contain to achieve admin look > and feel. > > Thanks... Here is what I have been doing. I have been required to modify the change_form templates in the admin for some of the models. I open the "add model item" page, view the source of the page, and copy the HTML to a note pad. I then hack it, and use it to make the custom change_form template. I only copy and hack the HTML within the "breadcrumb" and "body content" blocks. The blocks above those, I copy from the change_form.html template provided in django/contrib/ admin/templates/admin. The custom pages I have made look no different than the Django Admin ones. ;) -- Ayaz Ahmed Khan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: custom form with admin look and feel
I tried this, but couldn't get the desired results. Specifically, I want to have the look and feel of the change_form (including add another, save buttons etc and how the fields are arranged on the page). I have noticed that the change_form has some specific css and javascript. Is this documented somewhere? On Jun 24, 5:57 pm, "José Moreira" <[EMAIL PROTECTED]> wrote: > i'm a neb but i think you should check the part aboutadmincss > development in the docs > > 2008/6/24 chefsmart <[EMAIL PROTECTED]>: > > > > > > > Thanks, I have tried that. But I guess my question really revolves > > around the design and css issues. I'm really bad at design aspects, > > and would like all my custom forms to have the look and feel of > > Django's automaticadminchange_forms (I have gone through theadmin > > css guide, but couldn't get it to work). I struggled with it hours on > > end, but couldn't achieve that look. If someone has already created > > custom forms withadminlook and feel, maybe they could share their > > expertise here - share the bare minimum (design) code required in the > > templates. > > > On Jun 23, 8:33 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote: > >> chefsmart wrote: > >> > I'm using django svn trunk. I have created several custom forms that > >> > show up in theadminsection of the website. However, these forms look > >> > nothing like theadminforms. I tried extending change_form.html > >> > template - unsuccessfully. > > >> > Does anyone know what my template should contain to achieveadminlook > >> > and feel. > > >> look in django/contrib/admin/templates > > >> extendingadmin/base_site.html is what I believe you want. > > >> -- > >> Norman J. Harman Jr. > >> Senior Web Specialist, Austin American-Statesman > >> ___ > >> You've got fun! Check out Austin360.com for all the entertainment > >> info you need to live it up in the big city! > > -- > José Moreira > Vila Nova de Gaia > Portugal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: custom form with admin look and feel
i'm a neb but i think you should check the part about admin css development in the docs 2008/6/24 chefsmart <[EMAIL PROTECTED]>: > > Thanks, I have tried that. But I guess my question really revolves > around the design and css issues. I'm really bad at design aspects, > and would like all my custom forms to have the look and feel of > Django's automatic admin change_forms (I have gone through the admin > css guide, but couldn't get it to work). I struggled with it hours on > end, but couldn't achieve that look. If someone has already created > custom forms with admin look and feel, maybe they could share their > expertise here - share the bare minimum (design) code required in the > templates. > > On Jun 23, 8:33 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote: >> chefsmart wrote: >> > I'm using django svn trunk. I have created several custom forms that >> > show up in the admin section of the website. However, these forms look >> > nothing like the admin forms. I tried extending change_form.html >> > template - unsuccessfully. >> >> > Does anyone know what my template should contain to achieve admin look >> > and feel. >> >> look in django/contrib/admin/templates >> >> extending admin/base_site.html is what I believe you want. >> >> -- >> Norman J. Harman Jr. >> Senior Web Specialist, Austin American-Statesman >> ___ >> You've got fun! Check out Austin360.com for all the entertainment >> info you need to live it up in the big city! > > > -- José Moreira Vila Nova de Gaia Portugal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: custom form with admin look and feel
Thanks, I have tried that. But I guess my question really revolves around the design and css issues. I'm really bad at design aspects, and would like all my custom forms to have the look and feel of Django's automatic admin change_forms (I have gone through the admin css guide, but couldn't get it to work). I struggled with it hours on end, but couldn't achieve that look. If someone has already created custom forms with admin look and feel, maybe they could share their expertise here - share the bare minimum (design) code required in the templates. On Jun 23, 8:33 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote: > chefsmart wrote: > > I'm using django svn trunk. I have created several custom forms that > > show up in the admin section of the website. However, these forms look > > nothing like the admin forms. I tried extending change_form.html > > template - unsuccessfully. > > > Does anyone know what my template should contain to achieve admin look > > and feel. > > look in django/contrib/admin/templates > > extending admin/base_site.html is what I believe you want. > > -- > Norman J. Harman Jr. > Senior Web Specialist, Austin American-Statesman > ___ > You've got fun! Check out Austin360.com for all the entertainment > info you need to live it up in the big city! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: custom form with admin look and feel
chefsmart wrote: > I'm using django svn trunk. I have created several custom forms that > show up in the admin section of the website. However, these forms look > nothing like the admin forms. I tried extending change_form.html > template - unsuccessfully. > > Does anyone know what my template should contain to achieve admin look > and feel. look in django/contrib/admin/templates extending admin/base_site.html is what I believe you want. -- Norman J. Harman Jr. Senior Web Specialist, Austin American-Statesman ___ You've got fun! Check out Austin360.com for all the entertainment info you need to live it up in the big city! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
custom form with admin look and feel
I'm using django svn trunk. I have created several custom forms that show up in the admin section of the website. However, these forms look nothing like the admin forms. I tried extending change_form.html template - unsuccessfully. Does anyone know what my template should contain to achieve admin look and feel. Thanks... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---