Hello Again Guys!

With your guidance, I was able to get a pretty good idea on how to put
mini-content boxes on my website.

However, one thing I realized (with my still limited understanding of
Django), is that templatetags are actually coupled with apps. To
create templatetags, I must make it as a templatetags module inside my
apps. It doesn't look "loosely coupled" to me if I want to reuse the
same templatetag on different apps.

For example, the tip Daniel gave me at
http://www.b-list.org/weblog/2006/jun/07/django-tips-write-better-template-tags/
teaches how to create a "get_latest" tag which can be configured by
passing arguments to it from the template. But the "get_latest" tag
would only be coupled with the app where I created it. Even though it
can use different models from different apps. To use it on a different
app, I must rewrite the same templatetag module in another app. This
doesn't look DRY to me. So I think my idea on creating mini-content
boxes is wrong because my way is not DRY and Loosely Coupled.

I hope you can enlighten me on this one.

Thank you!

On Oct 13, 11:02 pm, bruno desthuilliers
<[EMAIL PROTECTED]> wrote:
> On 13 oct, 10:38, raeldc <[EMAIL PROTECTED]> wrote:
> (snip)
>
> > One of the things I'm wondering about is how to implementmini-content
> > boxes. It is known to Joomla as modules, in Drupal as blocks, to
> > others they are called widgets or side bars. In CMS systems, I can
> > assign acontent-box to be viewable on different pages or all pages
> > with simple point and click. In Django, I think I would have to call
> > the VIEW for thosecontentboxes in every VIEW where I want them
> > displayed. This method looks very redundant to me. Or maybe I'm still
> > in the stage of my learning where I haven't found the Django way that
> > deals with this. So I'm asking the experts on Django for guidance. How
> > do I implement easily manageable min-contentboxes on my Django
> > website? Is there a Django standard way? If none, can you please
> > suggest what you think is the best way to do this?
>
> There are/have been a couple efforts in this direction already. One of
> them seems to be abandonned by it's author, but could be reused as a
> basis for what you're after:http://code.google.com/p/django-modular/
>
> The other one seems much more alive, but barely documented at 
> all:http://code.google.com/p/django-app-plugins/
>
> HTH
--~--~---------~--~----~------------~-------~--~----~
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