본문 바로가기

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 %}