from __future__ import absolute_import, unicode_literals

from django.http import HttpResponse
from django.views.generic import TemplateView

from manifestos.models import Manifesto, Collection


LETSENCRYPT_SECRET = 'RoqK1ZHN6384upsmMKbrJuxqaGNKcmJc5JApOy8qi8Y'


def acme_challenge(request, key):
    resp = '.'.join(key, LETSENCRYPT_SECRET)
    return HttpResponse(resp)


class IndexView(TemplateView):
    template_name = 'index.html'

    def get_context_data(self, **kwargs):
        context = super(IndexView, self).get_context_data(**kwargs)
        context['collection'] = Collection.objects.get(featured=True)
        return context


class AboutTemplateView(TemplateView):
    template_name = 'about.html'


class ContactTemplateView(TemplateView):
    template_name = 'contact.html'


class NewsTemplateView(TemplateView):
    template_name = 'news.html'


class ProjectsTemplateView(TemplateView):
    template_name = 'projects_we_like.html'


class ResourcesTemplateView(TemplateView):
    template_name = 'resources.html'
@@ -312,16 +312,17 @@
 .'.join(
+(
 key, LET
@@ -337,16 +337,17 @@
 _SECRET)
+)
 %0A    ret

Fix typo in acme_challenge view (str.join() takes a single iterable, not *args)