주 메뉴 열기
대문
임의의 문서로
로그인
설정
Pywiki 소개
면책 조항
Pywiki
검색
바뀜
← 이전 편집
다음 편집 →
회원관리 2-1. 커스텀유저(Profile 이용)
(편집)
2021년 11월 2일 (화) 17:51 판
3 바이트 제거됨
,
2021년 11월 2일 (화) 17:51
→url 추가
54번째 줄:
54번째 줄:
=== url 추가 ===
=== url 추가 ===
다음과 같이 url을 추가해준다.<syntaxhighlight lang="python">
다음과 같이 url을 추가해준다.<syntaxhighlight lang="python">
−
path('
create_profile
/', views.
create_profile
, name='
create_profile
'),
+
path('
profile_create
/', views.
profile_create
, name='
profile_create
'),
</syntaxhighlight>
</syntaxhighlight>
60번째 줄:
60번째 줄:
다음과 같이 뷰를 추가한다.<syntaxhighlight lang="python">
다음과 같이 뷰를 추가한다.<syntaxhighlight lang="python">
@login_required()
@login_required()
−
def
create_profile
(request):
+
def
profile_create
(request):
pass
pass
</syntaxhighlight>
</syntaxhighlight>
−
=== view에서 사용할
profile
추가 ===
+
=== view에서 사용할
form
추가 ===
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
from .models import Profile
from .models import Profile
Sam
사무관
,
인터페이스 관리자
,
관리자
, 교사
편집
1,408
번