1 from django.shortcuts import render,redirect 2 3 from django.contrib.auth import authenticate,logout,login 4 5 from django.contrib.auth.decorators import login_required 6 7 from django.core.paginator import Paginator,PageNotAnInteger,EmptyPage 8 9 from django.db.models import Q 10 11 from django.template import Library 12 13 from django.utils.safestring import mark_safe 14 15 from django.views.decorators.csrf import csrf_exempt