mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-01 12:03:55 +01:00
Refactored extension API
* Modoboa extensions must now declare themselves * Now using django 1.3 *staticfiles* module * Better distinction between *static* content and *media* content see #197
This commit is contained in:
@@ -110,7 +110,7 @@ class EmailListing(object):
|
||||
def render_navbar(page, baseurl=None):
|
||||
if page is None:
|
||||
return ""
|
||||
context = {"page" : page, "MEDIA_URL" : settings.MEDIA_URL, "baseurl" : baseurl}
|
||||
context = {"page" : page, "STATIC_URL" : settings.STATIC_URL, "baseurl" : baseurl}
|
||||
return render_to_string("common/pagination_bar.html", context)
|
||||
|
||||
def fetch(self, request, id_start, id_stop):
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ def _render(request, tpl, user_context):
|
||||
"""Custom rendering function
|
||||
|
||||
Just a wrapper which automatically adds a RequestContext instance
|
||||
(useful to use settings variables like MEDIA_URL inside templates)
|
||||
(useful to use settings variables like STATIC_URL inside templates)
|
||||
"""
|
||||
return render_to_response(tpl, user_context,
|
||||
context_instance=template.RequestContext(request))
|
||||
@@ -109,7 +109,7 @@ def static_url(path):
|
||||
"""
|
||||
if path.startswith("/"):
|
||||
path = path[1:]
|
||||
return "%s%s" % (settings.MEDIA_URL, path)
|
||||
return "%s%s" % (settings.STATIC_URL, path)
|
||||
|
||||
def size2integer(value):
|
||||
"""Try to convert a string representing a size to an integer value
|
||||
|
||||
Reference in New Issue
Block a user