views.py:
class LoveLetterCreateView(LoginRequiredMixin, CreateView):
model = LoveLetter
fields = '__all__'
success_url = reverse_lazy('login') # NOT WORKING
class SignUpView(CreateView):
form_class = UserCreationForm
success_url = reverse_lazy('login') # WORKING
template_name = 'love_letters/signup.html'
Why it would work in one CreateView but not in the other?
I tried:
def get_success_url(self):
- NOT WORKING.