Re: Stupid noob question - admin link
Thanks everyone for your answers. Lots to learn here, but sure is fun! On Sep 10, 1:03 pm, AmanKow <[EMAIL PROTECTED]> wrote: > > Summary : You could simply copy the file base_site.html from admin > > templates to a directory called "admin" in your own template directory > > and add a link to your own pages in {% block branding %} so you would > > have access to the link on every admin page. > > Actually, there is an empty block defined in base.html to serve this > purpose: > > {% block nav-global %} > > Main | > Grants | > Global | > Site > > {% endblock %} > > I use the above in a custom base_site.html and it works great --~--~-~--~~~---~--~~ 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: Stupid noob question - admin link
> Summary : You could simply copy the file base_site.html from admin > templates to a directory called "admin" in your own template directory > and add a link to your own pages in {% block branding %} so you would > have access to the link on every admin page. Actually, there is an empty block defined in base.html to serve this purpose: {% block nav-global %} Main | Grants | Global | Site {% endblock %} I use the above in a custom base_site.html and it works great --~--~-~--~~~---~--~~ 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: Stupid noob question - admin link
Hi Daniel. I think this is way more complex than what I want. I have a main page (e..g. the default page in my web root). It is really just a title page with several links, one of which is to my admin site to add/update objects. I just want a straight link back on the admin page to the page in my root where I came from, so the user can navigate there after completing whatever they were doing in admin. On Sep 9, 3:42 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 9, 7:16 pm, Peter Bailey <[EMAIL PROTECTED]> wrote: > > > Hi all, starting to think there is so much stuff in django and python > > that I will never learn it all. I am building a site that used the > > admin piece for most of the CRUD and a few other pages for the rest of > > my requirements. I link to the admin from my main app page, and would > > like to be able to link back the other way. Don't see an obvious way > > to do this. Can anyone tell me a easy way to add a hyperlink from the > > main admin page to somewhere else outside the admin app. > > > Thanks, and sorry for the dumb question. > > > Peter > > If you define a get_absolute_url() method on your model, you'll get an > automatic 'view on site' link from the editing page in the admin which > goes to the view defined by that method - > seehttp://docs.djangoproject.com/en/dev/ref/models/instances/#get-absolu... > . Is that what you want? > -- > DR --~--~-~--~~~---~--~~ 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: Stupid noob question - admin link
On Sep 9, 8:16 pm, Peter Bailey <[EMAIL PROTECTED]> wrote: > Can anyone tell me a easy way to add a hyperlink from the > main admin page to somewhere else outside the admin app. You should probably read : http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates Summary : You could simply copy the file base_site.html from admin templates to a directory called "admin" in your own template directory and add a link to your own pages in {% block branding %} so you would have access to the link on every admin page. Have fun with Django. Denis --~--~-~--~~~---~--~~ 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: Stupid noob question - admin link
On Sep 9, 7:16 pm, Peter Bailey <[EMAIL PROTECTED]> wrote: > Hi all, starting to think there is so much stuff in django and python > that I will never learn it all. I am building a site that used the > admin piece for most of the CRUD and a few other pages for the rest of > my requirements. I link to the admin from my main app page, and would > like to be able to link back the other way. Don't see an obvious way > to do this. Can anyone tell me a easy way to add a hyperlink from the > main admin page to somewhere else outside the admin app. > > Thanks, and sorry for the dumb question. > > Peter If you define a get_absolute_url() method on your model, you'll get an automatic 'view on site' link from the editing page in the admin which goes to the view defined by that method - see http://docs.djangoproject.com/en/dev/ref/models/instances/#get-absolute-url . Is that what you want? -- DR --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Stupid noob question - admin link
Hi all, starting to think there is so much stuff in django and python that I will never learn it all. I am building a site that used the admin piece for most of the CRUD and a few other pages for the rest of my requirements. I link to the admin from my main app page, and would like to be able to link back the other way. Don't see an obvious way to do this. Can anyone tell me a easy way to add a hyperlink from the main admin page to somewhere else outside the admin app. Thanks, and sorry for the dumb question. Peter --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---