On Mar 15, 2010, at 12:54 PM, mdipierro wrote:

> Not at all. app level routes would be feasible and easy to implement.
> I just did not have the time. The issue is not implementing as much as
> designing the syntax.
> 
> Should the main routes delegate? Should it be explicit? Should it be
> implicit? (I think implicit)
> 
> That we have the issue of setting cache. It is a different one but
> related.
> 
> Should we bring this delegation one step further and have each static
> folder/subfolder have its own routes_cache?
> Why only static files?
> Should we have a routes.py and app level routes.py have a routes_cache]
> [...] that specifies the cache params for each path using the same
> syntax as routes_in? (I think do)
> 
> These is all easy to do and I can do it next week. I just do not want
> to rush an implementation  without hearing a few more opinions.

I'd like to think about it in the context of reworking the whole 
URL-parsing/routing mechanism, but that needn't stop something quicker, since 
any change along those lines will eventually be modular.

A side note: for the app I'm working on now, I put my routes file in private/ 
and then soft-link to it from the web2py root. Obviously that's not per-app 
routing, but it's convenient for me.

> 
> Massimo
> 
> On Mar 15, 2:15 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
>> I was just raising the point that if we are going to have routes for
>> static files, why not have routes for the app while we are at it?
>> 
>> At least this way, the routes would be more "portable" so that routes
>> can then be packed along with your app?
>> 
>> Or would this be trying to open a can of worms that should stay closed?
>> 
>> -Thadeus
>> 
>> On Mon, Mar 15, 2010 at 12:08 PM, mdipierro <mdipie...@cs.depaul.edu> wrote:
>>> shold this problem be solved as part of an app-level routes? I was
>>> looking at it as different.
>> 
>>> On Mar 15, 11:42 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
>>>> Ahah! One step closer to app level routes!
>> 
>>>> -Thadeus
>> 
>>>> On Mon, Mar 15, 2010 at 11:15 AM, mdipierro <mdipie...@cs.depaul.edu> 
>>>> wrote:
>>>>> You raise a good point. There is no way to do it because I assume on a
>>>>> production system this should be done by the web server.
>>>>> Perhaps we should have something like routes.static.py in the static
>>>>> folder with cache configuration options for the files in there.
>> 
>>>>> On Mar 15, 11:00 am, "mr.freeze" <nat...@freezable.com> wrote:
>>>>>> Yes, static files.  I am basically asking how to set the cache control
>>>>>> headers for static files.  Models don't get processed so I'm not sure
>>>>>> where to do it without hacking main.py. Am I thinking about this
>>>>>> wrong?
>> 
>>>>>> On Mar 15, 10:37 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
>> 
>>>>>>> Static files? In the end it is the browser that caches them. web2py
>>>>>>> does not ask the browser to cache them.
>> 
>>>>>>> You can try serve them using a custom controller. In this case web2py
>>>>>>> would do (under the hood):
>>>>>>>             response.headers['Content-Type'] =
>>>>>>> contenttype('.'+request.extension)
>>>>>>>             response.headers['Cache-Control'] = \
>>>>>>>                 'no-store, no-cache, must-revalidate, post-check=0,
>>>>>>> pre-check=0'
>>>>>>>             response.headers['Expires'] = \
>>>>>>>                 time.strftime('%a, %d %b %Y %H:%M:%S GMT',
>>>>>>> time.gmtime())
>>>>>>>             response.headers['Pragma'] = 'no-cache'
>> 
>>>>>>> The browser may still ignore it.
>> 
>>>>>>> On Mar 15, 10:23 am, "mr.freeze" <nat...@freezable.com> wrote:
>> 
>>>>>>>> What is the best way to prevent caching of all files in a subfolder of
>>>>>>>> static from being cached.  The files are served by web2py. Any help is
>>>>>>>> appreciated.
>> 
>>>>>>>> Thanks,
>>>>>>>> Nathan
>> 
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups 
>>>>> "web2py-users" group.
>>>>> To post to this group, send email to web...@googlegroups.com.
>>>>> To unsubscribe from this group, send email to 
>>>>> web2py+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group 
>>>>> athttp://groups.google.com/group/web2py?hl=en.
>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "web2py-users" group.
>>> To post to this group, send email to web...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> web2py+unsubscr...@googlegroups.com.
>>> For more options, visit this group 
>>> athttp://groups.google.com/group/web2py?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@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.
> 


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

Reply via email to