본문 바로가기

Python_WEB/Project-Noticeboard

[Django]User > Templates > HTML > Home

반응형
{% extends "base.html" %} {% block contents %}
<div class="row mt-5">
  <div class="col-12 text-center">
    <h1>홈페이지!</h1>
  </div>
</div>
<div class="row mt-5">
  {% if request.session.user %}
  <div class="col-12">
    <button
      class="btn btn-primary btn-block"
      onclick="location.href='/fcuser/logout/'"
    >
      로그아웃
    </button>
  </div>
  {% else %}
  <div class="col-6">
    <button
      class="btn btn-primary btn-block"
      onclick="location.href='/fcuser/login/'"
    >
      로그인
    </button>
  </div>
  <div class="col-6">
    <button
      class="btn btn-primary btn-block"
      onclick="location.href='/fcuser/register/'"
    >
      회원가입
    </button>
  </div>
  {% endif %}
</div>
<div class="row mt-1">
  <div class="col-12">
    <button
      class="btn btn-primary btn-block"
      onclick="location.href='/board/list/'"
    >
      게시물보기
    </button>
  </div>
</div>
{% endblock %}
반응형

'Python_WEB > Project-Noticeboard' 카테고리의 다른 글

[Django]Board > Templates > HTML > Login  (0) 2019.12.14
[Django]User > Templates > HTML > Register  (0) 2019.12.14
[Django]User > Templates > HTML > Basic  (0) 2019.12.14
[Django]Board > Views  (0) 2019.12.08
[Django]Board > Forms  (0) 2019.12.08