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
5df67344
authored
2022-05-18 10:23:56 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
admin test7
1 parent
f0178fbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
src/apps/account/views.py
src/apps/account/views.py
View file @
5df6734
...
...
@@ -10,7 +10,7 @@ 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
from
django.shortcuts
import
resolve_url
,
redirect
# Create your views here.
...
...
@@ -69,10 +69,11 @@ class IWALoginView(IWABaseView, GenericView):
is_valid
,
data
=
self
.
validate_admin
(
q_number
)
if
is_valid
:
auth_login
(
request
,
data
)
request
.
user
=
data
index_path
=
reverse
(
'admin:index'
)
return
HttpResponseRedirect
(
index_path
)
auth_login
(
request
,
data
)
# index_path = reverse('admin:index')
# return HttpResponseRedirect(index_path)
return
redirect
(
'https://staging-bmw-ocr.situdata.com/admin/'
)
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