Django - TemplateView and POST

前端 未结 1 806
太阳男子
太阳男子 2021-01-21 10:46

I have a page generated by a TemplateView and containing a POST form. How can I use this form with a TemplateView.

There is an example similar of my code :



        
相关标签:
1条回答
  • 2021-01-21 11:24

    For generic.TemplateView you have only get method implemented. You should implement post method to allow post form or try to use generic.FormView

    More details in documentation: https://docs.djangoproject.com/en/1.11/topics/class-based-views/generic-editing/

    0 讨论(0)
提交回复
热议问题