display items in a database in a webpage and edit
<p>I am getting the below error when I tried to run the edit part.</p>

<p>Displaying the contents of database in webpage is working fine. I have put up code for just the edit part.</p>

<blockquote>
  <p>TypeError at /edit/ <br/>
  <code>__init__()</code> takes exactly 1 argument (2 given)</p>
</blockquote>

<p>views.py</p>

<pre><code>class userUpdate(UpdateView):
    model = user
    fields = ['name','phone','dob','gender']
    template_name_suffix = '_update_form'
</code></pre>

<p>urls.py</p>

<pre><code>from django.conf.urls import include, url
from newapp import views
urlpatterns = [url(r'^edit/',views.userUpdate, name = 'user_update_form'),]
</code></pre>

<p>user_update_form.html</p>

<pre><code>&lt;form action="" method="post"&gt;{% csrf_token %}
    {{ form.as_p }}
    &lt;input type="submit" value="Update" /&gt;
&lt;/form&gt;
</code></pre>

<p>Class-based views need to be referenced in urls.py via their <code>as_view</code> method:</p>

<pre><code>url(r'^edit/', views.userUpdate.as_view(), name = 'user_update_form'),
</code></pre>

python django