File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 11
11
urlpatterns = []
12
12
13
13
account_urls = [
14
+ url (
15
+ r'^login' ,
16
+ views .LoginView .as_view (),
17
+ name = 'account_login' ,
18
+ ),
19
+ url (
20
+ r'^logout/' ,
21
+ views .LogoutView .as_view (),
22
+ name = 'account_logout' ,
23
+ ),
14
24
url (
15
25
r'^edit/' ,
16
26
views .ProfileEdit .as_view (),
Original file line number Diff line number Diff line change 1
1
"""Views for creating, editing and viewing site-specific user profiles."""
2
2
3
+ from allauth .account .views import LoginView as AllAuthLoginView
4
+ from allauth .account .views import LogoutView as AllAuthLogoutView
3
5
from django .contrib import messages
4
6
from django .contrib .auth import logout
5
7
from django .contrib .auth .models import User
27
29
from readthedocs .core .utils .extend import SettingsOverrideObject
28
30
29
31
32
+ class LoginViewBase (AllAuthLoginView ):
33
+
34
+ pass
35
+
36
+
37
+ class LoginView (SettingsOverrideObject ):
38
+
39
+ _default_class = LoginViewBase
40
+
41
+
42
+ class LogoutViewBase (AllAuthLogoutView ):
43
+
44
+ pass
45
+
46
+
47
+ class LogoutView (SettingsOverrideObject ):
48
+
49
+ _default_class = LogoutViewBase
50
+
51
+
30
52
class ProfileEdit (PrivateViewMixin , UpdateView ):
31
53
32
54
"""Edit the current user's profile."""
You can’t perform that action at this time.
0 commit comments