title: Getting _wrapped_view() takes at least 1 argument (0 given) on creation of a model
body: <p>I have a registration form and when it's submitted I get the following error.</p>
  
  <p><strong>_wrapped_view() takes at least 1 argument (0 given)</strong></p>
  
  <p>It occurs when I am instantiating a new <em>UserProfile</em> object in my <strong>view.py</strong>, namely, the <strong>AppUserRegistration</strong> function.</p>
  
  <p>I'm banging my head up against the wall on this.  There error message does not help much at all.</p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class UserProfile(models.Model):
      user = models.OneToOneField(User)
      birthday = models.DateField(null=True, blank=True)
      profession = models.CharField(max_length=100, null=True, blank=True)
      created = models.DateTimeField()
      modified = models.DateTimeField()
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.http import HttpResponseRedirect
  from django.contrib.auth.models import User
  from django.contrib.auth.decorators import login_required
  from django.shortcuts import render_to_response
  from django.template import RequestContext
  from AutoDIY.forms import RegistrationForm, LoginForm, UserProfileAboutForm
  from AutoDIY.models import UserProfile
  from django.contrib.auth import authenticate, login, logout 
  
  def AppUserRegistration(request):
      if request.user.is_authenticated():
          return HttpResponseRedirect('/')
      if request.method == 'POST':
          form = RegistrationForm(request.POST)
          if form.is_valid():
              first_name = form.cleaned_data.get('first_name')
              last_name = form.cleaned_data.get('last_name')
              username = form.cleaned_data.get('username')
              email = form.cleaned_data.get('email')
              password = form.cleaned_data.get('password')
              user = User.objects.create_user(username=username,
                                              email=email,
                                              password=password)
              user.first_name = first_name
              user.last_name = last_name
              user.save()
              user_profile = UserProfile(user=user) # fails right here
              ...
  </code></pre>
  
  <p><strong>register.html</strong></p>
  
  <pre><code>&lt;form class="form-login form-wrapper form-medium" method="POST"&gt;
      {% csrf_token %}
      &lt;h3 class="title-divider"&gt;&lt;span&gt;Sign Up&lt;/span&gt;
           &lt;small&gt;Already signed up? &lt;a href="{% url login %}"&gt;Login here&lt;/a&gt;.&lt;/small&gt;
      &lt;/h3&gt;
  
      {% if form.errors %}
  
          &lt;div class="alert alert-error"&gt;
              &lt;button type="button" class="close" data-dismiss="alert"&gt;&amp;times;&lt;/button&gt;
              &lt;strong&gt;Please correct the following fields:&lt;/strong&gt;
              &lt;ul&gt;
                  {% if form.first_name.errors %}&lt;li&gt;First name&lt;/li&gt;{% endif %}
                  {% if form.last_name.errors %}&lt;li&gt;Last name&lt;/li&gt;{% endif %}
                  {% if form.username.errors %}&lt;li&gt;Username&lt;/li&gt;{% endif %}
                  {% if form.email.errors %}&lt;li&gt;Email address&lt;/li&gt;{% endif %}
                  {% if form.password.errors %}&lt;li&gt;Password&lt;/li&gt;{% endif %}
                  {% if form.password1.errors %}&lt;li&gt;Password Verification&lt;/li&gt;{% endif %}
              &lt;/ul&gt;
          &lt;/div&gt;
  
      {% endif %}
  
      &lt;h5&gt;Account Information&lt;/h5&gt;
      {{ form.first_name }}
      {{ form.last_name }}
      {{ form.username }}
      {{ form.email }}
      {{ form.password }}
      {{ form.password1 }}
      &lt;label class="checkbox"&gt;
          &lt;input type="checkbox" value="term"&gt;
          I agree with the Terms and Conditions.
      &lt;/label&gt;
      &lt;button class="btn btn-primary" type="submit"&gt;Sign up&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>