전체 글(831)
-
Django Admin에 버튼 추가
project 레벨에서는 템플릿 파일을 오버라이딩하여 사용할 수 있음 app 레벨에서는 템플릿 파일 url을 변경하여 사용할 수 있음 [admin.py] from django.urls import path .. change_list_template = 'app이름/모델명_change_list.html' def get_urls(self) : urls= super().get_urls() my_urls = [ path('sync/', self.sync), ] return my_urls + urls def sync(self,request) : with connections['local'].cursor() as cursor : cursor.execute(updae_or_insert_delete_sql) curso..
2021.01.07 -
QuerySet 참조
https://m.blog.naver.com/PostView.nhn?blogId=dudwo567890&logNo=220924729927&proxyReferer=https:%2F%2Fwww.google.co.kr%2F
2021.01.07 -
'Cannot assign "%r": the current database router prevents this relation.' % value)
https://code.djangoproject.com/ticket/20337 #20337 (ValueError when database router prevents relation is unclear) – Django I'm using a custom database router to manage queries between two databases. In my router, the allow_relation method was set incorrectly, and as a result, two models from separate apps weren't allowed to reference each other. The ValueError I received looke code.djangoproject..
2021.01.07 -
관련 문의
https://code.djangoproject.com/query
2021.01.07 -
systemctl 에러 전체 글자 확인
journalctl -f systemctl start httpd 실행 journalctl 터미널창에서 에러 전체 글자 확인 systemctl status httpd.service 키보드 화살표로 이동
2021.01.06 -
module 내용 보기
strings mod_jk.so | grep -i mod_jk
2021.01.06