issues
search
choppaluv
/
HighTravel
0
stars
0
forks
source link
trip admin user implementation - settings menu
#20
Closed
ghost
closed
6 years ago
ghost
commented
6 years ago
Added ForeignKey Creator to Trip Model
조교님의 조언에 따라 trip에 admin 계정을 만들었습니다.
trip에 creator field를 추가하고 자동으로 생성자로 등록하였습니다.
user detail에서도 ownTrips라는 related name으로 확인할 수 있습니다.
ghost
commented
6 years ago
Added permission to trip detail view
creator만 trip detail을 수정할 수 있도록 permission을 추가하였습니다.
ghost
commented
6 years ago
Edited creator field to charfield
frontend와의 통신 편의를 위하여 creator를 user가 아닌 username을 저장하는 charfield로 변경하였습니다.
다음과 같이 post 할 수 있습니다.
creator에는 any string을 넣으면 token에 따라 username이 들어갑니다.
ghost
commented
6 years ago
Frontend settings menu rendering based on creator
frontend settings menu의 adduser 기능을 creator만 볼 수 있도록 설정하였습니다.
creator만 할 수 있는 추가 기능을 더 생각해봅시다.
Creator의 경우
Creator가 아닌 경우
Added ForeignKey Creator to Trip Model