feat: init polls
This commit is contained in:
parent
eef16a5b2d
commit
e6d2c9f700
8 changed files with 14 additions and 2 deletions
0
polls/__init__.py
Normal file
0
polls/__init__.py
Normal file
1
polls/admin.py
Normal file
1
polls/admin.py
Normal file
|
@ -0,0 +1 @@
|
|||
# Register your models here.
|
6
polls/apps.py
Normal file
6
polls/apps.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class PollsConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "polls"
|
0
polls/migrations/__init__.py
Normal file
0
polls/migrations/__init__.py
Normal file
1
polls/models.py
Normal file
1
polls/models.py
Normal file
|
@ -0,0 +1 @@
|
|||
# Create your models here.
|
1
polls/tests.py
Normal file
1
polls/tests.py
Normal file
|
@ -0,0 +1 @@
|
|||
# Create your tests here.
|
1
polls/views.py
Normal file
1
polls/views.py
Normal file
|
@ -0,0 +1 @@
|
|||
# Create your views here.
|
|
@ -4,7 +4,10 @@ from django.http import HttpResponseRedirect
|
|||
|
||||
|
||||
class LocalUserOnlyMixin(AccessMixin):
|
||||
"""Verify that the current user is authenticated."""
|
||||
"""
|
||||
Verify that the current user is authenticated and a local user (not SSO
|
||||
user).
|
||||
"""
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
if hasattr(request.user, "cas_account"):
|
||||
|
@ -13,7 +16,6 @@ class LocalUserOnlyMixin(AccessMixin):
|
|||
|
||||
|
||||
class LocalUserOnlySoftMixin(LocalUserOnlyMixin):
|
||||
|
||||
redirect_url = None
|
||||
reject_message = ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue