-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚄 the kind of code one might write while on a train
- Loading branch information
1 parent
61efc44
commit 80ab4f8
Showing
3 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
from django.conf import settings | ||
|
||
from core.models import Tag | ||
from core.views.view_utils import tag_cloud_context | ||
|
||
def tag_cloud_context_processor(request): | ||
return {'cloud': tag_cloud_context(Tag.objects.all())} | ||
|
||
def contextual_static_serving_context_processor(request): | ||
if settings.SERVE_STATIC_LIBS_LOCALLY: | ||
jquery_url = "/static/libs/jquery-2.1.1.min.js" | ||
underscore_url = "/static/libs/underscore-min.js" | ||
else: | ||
jquery_url = "//code.jquery.com/jquery-2.1.1.min.js" | ||
underscore_url = "//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js" | ||
return locals() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters