get_success_url

    [pinterest clone (25)] get_success_url 함수와 리팩토링

    몇가지의 수정사항 1 class ProfileCreateView(CreateView): model = Profile context_object_name = 'target_profile' form_class = ProfileCreationForm success_url = reverse_lazy('accountapp:hello_world') template_name = 'profileapp/create.html' 보면 success_url로 hello_world를 넘겨주고 있는데 detail로 넘어가는게 더 자연스러워보인다. 하지만 accountapp:detail.html로 코드를 짜면 작동하지 않게되는데 그 이유는 urlpatterns = [ path('hello_world/', hello_world, n..