There's a topic in this group about general guidelines to packaging  
and distribution of pluggable apps.

About templates, I'm sure you should include them under the app  
directory. Project template directory is normally searched before app  
template directories so any implementors of your app can easily  
override your templates with their own without touching your app  
template files. Also, if you provide base.html, the project template  
directory normally overrides that, too, although I guess most projects  
have their own base.html anyway so your main concern with that should  
be about which blocks to provide from you app templates and not  
whether to provide a base.html or not.

Hope that helps.

Erik

On 16.09.2008, at 4:23, shacker wrote:

>
> I'm building a pluggable app and getting ready to push it out.  I'm
> trying to figure out the best way to distribute templates and media
> (css, js, images) with it.
>
> My initial approach was to provide a "samples/templates" and "samples/
> media" within the dist but outside of the app, and let implementers
> decide what to take and what to put where. That requires a bit of
> extra work for the implementer, but seems safe and flexible.
>
> Then I received feedback wondering why I didn't include templates and
> media inside the app. My response to this was that if someone deploys
> it directly from svn, and I update a template in the repo and they svn
> up, their site would be immediately affected by my template changes.
> That could get messy.
>
> On the other hand, if I don't include templates inside the app but I
> update them in the repo, deploying sites might not gain the new
> functionality in updated templates.
>
> Looking at other pluggable apps, I see that many of them do include
> the templates directly in the app. But since I also need to distribute
> media, it gets messier still. settings.py doesn't give you a tuple for
> media locations - you just get one.
>
> And what about base.html ? Is it standard practice to include a
> base.html, thus overriding the  design of the project you're installed
> in, or not to? I'd like to include a bit of navigation within my app,
> so it's desirable...
>
> Basically I'm looking for some kind of "best practices" guide for the
> layout of pluggable apps. Is there one ?
>
> Thanks,
> Scot
>
>
>
> >


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