require log in to edit thinks
This commit is contained in:
parent
52ab7aa331
commit
46c9f0a447
4 changed files with 29 additions and 13 deletions
|
@ -1,4 +1,5 @@
|
|||
from django.conf import settings
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.http import HttpResponse, JsonResponse
|
||||
from django.shortcuts import render, redirect
|
||||
from django.views import generic
|
||||
|
@ -11,7 +12,7 @@ from . import forms
|
|||
from .models import Think
|
||||
from .random_slug import random_slug
|
||||
|
||||
class ThinkMixin:
|
||||
class ThinkMixin(LoginRequiredMixin):
|
||||
model = Think
|
||||
context_object_name = 'think'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue