migrations
This commit is contained in:
@@ -1 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from aldryn_search.views import AldrynSearchView
|
||||
from django.core.urlresolvers import reverse_lazy
|
||||
from django.views.generic.edit import FormView
|
||||
|
||||
from project.forms import NewsletterSubscriptionForm
|
||||
|
||||
|
||||
class SearchView(AldrynSearchView):
|
||||
template_name = 'project/search.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(SearchView, self).get_context_data(**kwargs)
|
||||
search_form = context['form']
|
||||
context['search_form'] = search_form
|
||||
del context['form']
|
||||
return context
|
||||
|
||||
|
||||
class NewsletterSubscriptionView(FormView):
|
||||
template_name = 'project/newsletter/subscription.html'
|
||||
form_class = NewsletterSubscriptionForm
|
||||
success_url = reverse_lazy('newsletter_subscription_success')
|
||||
|
||||
Reference in New Issue
Block a user