django(66)
-
Django Page not found(404)
mysite/urls.py에 'ocrupload'관련 내용이 빠져서 생긴 오류 urlpatterns = [ path('ocrupload/', include('ocrupload.urls')), path('mp3/', include('mp3.urls')), path('ocr/', include('ocr.urls')), path('gantt/', include('gantt.urls')), path('admin/', admin.site.urls), ]
2021.04.24 -
Forbidden (403) : CSRF verification failed. Request aborted.
Forbidden (403) CSRF verification failed. Request aborted. You are seeing this message because this site requires a CSRF cookie when submitting forms. This cookie is required for security reasons, to ensure that your browser is not being hijacked by third parties. If you have configured your browser to disable cookies, please re-enable them, at least for this site, or for “same-origin” requests...
2021.04.10 -
NoReverseMatch : Reverse for 'download' not found. 'download' is not a valid view function or pattern name.
/mp3/views.py def index(request) : template = 'index.html' return render(request, template, None) mp3/templates/index.html mp3/urls.py app_name = 'mp3' urlpatterns = [ path('', views.index, name='index'), ] index.html에서 찾는 download가 없기 대문에 에러 발생 아래와 같이 추가해줘야 함 views.py def index(request) : template = 'index.html' return render(request, template, None) def download(request) : return HttpResponseR..
2021.04.10 -
The current path, mp3/, didn't match any of these.
로그 에러 Not Found: /mp3/ mp3/urls.py에 아래와 같이 셋팅이 되어 있는데, 못 찾음 from django.urls import path from . import views app_name = 'mp3' urlpatterns = [ path('', views.index, name='index'), ] project/urls.py에 mp3 관련해서 아래 내용이 포함되어야 함 from django.contrib import admin from django.urls import path, include urlpatterns = [ path('mp3/', include('mp3.urls')), path('admin/', admin.site.urls), ]
2021.04.06 -
Django urls.py 셋팅
project : mysite app : mp3 mp3/urls.py from django.urls import path from . import views app_name = 'mp3' urlpatterns = [ path('', views.index, name='index'), ] mysite/urls.py from django.contrib import admin from django.urls import path, include urlpatterns = [ path('mp3/', include('mp3.urls')), ]
2021.04.06 -
Django project 생성
django-admin startproject mysite
2021.04.06