On Jan 16, 2008 3:58 AM, Jorge Godoy <[EMAIL PROTECTED]> wrote:
>
> Em Wednesday 16 January 2008 01:11:10 Lukasz Szybalski escreveu:
> > Hello,
> > As I write new apps in turbogears and then upload them to the server,
> > I am starting to run into problems like which /static content am I
> > suppose to be using and how?
>
> Each application has its own /static.  You can have a more generic one if you
> want to share things.
>
> Also note that TG's /static (such as to load MochiKit) is shared among all
> applications.
>
> > So right now I have 4 turbogears apps working on my server. The first
> > app uses apache /static/ which proxies to my some port 8080/static/ .
> > Well now my second app needs to use /static/ and what I did is to move
> > the new images/css to my first app
> > /usr/lib/python2.4/site-packages/myfirstapp-1.0-py2.4.egg/myfirstapp/static
>
> All apps on the same domain and same path?  If not, you answered your doubt:
> proxy /path1/static to one app, /path2/static to another and so on.
>

The problem with tg apps is that they don't have the /path2/static
they have /static
so my apache config has:

ProxyPass /static/ http://127.0.0.1:8081/static/
then second app would have:
ProxyPass /static/ http://127.0.0.1:8082/static/
third:
ProxyPass /static/ http://127.0.0.1:8083/static/
etc.....

How would I modify my tg app to use
/parth1/static?

I see there is a :
static_filter.dir = "%(top_level_dir)s/static"
in app.cfg so I guess I could do the
static_filter.dir = "%(top_level_dir)s/static1"  (first app)
static_filter.dir = "%(top_level_dir)s/static2" (second app)
static_filter.dir = "%(top_level_dir)s/static3" (third app)


> Also I wouldn't recommend giving Apache access to your lib directories like
> you did above.  Install the app's static files somewhere else and map it
> accordingly or put the whole app on another directory.
>
> > Isn't there a bettter way to reuse these parts of the turbogears
> > project? How are you guys doing it?
>
> If they are common, make it a module in itself and just import from it.

 I'm not sure what you mean here?

>Or
> put it in a "standard" repository in your webserver path and that's it.
If I do that then now I have to manage my static content which is what
I have to do now.

I guess the solution here is to rename static to static1 or
static-myproject or some other name and make corresponding change in
app.cfg?

Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to