Make local development of static assets easier, also toss an unused file
authorCharles Connell <charles@connells.org>
Sun, 2 Feb 2014 16:34:11 +0000 (11:34 -0500)
committerCharles Connell <charles@connells.org>
Sun, 2 Feb 2014 16:34:11 +0000 (11:34 -0500)
karmaworld/apps/notes/context_processors.py [new file with mode: 0644]
karmaworld/settings/common.py
karmaworld/settings/dev.py
karmaworld/templates/partial/opentip.html [deleted file]

diff --git a/karmaworld/apps/notes/context_processors.py b/karmaworld/apps/notes/context_processors.py
new file mode 100644 (file)
index 0000000..9a7a95d
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+# -*- coding:utf8 -*-
+# Copyright (C) 2014  FinalsClub Foundation
+
+from django.conf import settings
+
+def s3_url(request):
+    return { 'S3_URL': settings.S3_URL }
+
+
index ba16684d45fc5a2c27c99621dd24dfe2e1f6a776..dbf8be13f1006846851382c1aa341f1f300c45e5 100644 (file)
@@ -152,6 +152,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     'django.core.context_processors.tz',
     'django.contrib.messages.context_processors.messages',
     'django.core.context_processors.request',
+    'karmaworld.apps.notes.context_processors.s3_url',
 
     # allauth specific context processors
     "allauth.account.context_processors.account",
index 61b693f146caaa8e4425e82e0babadbdd58260e3..232cf4f3b9c482cac5b8050513df787182811993 100644 (file)
@@ -71,10 +71,6 @@ AWS_HEADERS = {
     'Cache-Control': 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIREY,
         AWS_EXPIREY)
 }
-
-# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
-# S3_URL comes from karmaworld.secret.static_s3
-STATIC_URL = S3_URL
 ########## END STORAGE CONFIGURATION
 
 
diff --git a/karmaworld/templates/partial/opentip.html b/karmaworld/templates/partial/opentip.html
deleted file mode 100644 (file)
index 5535ceb..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{% comment %}
-Integrate opentip seamlessly into any page, just use:
-
-`{% include 'partial/opentip/html' %}`
-anywhere in another template and then apply something like this:
-
-
-    <i
-      data-ot="Upload directly to this course"
-      data-ot-target="true"
-      data-ot-tip-joint="top center"
-      data-ot-target-joint="bottom center"
-      data-ot-background="white"
-      data-ot-border-color="black"
-      class="fa fa-upload opentip"></i>
-
-to create a Font Awesome with a rollover opentip
-
-{% endcomment %}
-
-
-{% block opentip %}
-  <script src="{{ STATIC_URL }}js/opentip-jquery-excanvas.min.js"></script>
-  <link rel="stylesheet" href="{{ STATIC_URL }}css/vendor/opentip.css"> <!-- opentip -->
-{% endblock %}