You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
765 B
Python
24 lines
765 B
Python
# -*- 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')
|