Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
52dad1f9
authored
2022-05-13 17:44:00 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
admin test2
1 parent
a64e17aa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
src/apps/account/views.py
src/apps/account/views.py
View file @
52dad1f
...
...
@@ -9,6 +9,8 @@ from settings import conf
from
django.urls
import
reverse
from
django.http
import
HttpResponseRedirect
from
django.contrib.auth
import
login
as
auth_login
from
django.conf
import
settings
from
django.shortcuts
import
resolve_url
# Create your views here.
...
...
@@ -68,8 +70,9 @@ class IWALoginView(IWABaseView, GenericView):
if
is_valid
:
auth_login
(
request
,
data
)
index_path
=
reverse
(
'admin:index'
)
return
HttpResponseRedirect
(
index_path
)
# index_path = reverse('admin:index')
# return HttpResponseRedirect(index_path)
return
HttpResponseRedirect
(
resolve_url
(
settings
.
LOGIN_REDIRECT_URL
))
else
:
self
.
no_permission
(
data
)
else
:
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment