title: Passing Django form data to frondend framework (DRF)
body: <h1>Background</h1>
  <p>I ran into a really annoying problem here. I've decided to use Svlete as my frontend. Also, I have a lot of endpoints in my REST api that expect form data. In the past I would just forms.py in my app's directory and then add a form like:</p>
  <pre><code>class ProductsModelForm(forms.ModelForm):
      class Meta:
          model = Product
          fields = (
              'name',
              'weight',
          )
  
  class ProductForm(forms.Form):
      name = forms.CharField()
      weight = forms.IntegerField()
  </code></pre>
  <p>And would then use</p>
  <pre><code>&lt;form method=&quot;post&quot;&gt;
      {% csrf_token %}
      {{ form.as_p }}
      &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  <p>In the HTML template. All cool.</p>
  <h1>DRF + Frontend Framework</h1>
  <p>Obviously I still have the form in the forms.py but now I have to define the form in the fronend too. And with bigger forms it gets really annoying because I always have to compare that I have every field in my frontend form that I have defined in the django backend form. Is ther any solution to this?</p>