AV
Size: a a a
AV
P
T
DT
DT
T
DT
DT
DT
AK
<form action="" method="post">
{% csrf_token %}
<input type="hidden" value="login" name="action">
<div class="form-group">
<label for="login_username">Username</label>
<input type="text"
id="login_username"
name="username"
placeholder="Enter username"
class="form-control">
</div>
<div class="form-group">
<label for="login_pwd">Password</label>
<input type="password"
id="login_pwd"
name="password"
placeholder="Enter password"
class="form-control">
</div>
<button class="btn btn-primary" type="submit">Submit</button>
</form>
def auth_view(request: HttpRequest) -> HttpResponse:
if request.method == "POST":
print(request.POST)
T
DT
<form action="" method="post">
{% csrf_token %}
<input type="hidden" value="login" name="action">
<div class="form-group">
<label for="login_username">Username</label>
<input type="text"
id="login_username"
name="username"
placeholder="Enter username"
class="form-control">
</div>
<div class="form-group">
<label for="login_pwd">Password</label>
<input type="password"
id="login_pwd"
name="password"
placeholder="Enter password"
class="form-control">
</div>
<button class="btn btn-primary" type="submit">Submit</button>
</form>
def auth_view(request: HttpRequest) -> HttpResponse:
if request.method == "POST":
print(request.POST)
DT
SB
DT
DT
А
AK
auth_model = AuthModel(**request.POST)
class AuthModel:
def __init__(self, *, username, password, confirm_password, **kwargs):
DT
auth_model = AuthModel(**request.POST)
class AuthModel:
def __init__(self, *, username, password, confirm_password, **kwargs):
DT