You layout.html needs to look into request.env.http_host for the requested host name and include a corresponding
<link href="{{=URL(r=request,c='static',request.env.http_host+'/ style.css')}}/> so every http_host has it own style.css and images under its own static folder. Massimo On Nov 23, 4:59 pm, David <digitalcry...@gmail.com> wrote: > Hi Massimo, > > Yes I saw the plugin and thought it was pretty fancy. I might have > missed the point on implementation of it. > > Here's a better look at what I am trying to do: > > www.example1.com---> css+ static files in their own home directory > (Independent of example2.com) > | > <========================================>web2py + postgresql (1 > installation) > |www.example2.com-----> css+ static files in their own home directory > (independent of example1.com) > > Both sites are virtual hosts which have their own static content that > is exclusive from each other which they can FTP in and out. This way > a user can upload their new layouts without affecting other sites. > Both sites will have the default layout of my choosing which can be > substituted for their own preferences if they want to change it. > > My thinking is that this would give the domain owner a simple way to > implement a custom "template" to modify the look and feel. I would > then present them with a small manual on the output tags that could be > used to implement boxes, feeds, products etc on their custom > templates. > > Both sites will share a common web2py for installation which also has > one postgresql installation. > What I've done in the postgresql side is added auth field (user_id) > and in the views I am pulling data based on user_id and I would like > to also pull based on request.env server name. On the named based > vhost side I would like apache2 to serve the static files. > > On Nov 23, 1:25 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > On Nov 23, 11:21 am, David <digitalcry...@gmail.com> wrote: > > > > Layouts should depend on the domain. > > > > But I don't want to have 50+ installations per server that need to be > > > update manually when I make changes to the code or bring enhancements. > > > > They don't need appadmin. I am writing a control panel for them to > > > manage users. > > > > Would it not be possible to share a single web2py installation for > > > multiple vhosts so I only need to update one directory on each server? > > > Yes you can. You never need more than one web2py installation. > > - You can have multiple apps under one web2py installation and map > > them ti different vhosts (in this case apache does the mapping) > > - You can have one app with multiple layouts depending on the vhosts > > but in this case (in this case web2py does the mapping) > > - You can have one layout.html and different CSS files depending on > > the vhosts > > > The best way really depends on what the differences are and who is > > allowed to edit these differences. Are they set once for all? Do you > > need to add more? Are the differences just in color and images or are > > they differences in the actual HTML? > > > have you looked intohttp://web2py.com/layouts? > > > > On Nov 23, 10:15 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > You should consider different approached depending on whether the > > > > layout depends on the domain or the user. If it depends on the domain > > > > and it is fixed for domain, I suggest different web2py apps with > > > > different set of views that talk to the same db. Usevirtualhosts to > > > > map domain into app. If the are per user, I would make the CSS dynamic > > > > and retrieve it from the a database based on user preferences. > > > > > On Nov 2, 2:28 pm, David Henry <digitalcry...@gmail.com> wrote: > > > > > > Hi Thadeus, > > > > > > Did you happen to have the information on how to set this up? > > > > > > I wanted one web2py with multiple applications that serve unique > > > > > views/ > > > > > html/css to users based on the domain used to access the site so > > > > > users > > > > > can customize the look and feel to their tastes. > > > > > > Thanks, > > > > > David > > > > > > On Nov 1, 2009, at 7:41 PM, Thadeus Burgess wrote: > > > > > > > I use virtualhosts on a per domain basis. You are wanting the same > > > > > > app, with the same data, but different layouts depending on domain, > > > > > > > > > > > > or do you want two completely separate apps per domain? > > > > > > > -Thadeus > > > > > > > On Sun, Nov 1, 2009 at 7:12 PM, David Henry > > > > > > <digitalcry...@gmail.com> wrote: > > > > > > uld I need symlinks to the virtualhost directory as we > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---