A
A
Alexander Vinogradov2019-02-18 09:48:43
Django
Alexander Vinogradov, 2019-02-18 09:48:43

How to place a form anywhere?

If we take a feedback form as an example, then a specific address is prescribed for its processing, for example:

path('contact/', views.ContactView.as_view(), name='contact'),

How then can this form (and any other) be inserted anywhere on the site on any page?
While it comes to mind to create an ajax request and insert the resulting code into the tree.
Or create your own tag, which will also insert the result of the form.
And in such cases, how to insert the same feedback form on the flatpages page?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question