일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- beautifulsoup
- 명령프롬프트
- 리액트강의
- 안구보호
- 어두운
- CPU팬홀더
- HTML Parse
- 고대비
- Google Cloud SQL
- 리스트뷰
- 색상반전
- 웹크롤링
- 동적
- 팬홀더
- raspberry pi
- 비쥬얼 스튜디오
- CPU소켓
- 게임으로놀면서웹사이트만들기
- 국비지원교육
- 데이원컴퍼니
- 라즈베리파이
- Google Cloud Platform
- SMB
- GCP
- Django
- 야간
- K디지털기초역량훈련
- 구글 클라우드 플랫폼
- Docker
- pycharm
- Today
- Total
목록전체 글 (50)
뚝딱쓱삭
출처 : www.andrew-tremblay.com/blog/django-common-models/ stackoverflow.com/questions/2414473/how-to-assign-currently-logged-in-user-as-default-value-for-a-model-field 흔히 모델 작업을 하다보면, 다음과 같은 내용들을 처리하는데 어려움을 겪는다. 오브젝트의 unique identifier : id 오브젝트 생성시점 : created_at 오브젝트 생성한 유저 : created_by 오브젝트 업데이트 시점 : updated_at 오브젝트 업데이트한 유저 : updated_by 해당 내용은 이미 Django의 기본 Model에 들어가있으며(Common Model) 다음과 같이 사용..
※ Django 3.1기준. 타 버젼에서 작동여부 확인못함. 1) views.py에서 user정보를 kwargs 추가 인수로 넘겨준다. class SampleView() form = SampleForm(request.POST, user=request.user) #.....어쩌구저쩌구... def get_from_kwargs(self): kwargs = super(SampleView, self).get_form_kwargs() kwargs['user_id'] = self.request.user.id return kwargs 2) forms.py의 __init__함수에서 kwargs를 사용하여 인수를 받아오고, super로 모class의 __init__함수를 호출한다. def __init__(self, *a..
Bootstrap 4의 모든 class 목록 www.w3schools.com/bootstrap4/bootstrap_ref_all_classes.asp Navbar와 Nav 의 스타일링 관련 medium.com/coder-grrl/the-guide-to-customising-the-bootstrap-4-navbar-i-wish-id-had-6-months-ago-7bc6ce0e3c71
1) prettier를 설치한다. 2) javascript코드를 연다. 3) ctrl+p를 눌러서 command palette를 를 연다. 4) format document with 를 선택하면, 사용할 수 있는 code formatter 목록이 나온다. 5) prettier를 선택한다.
원문 : https://coderbook.com/@marcus/how-to-change-name-of-django-application/ Django 3.x App이름 바꾸기 1. 일단 PyCharm을 사용한다. 2. App이름을 바꿔야하는 폴더이름을 Refactor기능을 사용하여 원하는 이름으로 바꾼다 3. 하기 파일들에서 제대로 바뀌었는지 확인하고 적당히 바꿔준다. Import 구문의 앱이름 Models Meta app_name 값 INSTALLED_APPS settings (settings.py) 앱을 지칭하거나 참고하는 기타 문자열 등 4. 데이타베이스서버에서 다음 쿼리를 실행한다. UPDATE django_content_type SET app_label='' WHERE app_label=''; ..
zetawiki.com/wiki/Bootstrap_CDN,_%EC%B5%9C%EC%8B%A0_%EB%B2%84%EC%A0%84_%EC%82%AC%EC%9A%A9 Bootstrap CDN, 최신 버전 사용 - 제타위키 다음 문자열 포함... zetawiki.com
1. 헤더에 다음과 같이 링크한다. 2. 다음과 같이 material design icon을 링크한다. directions_run ※icon목록은 하기 링크 참조 material.io/resources/icons/?icon=calendar_today&style=baseline