# Path: apps/landing/models.py
# class Landing(Timestampable):
#     email = models.EmailField(blank=False, max_length=255, unique=True)
# 
#     class Meta:
#         db_table = 'landing'
# 
#     def __str__(self):
#         return self.email
# 
# Path: apps/base/views.py
# class BaseView(View):
#     """docstring for BaseView"""
#     @method_decorator(gzip_page)
#     def dispatch(self, request, *args, **kwargs):
#         return super().dispatch(request, *args, **kwargs)
# 
#     def get_context_data(self, **kwargs):
#         context = super().get_context_data(**kwargs)
#         return context
# 
# class LoginRequiredMixin(View):
#     """docstring for LoginRequiredMixin"""
#     @method_decorator(login_required)
#     def dispatch(self, request, *args, **kwargs):
#         return super().dispatch(request, *args, **kwargs)


from django.core.urlresolvers import reverse_lazy
from django.views.generic import TemplateView
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import logout
from apps.landing.models import Landing
from apps.base.views import (BaseView, LoginRequiredMixin)
            'info': {
                'title': 'Login Page - NMS',
            },
        }
        context.update(info)
        return context


class LogoutView(BaseView):
    """docstring for LogoutView"""
    def get(self, request, *args, **kwargs):
        logout(request)
        return HttpResponseRedirect(reverse_lazy('home'))


class HomeView(BaseView, LoginRequiredMixin, TemplateView):
    """docstring for HomeView"""
    template_name = 'home/index.html'

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        info = {
            'info': {
                'title': 'Home Page - NMS',
            },
        }
        context.update(info)
        return context



# Path: apps/landing/models.py
# class Landing(Timestampable):
#     email = models.EmailField(blank=False, max_length=255, unique=True)
# 
#     class Meta:
#         db_table = 'landing'
# 
#     def __str__(self):
#         return self.email
# 
# Path: apps/base/views.py
# class BaseView(View):
#     """docstring for BaseView"""
#     @method_decorator(gzip_page)
#     def dispatch(self, request, *args, **kwargs):
#         return super().dispatch(request, *args, **kwargs)
# 
#     def get_context_data(self, **kwargs):
#         context = super().get_context_data(**kwargs)
#         return context
# 
# class LoginRequiredMixin(View):
#     """docstring for LoginRequiredMixin"""
#     @method_decorator(login_required)
#     def dispatch(self, request, *args, **kwargs):
#         return super().dispatch(request, *args, **kwargs)


# Path: apps/home/views.py
from django.core.urlresolvers import reverse_lazy
from django.views.generic import TemplateView
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import logout
from apps.landing.models import Landing
from apps.base.views import (BaseView, LoginRequiredMixin)

            'info': {
                'title': 'Login Page - NMS',
            },
        }
        context.update(info)
        return context


class LogoutView(BaseView):
    """docstring for LogoutView"""
    def get(self, request, *args, **kwargs):
        logout(request)
        return HttpResponseRedirect(reverse_lazy('home'))


class HomeView(BaseView, LoginRequiredMixin, TemplateView):
    """docstring for HomeView"""
    template_name = 'home/index.html'

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        info = {
            'info': {
                'title': 'Home Page - NMS',
            },
        }
        context.update(info)
        return context



class HistoryView(BaseView, LoginRequiredMixin, TemplateView):