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
- 크로키
- navbar
- error
- 조맹크로키
- 마이그레이트
- Uncaught SyntaxError
- 오류
- ValueError
- Django
- pip install --upgrade pip
- junny
- include
- 알리
- scotty
- 조맹클래스101
- You should consider upgrading
- 마이그레이션
- ModuleNotFoundError
- bootstrap4
- TemplateSyntaxError
- Migrate
- Python
- 블린이
- JavaScript
- 취미미술
Archives
- Today
- Total
내가 하고 싶은 것들 중 하나
[django] base.html에서 부트스트랩 사용하기 본문
cdn 이용하기
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>title</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
</head>
<body>
<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.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
</body>
- bootstrap4 홈페이지에서 cdn 링크 복사해서 css는 head 닫는 태그 안쪽에, javascript는 body 닫는 태그 안쪽에 추가하기
https://getbootstrap.com/docs/4.5/getting-started/introduction/
{% load bootstrap4 %}
이용하기
<!DOCTYPE html>
{% load bootstrap4 %}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>title</title>
{% bootstrap_css %}
</head>
<body>
{% bootstrap_javascript jquery='full' %}
</body>
</html>
{% load bootstrap4 %}
해주고, css head 닫는 태그 안쪽에 한 줄, javascript jquery body 닫는 태그 안쪽에 한 줄이면 끝남! ㅎㅎ
'웹 세상 > django' 카테고리의 다른 글
Unable to import (0) | 2020.06.30 |
---|---|
[django 에러 해결] ValueError (1) | 2020.05.16 |
Model 설정할 때 NameError가 뜬다면? (0) | 2020.05.06 |
jquery 다운받아 사용하기 (0) | 2020.05.05 |
pip install --upgrade pip (0) | 2020.05.04 |
Comments