title: Django edit comment
body: <p>So i want to do a edit existing comment, but it gives me this error </p>
  
  <blockquote>
    <p>ValueError at /episode/Dragon-Ball-Super/edit/11
    The view home.views.edit_comment didn't return an HttpResponse object. It returned None instead.</p>
  </blockquote>
  
  <p>edit_comment </p>
  
  <pre><code>def edit_comment(request, slug, id):
      anime = get_object_or_404(Anime, slug=slug)
      comment = get_object_or_404(Comment, id=id)
      form = CommentForm(request.POST, instance=comment.user)
      if request.method == 'POST' or 'NONE':
          if form.is_valid():
              form.save()
              return redirect('anime_title', slug=slug)
          else:
              form = CommentForm()
              context = {'form': form}
              return render(request, 'home/edit-comment.html', context)
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>urlpatterns = [
  path('', views.index, name='index'),
  re_path(r'^episode/(?P&lt;slug&gt;[\w-]+)/$', views.anime_title, name='anime_title'),
  re_path(r'^episode/(?P&lt;slug&gt;[\w-]+)/comment/$', views.add_comment, name='add_comment'),
  re_path(r'^episode/(?P&lt;slug&gt;[\w-]+)/edit/(?P&lt;id&gt;\d+)/?', views.edit_comment, name='edit_comment'),
  </code></pre>
  
  <p>]</p>
  
  <p>link under existing comment</p>
  
  <pre><code>{% if comment.user == request.user.userprofile %}
      &lt;h6 class="small comment-meta"&gt;
       &lt;a href="{% url 'edit_comment' slug=anime.slug id=comment.id %}"&gt;Edit&lt;/a&gt;
                      Delete&lt;/h6&gt;
  {% endif %}
  </code></pre>
  
  <p>models.py</p>
  
  <pre><code>class Comment(models.Model):
      anime = models.ForeignKey(Anime, on_delete=models.CASCADE)
      user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
      body = models.TextField()
      created = models.DateTimeField(auto_now_add=True)
  </code></pre>
  
  <p>edit-comment.html</p>
  
  <pre><code>    {% extends 'base/base.html' %}
      {% block head %}
          &lt;title&gt;Edit Comment&lt;/title&gt;
      {% endblock %}
      {% block content %}
          &lt;h2&gt;Edit Comment&lt;/h2&gt;
          &lt;form method="POST"&gt;
              {% csrf_token %}
              {{ form.as_p }}
              &lt;button type="submit"&gt;Submit&lt;/button&gt;
          &lt;/form&gt;
      {% endblock %}
  </code></pre>