티스토리 뷰
ERROR/SQL
[django]AttributeError at /bookmark/module 'bookmark' has no attribute '_default_manager'
onlyun 2022. 7. 4. 11:01
쟝고로 웹 페이지 - bookmark 만드는 중에 에러 떴음.
쟝고에서 기본적으로 제공하지 않는 페이지를 만들기 -bookmark_list, bookmark_detail 페이지

from django.contrib import admin
from django.urls import path
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
import bookmark
...
urlpatterns = [
path('admin/', admin.site.urls),
#이거 추가
path('bookmark/', ListView.as_view(model=bookmark), name='index'),
path('bookmark/<int:pk>/', DetailView.as_view(model=bookmark), name='detail'),
]
>> urls.py에서 import가 제대로 안 되어 있었음
from django.contrib import admin
from django.urls import path
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from bookmark.models import Bookmark
urlpatterns = [
path('admin/', admin.site.urls),
#이거 추가
path('bookmark/', ListView.as_view(model=Bookmark), name='index'),
path('bookmark/<int:pk>/', DetailView.as_view(model=Bookmark), name='detail'),
]'ERROR > SQL' 카테고리의 다른 글
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- caption-side
- typeof
- border-spacing
- html atrribute
- css
- CascadingStyleSheet
- JavaScript
- 변수
- selcetor
- 입력양식
- BAEKJOON
- ScriptTag
- html
- A%B
- 스크립태그
- Java
- input type 종류
- html a tag
- initialized
- html input type
- html pre
- 미디어 태그
- empty-cell
- scanner
- 외부구성요소
- html base tag
- improt
- text formatting
- 기본선택자
- html layout
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함