admin pointing to wrong static css in rendered page.

19 views
Skip to first unread message

John McMaster

unread,
Mar 4, 2015, 2:59:27 PM3/4/15
to web...@googlegroups.com
Just installed web2py on webfaction.
Used one of the scripts on the webfaction community site.

The domain is working.
When I try to access the admin/default/index the css is clearly not being used.

After using the Inspect Element to see what went wrong you can clearly see that the admin index.html page is looking for the static css in a folder that isn't on the server.

admin/static/_2.9.12/css/bootstrap_essentials.css

it should be

admin/static/css/bootstrap_essentials.css


My question is this How do I correct this?

Is this a bug in web2py?

I see a lot of people trying to resolve issues with static pages. My thinking was this. One the web2py welcome/default/index is working and the nginx.conf file has a reg exp to redirect static files and they work.

Where did the _2.9.12 come from?


here is the code used in the layout.html for loading the static files
        {{
        response.files.append(URL('static','css/bootstrap.min.css'))
        response.files.append(URL('static','css/bootstrap_essentials.css'))
        response.files.append(URL('static','css/bootstrap-responsive.min.css'))
        }}
there is no _2.9.12

If I could get rid of _2.9.12 the reg exp would work.

Any ideas or help in this matter would help not just me but a lot of others.

Thank You.

By the way... Web2py is AWESOME!
It has been a long day so please forgive any misstakes!

Niphlod

unread,
Mar 4, 2015, 3:08:38 PM3/4/15
to web...@googlegroups.com
please point to the script used: it probably comes from an old setup. You'll find numerous occurrences of the same "problem" here and there on the forum. What needs to be changed is the "thing" that serves static files, taking into consideration static asset management

Massimo Di Pierro

unread,
Mar 4, 2015, 3:41:10 PM3/4/15
to web...@googlegroups.com
No you do not get rid of that. That is very important and a web2py feature called "static asset management":


You just need the proper web server rule. What server do you use?
Reply all
Reply to author
Forward
0 new messages