djangosnippets.org: Latest snippets posted by robertrvhttps://djangosnippets.org/users/robertrv/2009-10-23T10:19:22.123324-05:00robertrvdjango redirects middleware a bit more fleixble
2009-10-23T10:19:22.123324-05:00robertrvhttps://djangosnippets.org/snippets/1770/<p>This is replace for django.contrib.redirects.RedirectFallbackMiddleware which redirects exact matches as well as startswith matches for the redirect.old_path</p>
<p>I had a problem with my urls, because are dynamically generic, so I can't create one redirect entry on the database for each possible url. So I made django redirects to search any …</p>
Freely redistributableMore flexible "Partial Template"
2009-02-06T18:05:42.173832-06:00robertrvhttps://djangosnippets.org/snippets/1313/<p>This is an extension of the snippet http://www.djangosnippets.org/snippets/1302/ to make it a bit more flexible and been able pass more than one parameter to our "Partial Template". To use it you can </p>
<p>{% partial_template template_name param1:variable1 param2:variable2 ... %}</p>
<p>or:</p>
<p>{% partial_template partials/mini_template.html item:data1 var2:"False" var3:"2*2" %}</p>
Freely redistributable