Skip to content

Commit

Permalink
added automatic redirect for setup
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Jun 3, 2020
1 parent 67d7cd1 commit d09c6db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cookbook/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

def index(request):
if not request.user.is_authenticated:
if User.objects.count() < 1 and 'django.contrib.auth.backends.RemoteUserBackend' not in settings.AUTHENTICATION_BACKENDS:
return HttpResponseRedirect(reverse_lazy('view_setup'))
return HttpResponseRedirect(reverse_lazy('view_search'))
try:
page_map = {
Expand Down

0 comments on commit d09c6db

Please sign in to comment.