Thanks for your reply. In an ideal world it would be great to present the same markup with different CSS for different devices, but this is for the Japanese market and some handsets there need to have inline styles and there are other limitations that mean I need separate templates.
I could use some sort of template switcher, but wouldn't this have a negative effect on cache? Also flatpages would not work as intended for multiple sites. I totally see what you are saying about SEO and it would not be Canonical with 2 subdomain's having almost the same content. On Mar 28, 3:42 pm, hynekcer <[email protected]> wrote: > Dan, > do you want to sell some products only to owners of mobile > devices? :-)) > What about risk, that you forget to assign one or even both sites to > the product? > > You probably need not a new site for mobile devices. This is also > better/recommended for search engines not to have the same content on > different domains. There is a risk that only one page from a random > domain would be indexed. You can use own context processor to get > information about user agent type and provide also an url to switch > between mobile/PC and store that info to session as having precedence > over autodetection if autodetection is not exact for some device. > > base.html > {% if thatcontextvariable = "mobile" %}mobile.css{% else %}normal.css. > etc. > > Hmm. You need different templates or even more? > A) Copy and modify filesystem template loader (it is short) and add > your conditional loader to the first place in TEMPLATE_LOADERS. > (Bruce's packages required by Satchmo inspired me.) > B) Something similar to threaded_multihost. Dynamically overwrite > something according some condition. If you need not multihreading, it > is easier/feasible do it safe. > > This would be probably a useful patch and would not have a negative > impact on the performance. > > > Is there anyway i can change this without forking Satchmo? > > Is there anyway you can change it with forking? > If you try > python manage.py test > after that change, you will probably see many errors, which take you > much longer time to solve them, despite of Satchmo efficiency. (due to > a new binding table. Some implementations have ~ 100 k products) > > On Mar 27, 8:14 pm, Chris Moffitt <[email protected]> wrote: > > > > > > > > > If you're interested in fleshing out your proposal, the best way to do it is > > fork satchmo on bitbucket and get your changes working. Once they look good, > > open a ticket for us to discuss and we'll take a look at merging. > > > You can create a fork here > > -https://bitbucket.org/chris1610/satchmo/changesets > > > Here's an article that was on the bitbucket site that talks about how to do > > forks and subsequent merges > > -http://www.techrepublic.com/blog/programming-and-development/contribu... > > > -Chris > > > On Sun, Mar 27, 2011 at 10:59 AM, Dan <[email protected]> wrote: > > > I want to have a single store that is browse-able on PC and mobile > > > devices, each with different templates. > > > > Usually with Django I will use the sites framework to create 2 sites > > > and use different settings for each so they can have different > > > templates. Things like django flatpages have a manytomany field for > > > sites so that a single page can appear on both sites or only one. > > > > With a Satchmo product you can only select a single site. > > > > Is there anyway i can change this without forking Satchmo? Or is there > > > some better solution to this issue? > > > > Thanks > > > > Also I think it would be an improvement if manytomany sites were > > > implemented in the base code, where can I make this suggestion? > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Satchmo users" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]. > > > For more options, visit this group at > > >http://groups.google.com/group/satchmo-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
