You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mako-d...@googlegroups.com
In django, template can access
{{ STATIC_URL }} defined in setting.py.
When use Make in django, how to achive it ?
thank u.
Jeffrey Jenkins
unread,
Sep 21, 2012, 2:02:15 PM9/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mako-d...@googlegroups.com
You should add STATIC_URL into the context object you're passing in to be rendered. I often write a wrapper around the mako template loading/rendering code which lets me add common variables like that so that every template has access to them.
Alternatively (but I think less preferable) you could just import STATIC_URL from settings in a <%%> block.