Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
d6ad4d7a
authored
Feb 13, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: remove legacy login view
parent
6c393877
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
36 deletions
+0
-36
one/views.py
+0
-36
No files found.
one/views.py
View file @
d6ad4d7a
...
...
@@ -28,42 +28,6 @@ import logging
logger
=
logging
.
getLogger
(
__name__
)
class
LoginView
(
View
):
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
nex
=
'/'
try
:
nex
=
request
.
GET
[
'next'
]
except
:
pass
return
render_to_response
(
"login.html"
,
RequestContext
(
request
,
{
'next'
:
nex
}))
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
if
request
.
POST
[
'pw'
]
!=
'ezmiez'
:
return
redirect
(
'/'
)
p
,
created
=
User
.
objects
.
get_or_create
(
username
=
request
.
POST
[
'neptun'
])
if
created
:
p
.
set_unusable_password
()
if
not
p
.
email
:
p
.
email
=
"
%
s@nc.hszk.bme.hu"
%
p
.
username
p
.
save
()
if
not
p
.
person_set
.
exists
():
person
=
Person
(
neptun
=
p
.
username
)
p
.
person_set
.
add
(
person
)
p
.
save
()
p
.
backend
=
'django.contrib.auth.backends.ModelBackend'
auth
.
login
(
request
,
p
)
path
=
'/'
try
:
path
=
request
.
POST
[
'next'
]
if
not
path
.
startswith
(
"/"
):
path
=
'/'
except
:
pass
return
redirect
(
path
)
def
logout
(
request
):
auth
.
logout
(
request
)
return
redirect
(
'/'
)
def
_list_instances
(
request
):
instances
=
Instance
.
objects
.
exclude
(
state
=
'DONE'
)
.
filter
(
owner
=
request
.
user
)
for
i
in
instances
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment