I've some url that I want to render a template without creating a view for each one, but inside I need a form with the csrf tag, so when the user post the form I get no csrf token becouse the template have no RequestContext render on it.
How can I render templates declare in url and use csrf without creating a view for each one
My urls.py path('path/', TemplateView.as_view(template_name='template.html')),
The error: CSRF token missing or incorrect. UserWarning: A {% csrf_token %} was used in a template, but the context did not provide the value. This is usually caused by not using RequestContext. "A {% csrf_token %} was used in a template, but the context "