>> (1) I'd like to include little snippets from each app on
>> another app's pages.  For instance, a little "widget" in a
>> sidebar of my blog software that has some random pictures
>> from the photo management.  Is there any suggestion on how
>> to do this?
> 
> Template Tags!
> 
> http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-tags

I second David's recommendation.  In particular, I suggest 
skimming down from there to

http://www.djangoproject.com/documentation/templates_python/#inclusion-tags

which makes it fairly easy to separate the presentation (stashed 
in a template, where editing the HTML becomes fairly easy) from 
the data view.

As a side question:
Is there any convention used by the Django overlords for storing 
inclusion-tag templates?  Just toss all the inclusion-tag 
templates in the projname/appname/templates/ with the full page 
templates?  Or cordon them off in a separate sub-directory?  And 
if using a separate sub-directory, is there a preferred naming 
convention (such as "templates/tags/")?  Or shove them in some 
place outside of the projname/appname/templates/ directory?

-tim







--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to