Wiadomość napisana w dniu 2009-12-22, o godz. 10:38, przez adrian_m:

> I'm developing a web application that is intended only for mobile
> use.  I want to implement some kind of 'themes'  :   have a list  of
> templates/stylesheets and make it possible that each user chooses one
> of them for visualisation. The number of users is small and all of
> them will use a specific phone model.
>
> My main concern is that i'm not sure what's the best approach :
> - have one set of templates  , and multiple stylesheets .  The base
> template loads the stylessheet specified by a variable set in the
> views.
> - or, have multiple sets of templates  (one theme is separate set of
> templates).
> - or, something else (?)
>
> My feeling is that the first solution is more compact and simpler to
> implement, but it could be restrictive for future development (i'm
> missing the experience to be confident about this ).
>
> The second solution seems to be more flexible ,   but it introduces a
> lot of redundancy between the alternate views.  Basically, only the
> base template will differ from one theme to the other.  The rest of
> the templates will typically be the same regardless the theme.


I did such thing once. We used solution similar to your 1st approach -  
we had a context processor that modified the value of MEDIA_URL  
according to selected theme. This way, we had separate media set for  
each theme. But it appeared not enough for one of customers and we  
added extra template loader for the case similar to your 2nd approach.

-- 
Artificial intelligence stands no chance against natural stupidity

Jarek Zgoda, R&D, Redefine
jarek.zg...@redefine.pl

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.


Reply via email to