from django.http import HttpResponse, HttpResponseRedirect
from django.views.generic import View
from django.shortcuts import render, render_to_response
from django.template.context import RequestContext
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.models import User
from datetime import datetime 

class membersHome(View):
    def get(self, request):
        
        if request.user.is_authenticated():
            pageTitleTag = "Home"  
            pageHeading  = "Welcome Members to IronNinja5 Party Place"      

            context = {"pageTitleTag": pageTitleTag, "pageHeading": pageHeading}

            return render_to_response("memHomePage.html",context_instance=RequestContext(request, context))
        else:
            return HttpResponseRedirect('/login/?logout=true')