This file contains hidden or 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
/** | |
* Load 'blog' card (layer 0). | |
*/ | |
loadBlogPage: function(path) { | |
//resets the nav to home so no subsections are highlighted | |
this.updateNavigation(); | |
if(this.DEBUG) {console.log('Router: Load blog: ', path);} | |
PubSub.trigger('loadBlog:router', path); |
This file contains hidden or 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
# Build an asset collection for front next/prev navigation | |
asset_collection = [] | |
if item['name'] == 'hero' or item['name'] == 'headline-grid': | |
asset = {} | |
for content in item['contents']: | |
asset[u'headline'] = content.get('headline') | |
asset[u'links'] = content.get('links') | |
asset[u'photo'] = content.get('photo') | |
asset_collection.append(asset) |
This file contains hidden or 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
from django.conf import settings | |
from django.http import HttpResponse | |
from django.shortcuts import render | |
from dummyjson import views as dj | |
from ordereddict import OrderedDict | |
import json | |
def story(request, content_id, slug=None, template=None): | |
path = '/static/content/modules/stories/story_' + content_id + '.json' | |
if not template: |
This file contains hidden or 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
from .local import * | |
CACHES = { | |
'default': { | |
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', | |
'LOCATION': '127.0.0.1:11211' | |
} | |
} | |
CACHE_MIDDLEWARE_SECONDS = 60 |
NewerOlder