본문 바로가기

web/Django

(52)
uwsgi logger disable option Add uwsgi.ini or uwsgi setting file option disable-logging = true It's worked!
django.db.utils.IntegrityError: Can't DROP 'XXXX'; check that column/key exists if you see the to error that 'django.db.utils.IntegrityError: Can't DROP 'XXXX'; check that column/key exists' you must migrate that colum to remove.and one more migrate that colum to insert than have migrate option to '--fake'$ python ./manage.py migrate YOUR_APP --fake than table is worked to normal behavior.
django.db.utils.IntegrityError: Unknown table if you have error message to 'django.db.utils.IntegrityError: Unknown table ' than remove the your table to already. so you can option --fake $ python ./manage.py migrate YOUR_APP --fake then ended migrate and it worded!
django ie8 / ie9 json save as problem django 에서 HttpResponse 리턴을 json으로 하면서 content_type을 제대로 지정을 하지 않는다면 ie8/9 에서 save as 가 발생합니다. 참고로 저의 경우 application/text 으로 지정을 했더군요. 단순히 리턴하는 content_type : text/plain 으로 바꿔주면 끝. - 참고로 json 으로 content_type 일땐 크롬에서 에러가 발생합니다.
django template if equal If it does not work if the door is an integerflowing change code: {% if codeInt1|add:0 == codeInt2|add:0 %} The default settings is a string. so This conversion is necessary to int.
ImportError: cannot import name execute_manager Traceback (most recent call last): File "./manage.py", line 2, in from django.core.management import execute_manager ImportError: cannot import name execute_manager This error is execute_manager() Was removed after 1.4 version.so following changes code: import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", ".settings") from django.core.management import ..
google plue login error 401 invalid_client google plue login error 401 invalid_client 에러가 난다면 로그인 정보에 앱 정보를 넣지 않아서 에러가 납니다. APIs&auth -> Consent screen -> PRODUCT NAME 을 넣어주시고 저장하면 끝.
remove django admin page auth menu #remove django admin page auth menu from django.contrib.auth.models import User, Groupfrom django.contrib import adminadmin.autodiscover() admin.site.unregister(User)admin.site.unregister(Group)