Hi again, My current thinking is to isolate the common piece of template into a seperate .html file, and include it from different templates and views. Now I'm wondering if it would be possible to reuse the view (which is at the moment of writing a generic view).
Ideally, I would like to have a urls like: /mycoolfeed and /embed/mycoolfeed that both fetch exactly the same data from the database, but render a different template based upon the url. How would you do this? Thanks! Nick. On Apr 9, 3:57 pm, Nick Boucart <nbouc...@gmail.com> wrote: > Hi, > > I'm pretty new to django, so bear with me ;) > > I'm developing a little web application prototype, that I would like > to have an igoogle widget for. The content in that iggoogle widget > should be similar then a regular view, but without header, sidebar, > navigation, etc. > > (for an example of what I would like to do, see the friendfeed igoogle > widget: athttp://friendfeed.com/embed/googlegadgetyou get the > standard friendfeed functionallity, but without sidebars, navigation, > etc, just the main feed) > > I would like to reuse as much of my existing code, i.e. view code and > template code, to keep it DRY. My first thought was to include a > different base.html template when the url of that view was like /embed/ > my_url so but I'm not sure if that is the best approach. > > I hope my question is clear. Any thoughts? > > Many thanks! > Nick. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---