yolo admin login redirect

This commit is contained in:
d42 2018-10-10 21:18:06 +02:00
parent 45c4772f78
commit 9577c2d27d
2 changed files with 7 additions and 0 deletions

4
auth/views.py Normal file
View File

@ -0,0 +1,4 @@
from django.shortcuts import redirect
def auth_redirect(request):
return redirect('social:begin', 'hswaw')

View File

@ -12,6 +12,8 @@ from rest_framework import routers
from storage import apiviews
from auth.views import auth_redirect
router = routers.DefaultRouter()
router.register(r'items', apiviews.ItemViewSet)
@ -20,6 +22,7 @@ router.register(r'labels', apiviews.LabelViewSet)
# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
url(r'^admin/login/.*', auth_redirect),
url(r'^admin/', admin.site.urls),
url(r'^select2/', include('django_select2.urls')),