"""Views."""
from django.shortcuts import render
# from registration.backends.hmac.views import RegistrationView
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User


def home_view(request):
    """The home view."""
    return render(request,
                  "imagersite/home.html"
                  )


@login_required(login_url='/accounts/login/')
def profile_view(request):
    """The user profile view."""
    user = {"user": request.user}
    user['public'] = False
    return render(request,
                  "imagersite/profile.html",
                  user
                  )


def public_profile(request, username):
    """Public profile view."""
    user = {"user": User.objects.get(username=username)}
    user['public'] = True
    return render(request,
                  "imagersite/profile.html",
                  user
                  )

@@ -459,69 +459,8 @@
 %22%22%22%0A
-    user = %7B%22user%22: request.user%7D%0A    user%5B'public'%5D = False%0A
     
@@ -474,32 +474,32 @@
 render(request,%0A
+
                 
@@ -537,36 +537,54 @@
                 
+%7B%22
 user
+%22: request.user%7D
 %0A               
@@ -664,91 +664,8 @@
 %22%22%22%0A
-    user = %7B%22user%22: User.objects.get(username=username)%7D%0A    user%5B'public'%5D = True%0A
     
@@ -750,20 +750,61 @@
         
+%7B%22
 user
+%22: User.objects.get(username=username)%7D
 %0A       

remove not needed any more public key dict