From f7a3080b01a5c12b63d099c624e0470c60e97ce6 Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Sun, 2 Feb 2014 11:34:11 -0500 Subject: [PATCH] Make local development of static assets easier, also toss an unused file --- karmaworld/apps/notes/context_processors.py | 10 +++++++++ karmaworld/settings/common.py | 1 + karmaworld/settings/dev.py | 4 ---- karmaworld/templates/partial/opentip.html | 25 --------------------- 4 files changed, 11 insertions(+), 29 deletions(-) create mode 100644 karmaworld/apps/notes/context_processors.py delete mode 100644 karmaworld/templates/partial/opentip.html diff --git a/karmaworld/apps/notes/context_processors.py b/karmaworld/apps/notes/context_processors.py new file mode 100644 index 0000000..9a7a95d --- /dev/null +++ b/karmaworld/apps/notes/context_processors.py @@ -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 } + + diff --git a/karmaworld/settings/common.py b/karmaworld/settings/common.py index ba16684..dbf8be1 100644 --- a/karmaworld/settings/common.py +++ b/karmaworld/settings/common.py @@ -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", diff --git a/karmaworld/settings/dev.py b/karmaworld/settings/dev.py index 61b693f..232cf4f 100644 --- a/karmaworld/settings/dev.py +++ b/karmaworld/settings/dev.py @@ -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 index 5535ceb..0000000 --- a/karmaworld/templates/partial/opentip.html +++ /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: - - - - -to create a Font Awesome with a rollover opentip - -{% endcomment %} - - -{% block opentip %} - - -{% endblock %} -- 2.25.1