Django - Class Based Generic View - “No URL to redirect to”

前端 未结 5 616
既然无缘
既然无缘 2021-01-31 14:09

I\'m using the generic CreateView like:

#urls.py

from django.conf.urls.defaults import *
from django.views.generic import CreateView
from content.models import          


        
5条回答
  •  迷失自我
    2021-01-31 14:46

    Add in views:

    def form_valid(self, form):
    
       return self.render_to_response(self.get_context_data(form=form))
    

提交回复
热议问题