If I understand your issue...
One way to do this is
1) put your master.css in applications/yourapp/private/
2) create a controller action in default.py like
def mastercss():
text=open(os.path.join(request.folder,'private/master.css')
# replace the $(...) in text
response.headers['Content-Type']='text/css'
return text
3) from your layout use the CSS file URL(r=request,f='mastercss')
On Mar 29, 1:23 am, Michael <[email protected]> wrote:
> Hey guys,
>
> I am trying build a small model file that includes a master.css, and
> replaces css variables.
>
> for instance,
>
> $site_font_face = font-family: georgia;
>
> So in web2py, i wanted to create a model to read in master.css,
> iterate through the file for $_vars.
>
> My questions are,
>
> How to i import or include a css file for reading from within a model?
> I'm new to devlopment so i don't know the syntax, but in psuedo code:
>
> mastercss = import('masterstyle.css')
>
> or something?
>
> Secondly, how i do include models in another model?
>
> I am trying to achieve something similar to
> this;http://net.tutsplus.com/tutorials/html-css-techniques/how-to-add-vari...
>
> thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---