반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- math
- c#
- Redshift
- string
- Kotlin
- Github
- list
- Tkinter
- Java
- SQL
- gas
- Google Excel
- Mac
- numpy
- django
- google apps script
- Google Spreadsheet
- hive
- PostgreSQL
- matplotlib
- Excel
- PySpark
- GIT
- dataframe
- Python
- Apache
- array
- 파이썬
- PANDAS
Archives
- Today
- Total
달나라 노트
Python django template code 본문
728x90
반응형
base.html
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<!--for bootstrap static file-->
<!-- <link rel="stylesheet" href="/static/bootstrap.min.css"/>-->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script>
{% block header %}
{% endblock %}
</head>
<body>
<div class="container">
{% block contents %}
{% endblock %}
</div>
</body>
</html>
home.html
{% extends 'base.html' %}
{% block contents %}
<div class="row mt-5">
<div class="col-12 text-center">
<h1>Home</h1>
</div>
</div>
{% if request.session.login_userkey %}
<div class="row mt-5">
<div class="col-12">
<h3>{{ request.session.login_userkey }}</h3>
</div>
</div>
{% endif %}
{% if request.session.login_userkey %}
<div class="row mt-5">
<div class="col-12">
<button type="button" class="btn btn-primary btn-block" onclick="location.href=''">Logout</button>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<button type="button" class="btn btn-primary btn-block" onclick="location.href=''">Product List</button>
</div>
</div>
{% else %}
<div class="row mt-5">
<div class="col-6">
<button type="button" class="btn btn-primary btn-block" onclick="location.href=''">Login</button>
</div>
<div class="col-6">
<button type="button" class="btn btn-primary btn-block" onclick="location.href=''">Register</button>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<button type="button" class="btn btn-primary btn-block" onclick="location.href=''">Product List</button>
</div>
</div>
{% endif %}
{% endblock %}
728x90
반응형
'__etc__' 카테고리의 다른 글
음표와 박자 (0) | 2021.03.30 |
---|---|
Piano 음계별 주파수(Hz) (2) | 2021.03.30 |
윈도우10 정품인증 크랙 (윈도우 크랙. 윈도우10 크랙. 윈도우10 인증 크랙) (0) | 2020.12.16 |
Comments