[CSS] position
.container { position: static; position: relative; position: absolute; position: fixed; position: sticky; } top-left, top-right, bottom-left, bottom-right ๊ฐ์ผ๋ก position ๋ณ๊ฒฝ ๊ฐ๋ฅ static : default value / html์ ์ ์๋ ์์๋๋ก ๋ธ๋ผ์ฐ์ ์์ ์ถ๋ ฅ relative : left, right ๊ฐ ์ ์ฉ ๊ฐ๋ฅ / ์๋ ์๋ฆฌ์์ ์๋์ ์ผ๋ก ๊ฐ๋งํผ ์ด๋ absolute : item์ด ๋ด๊ธด ๊ฐ์ฅ ๊ฐ๊น์ด box ๋ด์์ ์์น ๋ณ๋ fixed : window ๋ด์์ ๋ณ๋ / ์น ํ์ด์ง ๋ด์์ ๋ณ๋ / box์๋ ๋ฌด๊ด sticky : ์๋ ์๋ ์๋ฆฌ์ ์๋, scrollin..
[Django] null=True / blank=True
null = True data = models.DataTimeField(null=True) - ํ๋์ ๊ฐ์ด NULL๋ก ์ ์ฅ๋๋ ๊ฒ์ ํ์ฉ - ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ปฌ๋ผ์ ๊ดํ ์ค์ - CharField์ TextField ๋ฑ์ ๋ฌธ์ ๊ธฐ๋ฐ ํ๋์์๋ ์ฌ์ฉ ํผํ ๊ฒ - CharField์์ unique=True์ blank=True ๋ชจ๋ ์ค์ ๋ ๋๋ ์์ธ blank = True title = models.CharField(blank=True) - ํ๋๊ฐ ํผ(์ ๋ ฅ ์์)์์ ๋น ์ํ๋ก ์ ์ฅ๋๋ ๊ฒ์ ํ์ฉ - ๋ฐ์ดํฐ๋ฒ ์ด์ค์๋ ''์ด ์ ์ฅ๋จ - ์ฅ๊ณ ๊ด๋ฆฌ์ ๋ฐ ์ง์ ์ ์ํ ํผ์๋ ๋ฐ์ - ์ ํจ์ฑ ๊ฒ์ฌ(form.is_valid())์ ๊ด๋ จ์๋ค ๐ null=True, blank=False ์ต์ ์ ๊ฐ์ง ํ๋ = DB ๋ ๋ฒจ์์๋..
Pycharm/Cmder๋ก ๊ฐ์ํ๊ฒฝ ์คํ ๋ฐ ํ๋ก์ ํธ ์์ฑ
1. ๊ฐ์ํ๊ฒฝ ์์ฑ 1. File > Settings 2. Project: ํ๋ก์ ํธ ํด๋๋ช > Python Interpreter > ์ค์ (icon) > Add 3. C:\..\ํ๋ก์ ํธ ํด๋๋ช \๊ฐ์ํ๊ฒฝ๋ช > OK 4. Python Interpreter์ python.exe ๊ฒฝ๋ก ์ง์ (์๋) 5. Package์ pip์ setuptools ์์ฑ(์๋) 5-1. Python Interpreter์ invalid ํ์ ๋จ๋ฉด ๊ฒฝ๋ก ๋ค์ ์ง์ 6. Apply > OK 2. ๊ฐ์ํ๊ฒฝ ์คํ 1. cmder์์ ํ๋ก์ ํธ ํด๋๊ฐ ์๋ ์์น๋ก ์ด๋ 2. venv(๊ฐ์ํ๊ฒฝ๋ช )\Scripts\activate.bat 3. deactivate ๋ช ๋ น์ด๋ก ์ข ๋ฃ 4. pip list๋ก ์ค์น ํจํค์ง ๋ฐ ๋ฒ์ ํ์ธ 3. ์ฅ๊ณ ํ๋ก์ ํธ ์..
[Bootstrap] checkbox์ radio
๐ ์ธ๋ผ์ธ ์ฒดํฌ๋ฐ์ค, ๋ผ๋์ค - ์ฒดํฌ๋ฐ์ค๋ ๋ผ๋์ค ์ปจํธ๋กค์ ๊ฐ์ ์ค์ ์ถ๋ ฅ - ์ค๋ง๋ค ๋์ธ๋๋ ๋จ์ class="checkbox" ์์ฑ 1 2 3 1 2 3
[Django] pip freeze '@ file:///' ํํ๋ก ๋์ฌ ๋ ํด๊ฒฐ
pip list --format=freeze > requirements.txt ์ถ์ฒ : https://stackoverflow.com/questions/62863020/pip-freeze-generating-file-on-conda-environment
[Django] ๋ก๊ทธ์ธ / ๋ก๊ทธ์์ / ํ์๊ฐ์
[ User ๊ธฐ๋ณธ ] 1. python manage.py startapp account ๋ฅผ ํตํด ๊ณ์ ๊ด๋ จ ์ฑ ์๋ก ์์ฑํ๋ค 2. settings.py์์ INSTALLED_APPS์ ์ฑ ์์ฑ ์๋ ค์ฃผ๊ธฐ 3. templatesํด๋์ login.html๊ณผ signup.html ์์ฑ(๋ก๊ทธ์์์ ํ์์์) 4. views.py์์ ๋ก๊ทธ์ธ ํผ๊ณผ ํ์๊ฐ์ ํผ ์์ฑ from django.shortcuts import render, redirect from django.contrib.auth.forms import AuthenticationForm, UserCreationForm from django.contrib.auth import authenticate, login, logout 5. views.py def lo..
[Django] ๊ณตํต๋ template ์์
1. project ํด๋ ํ์์ templates ํด๋ ์์ฑ 2. base.html ์์ฑ 3. DOCTYPE, html, head, navbar ๋ฑ ๊ณตํต๋ ์์๋ค ์์ฑ 4. ํ์์ {% block content %} {% endblock %} ์ ์ฌ์ฉํ์ฌ ๋ด์ฉ ๊ฐ์ธ์ค ๋ถ๋ถ ๋ง๋ค์ด์ฃผ๊ธฐ 5. ๊ฐ ํ ํ๋ฆฟ์ ๊ณตํต๋ ์์๋ค ์ญ์ ํ 6. ๊ฐ์ฅ ์๋จ์ {% extends 'base.html' %} ์์ฑ 7. ๊ณตํต๋์ง ์์ ์์๋ค์ {% block content %} {% endblock %} ๋ก ๋ฌถ์ด์ค๋ค
[CSS] Flexbox
float ๋ชฉ์ : ์ด๋ฏธ์ง์ ํ ์คํธ ์ด๋ป๊ฒ ๋ฐฐ์นํ ๊ฒ์ธ์ง ์ ์ - left, center, right : ํ ์คํธ๊ฐ ์ด๋ฏธ์ง ๊ฐ์ธ๋ ํํ๋ก ๋ํ๋จ flexbox 1. container์ ์ ์ฉ : display, flex-direction, flex-wrap, justifu-content, align-iems, ... 2. item์ ์ ์ฉ : order, flex-grow, flex, align-self, flex-shrink ์ค์ฌ์ถ(main axis)๊ณผ ๋ฐ๋์ถ(cross axis)์ด ์๋ค ์ค์ต ์ค๋น div.container>div.item.item${$}*10 ์ ๋ ฅ ํ tabํค ๋๋ฅด๊ธฐ Tip height: 100% → ์์ดํ ์ ๋ง๊ฒ ๋์ด๊ฐ ์ง์ ๋จ, ์์ดํ ์ด ๋ค์ด์๋ ๋ถ๋ชจ์ ๋์ด์ 100% ์ฑ์ฐ๊ฒ ๋ค ์๋ฅผ ๋ค๋ฉด..