예제 #1
0
def contributors(request):
    context = {}
    cache_key = 'mozillians_contributors'
    cache_key += hashlib.md5(str(settings.CONTRIBUTORS)).hexdigest()[:10]
    users = cache.get(cache_key)
    if users is None:
        users = mozillians.get_contributors()
        cache.set(cache_key, users, 60 * 60 * 24)
    context['users'] = reversed(users)
    return render(request, 'main/contributors.html', context)
예제 #2
0
def contributors(request):
    context = {}
    cache_key = 'mozillians_contributors'
    cache_key += hashlib.md5(str(settings.CONTRIBUTORS)).hexdigest()[:10]
    users = cache.get(cache_key)
    if users is None:
        users = mozillians.get_contributors()
        cache.set(cache_key, users, 60 * 60 * 24)
    context['users'] = reversed(users)
    return render(request, 'main/contributors.html', context)