title: Save and Update data from custom html forms in django
body: <p>I've created a custom HTML form for my model, just like I want to add a post from the front-end. I already created a page with the name <strong>add-post.html</strong></p>
  <pre><code>    &lt;form method=&quot;POST&quot; action=&quot;&quot;&gt;
      {% csrf_token %}
          &lt;input name=&quot;title&quot; type=&quot;text&quot;&gt;
          &lt;textarea spellcheck=&quot;false&quot; name=&quot;description&quot;&gt;&lt;/textarea&gt;
          &lt;input type=&quot;file&quot; name=&quot;image&quot; @change=&quot;fileName&quot; multiple /&gt;
          &lt;select required name=&quot;priority&quot;&gt;
             &lt;option value=&quot;Low&quot; selected&gt;Low&lt;/option&gt;
             &lt;option value=&quot;Medium&quot;&gt;Medium&lt;/option&gt;
             &lt;option value=&quot;High&quot;&gt;High&lt;/option&gt;
          &lt;/select&gt;
          &lt;input type=&quot;checkbox&quot; name=&quot;on_hold&quot;&gt;
          &lt;button type=&quot;submit&quot;&gt;Add ToDo&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>
  <p>Here's my <strong>model.py</strong></p>
  <pre><code>class Todo(models.Model):
      title = models.CharField(max_length=100)
      image = models.ImageField(null=True, blank=True, upload_to='todo/images/')
      description = RichTextField()
      Low, Medium, High = 'Low', 'Medium', 'High'
      priorities = [
          (Low, 'Low'),
          (Medium, 'Medium'),
          (High, 'High'),
      ]
      priority = models.CharField(
          max_length=50,
          choices=priorities,
          default=Low,
      )
      on_hold = models.BooleanField(default=False)
  </code></pre>
  <p>No, I want to use the above custom HTML form to post data and save it to this model database. instead of using <code>{% form.as_p %}</code></p>
  <p>And I also created a particular page to update this post from the front-end but don't know how to make it work.</p>
  <p>Can you please guide me on how can I save data from the custom form and also update it from the custom form?
  Appreciate your response :)</p>