views.py 344 B

12345678910111213
  1. from django.contrib.auth.decorators import login_required
  2. from django.shortcuts import render
  3. from django.views.decorators.clickjacking import xframe_options_sameorigin
  4. import blog
  5. from blog import models
  6. @xframe_options_sameorigin
  7. @login_required(login_url='/login')
  8. def index(request):
  9. return render(request, 'management/index.html')