summaryrefslogtreecommitdiffstats
path: root/main/templatetags/cdn.py
AgeCommit message (Collapse)AuthorFilesLines
2012-03-24Use staticfiles_storage in jQuery tagDan McGee1-2/+4
To get the local URL to the jQuery JS file. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24Remove cdnprefix template tagDan McGee1-12/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05Convert to and enable staticfiles contrib applicationDan McGee1-1/+2
This moves our site static files into the sitestatic directory if they are shared resources, and also moves a handful of things (such as the artwork logos) into application-specific static/ directories. This allows the staticfiles contrib app to work after a few settings tweaks, a run of collectstatic, and massaging the hardcoded '/media/' prefix out of our templates. Django 1.4 is going to make this a lot easier to move things to a CDN and provides better template tags; for now this is setting the stage before we can move to that. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-08Always use same URL for both secure and non-secure CDN requestsDan McGee1-6/+1
Use a scheme-relative URL rather than serving different content to users based on HTTP or HTTPS. Should prevent mismatched certificate errors. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15Update to jQuery 1.4.4Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Simplify jQuery CDN tagDan McGee1-15/+10
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-28Always use HTTPS for jQueryDan McGee1-4/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-27Add tag for inserting CDN prefix on media URLsDan McGee1-2/+18
This tag will just be placed before any media reference that is available on the CDN; if the CDN is enabled and CDN_PATH/CDN_PATH_SECURE are defined the correct URL will be generated. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-26Upgrade to jQuery 1.4.3Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22Get secure/unsecure checking actually workingDan McGee1-5/+5
We need a bit more, like actually having something relevant in the RequestContext object, in order for this to all work. Instead of putting the full request in just populate a 'secure' key with a boolean value indicating whether the request is secure. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Allow serving jQuery via HTTPS if secure request detectedDan McGee1-1/+6
Handles the concerns in FS#19045. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-14Make CDN not dependent on DEBUG settingDan McGee1-3/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27Upgrade jQuery to 1.4.2Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27Add CDN templatetag packageDan McGee1-0/+19
For now, this contains one new template tag- 'jquery'. This will allow us to use the Google AJAX CDN in non-debug environments, since there is really no need for us to be the source of this common file. In the future this package may gain other static media resource tags as well. Signed-off-by: Dan McGee <dan@archlinux.org>