login.html
2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{% extends 'layout.html' %}
{% block content %}
<!--이것을 써줘야 socicalaccount기능을 사용할수있음.-->
{%load socialaccount %}
{% providers_media_js %}
{% load static %}
{% static 'blog/img/naver_login_green.png' as naver_button %}
{% static 'blog/img/naver_login_white.png' as naver_button_hover %}
{% static 'blog/img/google_login_normal.png' as google_button %}
{% static 'blog/img/google_login_preesed.png' as google_button_hover %}
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">로그인</div>
<div class="panel-body">
<form class="form-horizontal" role="form" method="POST" action="/login/">
<div class="form-group">
<div class="col-md-12">
<label for="userid">아이디</label>
<input id="userid" type="userid" class="form-control" name="username" required autofocus>
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<label for="password">비밀번호</label>
<input id="password" type="password" class="form-control" name="password" required>
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<button type="submit" class="btn btn-success">
로그인
</button>
<button class="btn btn-success" onclick="location.href='/register/';">
회원가입
</button>
</div>
<a href="{% provider_login_url 'naver' %}">
<img src="{{ naver_button }}"
onmouseover="this.src='{{ naver_button_hover }}'"
onmouseleave="this.src='{{ naver_button }}'"height="34">
</a>
<br>
<a href="{% provider_login_url 'google' %}">
<img src="{{ google_button }}"
onmouseover="this.src='{{ google_button_hover }}'"
onmouseleave="this.src='{{ google_button }}'"height="34">
</a>
<br>
</div>
<div class="form-group">
<div class="col-md-12 text-center">
<h5>{{ message }}</h5>
</div>
</div>
</form>
</div>
</div>
</div>
{% endblock %}