Skip to content

Commit

Permalink
Merge pull request #2665 from FroggyFlox/2664-models.User.is_authenti…
Browse files Browse the repository at this point in the history
…cated()-will-be-deprecated-in-Django-2.0

Use user.is_authenticated as an attribute #2664
  • Loading branch information
phillxnet authored Aug 22, 2023
2 parents c0f7db9 + f84771e commit b4128ad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rockstor/storageadmin/views/home.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com>
Copyright (c) 2012-2023 RockStor, Inc. <https://rockstor.com>
This file is part of RockStor.
RockStor is free software; you can redistribute it and/or modify
Expand All @@ -13,7 +13,7 @@
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""

from django.shortcuts import render
Expand All @@ -28,6 +28,7 @@

logger = logging.getLogger(__name__)


def login_page(request):
return render(request, "login.html")

Expand Down Expand Up @@ -65,7 +66,7 @@ def home(request):
"update_channel": update_channel,
}
logger.debug("context={}".format(context))
if request.user.is_authenticated():
if request.user.is_authenticated:
logger.debug("ABOUT TO RENDER INDEX")
return render(request, "index.html", context)
else:
Expand Down

0 comments on commit b4128ad

Please sign in to comment.