Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. from django.contrib.auth import authenticate, login, logout
  2. from django.shortcuts import render, render_to_response, get_object_or_404, redirect
  3. from django.contrib.auth.decorators import login_required
  4. from django.contrib.auth.models import User
  5. from django.views.generic import DetailView
  6. from django.http import HttpResponse
  7. from django.http import Http404
  8.  
  9. # Modules
  10. from userprofile.models import Profile
  11.  
  12.  
  13. class HomeProfile(DetailView):
  14.     context_object_name = "profile"
  15.     template_name = "profile/presentation.html",
  16.  
  17.     def get_queryset(self):
  18.         profile = user.get_profile() #error
  19.         return profile #error
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement