Installed fine. On trunk it's ok for all cases, but for vanilla 1.99.7 the
check for ? in globals.py isn't there, so both 2nd and 4th are not working.
Incidentally, I had a different scaffolding app for 1.99.7 that didn't use
response.include_files(), so that's because it was working for me in
1.99.7. Sorry.
On Thursday, August 30, 2012 10:55:10 PM UTC+2, Yarin wrote:
>
> Niphlod- here you go, a brand new example app created as follows:
>
>
> 1. Created basic app in admin
> 2. In layout.html, modified the include styles section as follows:
>
> <!-- include stylesheets -->
> {{
> response.files.append(URL('static','css/skeleton.css'))
> response.files.append(URL('static','css/web2py.css'))
> if response.menu:
> response.files.append(URL('static','css/superfish.css'))
> response.files.append(URL('static','js/superfish.js'))
> pass
>
> #response.files.append(URL('static','css/main.css')) # WORKS
> #response.files.append(URL('static','css/main.css',vars=dict(v='123'))) #
> DOESN'T WORK
> #response.files.append('/cache_test/static/css/main.css') # WORKS
> #response.files.append('/cache_test/static/css/main.css?v=123') # DOESN'T
> WORK
>
> }}
>
> {{include 'web2py_ajax.html'}}
>
> main.css:
> * {
> color:red;
> }
>
> That is it- i've indicated which ones work and which don't.
>
> (Incidentally, I and others have had issues installing apps packed on my
> macbook. Let me know if this app installs for you)
>
> Platform: OSX 19.6.8 / web2py 1.99.7 / Chrome+Safari
>
> On Thursday, August 30, 2012 4:32:40 PM UTC-4, Niphlod wrote:
>>
>> if you can pack a minimalist app to reproduce I'll be happy to help.
>>
>> On Thursday, August 30, 2012 10:23:36 PM UTC+2, Yarin wrote:
>>>
>>> I swear both the URL(..., vars=) and the non-serialized URLs both aren't
>>> working- I'm on 1.99.7, with the code in the right place in front
>>> of include web2py_ajax.html, together with all my other working scripts and
>>> styles. optimize_css is not enabled, and doesn't appear to be any sort of
>>> caching problem. Tested on chrome and safari. No clue..
>>>
>>> I'll have to test further on a new project and try to drill down into
>>> what's going on- will report back.
>>>
>>> @Rochacbruno, you said you ran into the same thing. Can you verify?
>>>
>>> On Thursday, August 30, 2012 4:10:51 PM UTC-4, Niphlod wrote:
>>>>
>>>> what version are you using ? both those notations should work ok (just
>>>> tested in latest trunk and 1.99.7)
>>>> Web2py does not have a problem with appended vars, it's only that if
>>>> you do URL('something', 'othersomething') othersomething is escaped
>>>> (correctly). Then response.include_files() tries to embed those in
>>>> web2py_ajax (at least in recent scaffolding apps) and it checks for the
>>>> file extension of the file to write the correct tags in the head.
>>>>
>>>> If the URL is generated with vars or if you append the path without
>>>> using the URL function it should be ok.
>>>>
>>>> Please check also that you have response.optimize_css & co. disabled:
>>>> they somewhat cache around your files for some time. That implementation
>>>> is
>>>> buggy in my POV.
>>>>
>>>> On Thursday, August 30, 2012 9:38:51 PM UTC+2, Yarin wrote:
>>>>>
>>>>> So it seems like response.files has a problem with appended vars? Even
>>>>> when I spell out the URL entirely, it never gets output:
>>>>>
>>>>> response.files.append("/css/main.css?v=123") # Doesn't get output
>>>>> response.files.append("/css/main.css") # Does get output
>>>>>
>>>>> Assuming this is why rocha used html. Can we fix this at least?
>>>>>
>>>>> Niphlod- Cache-busting- cool, this is what we need. The
>>>>> folder-versioning is annoying to do manually for incremental updates, but
>>>>> if web2py could automate it would be slick. Per that implementation,
>>>>> let's
>>>>> have it as an adjustable setting (e.g. css_version_num) instead of
>>>>> completely randomized per rocha's solution- cache is useful, we just want
>>>>> to bust it when we have an update to roll (probably obvious)
>>>>>
>>>>>
>>>>>
>>>>> On Thursday, August 30, 2012 2:50:26 PM UTC-4, rochacbruno wrote:
>>>>>>
>>>>>>
>>>>>> I cant understand how versioned folders would help on this case? I
>>>>>> ran on to this issue a long time ago and I ended using pure html for
>>>>>> this.
>>>>>>
>>>>>> <script src="{{=URL('static', 'js',
>>>>>> args='mylib.js')}}?{{=get_random_number()}}">
>>>>>>
>>>>>> This works for me when I need to bypass the cache to get the proper
>>>>>> js loaded on the client.
>>>>>>
>>>>>
--