File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 4
4
from django .contrib .auth import logout
5
5
from django .contrib .auth .models import User
6
6
from django .contrib .messages .views import SuccessMessageMixin
7
+ from django .http import HttpResponseRedirect
7
8
from django .urls import reverse
8
9
from django .utils .translation import ugettext_lazy as _
9
- from django .views .generic import ListView , DeleteView , View
10
10
from rest_framework .authtoken .models import Token
11
- from vanilla import DetailView , FormView , ListView , UpdateView
11
+ from vanilla import (
12
+ CreateView ,
13
+ DeleteView ,
14
+ DetailView ,
15
+ FormView ,
16
+ ListView ,
17
+ UpdateView
18
+ )
12
19
13
20
from readthedocs .core .forms import (
14
21
UserAdvertisingForm ,
@@ -109,7 +116,7 @@ class TokenListView(TokenMixin, ListView):
109
116
pass
110
117
111
118
112
- class TokenCreateView (TokenMixin , View ):
119
+ class TokenCreateView (TokenMixin , CreateView ):
113
120
114
121
"""Simple view to generate a Token object for the logged in User."""
115
122
You can’t perform that action at this time.
0 commit comments