title: where to create group and pass the permission in django
body: <h2>i need to create group seekers and user register he has to automatically add to seekers</h2>
  
  <hr>
  
  <p>models.py</p>
  
  <pre><code>class Seeker(models.Model):
         user = models.OneToOneField(User)
         birthday = models.DateField()
         name = models.CharField(max_length=100)
  
          def __unicode__(self):
             return self.name
  </code></pre>
  
  <p><strong>forms.py</strong></p>
  
  <blockquote>
    <p>this is the  default user for storing the userid &amp; password for my application          </p>
  </blockquote>
  
  <pre><code>class RegistrationForm(ModelForm):
       username = forms.CharField(label = (u'User Name'))
       email = forms.EmailField(label =(u'Email Address'))
       password = forms.CharField(label = (u'Password'),widget = forms.PasswordInput(render_value = False))
       password1 = forms.CharField(label =(u'Verify Password'),widget = forms.PasswordInput(render_value = False))
  
     class Meta:
         model = Seeker
         exclude = ('user',)
  
     def clean_username(self):
         username = self.cleaned_data['username']
         try:
            User.objects.get(username = username)
         except User.DoesNotExist:
         return username
  
         raise forms.ValidationError("That username is already taken,please select another.")
  
     def clean(self):
  
        if self.cleaned_data['password'] != self.cleaned_data['password1']:
             raise forms.ValidationError("The Password did not match please try again.")
        return self.cleaned_data
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <blockquote>
    <p>i am using default user for creating the user</p>
  </blockquote>
  
  <pre><code>def SeekersRegistration(request):
     if request.user.is_authenticated():
            return HttpResponseRedirect('/profile/')
     if request.method == "POST":
        form = RegistrationForm(request.POST)
        if form.is_valid():
          user = User.objects.create_user(username = form.cleaned_data['username'], email = form.cleaned_data['email'], password =form.cleaned_data['password'])
          user.save()
          seekers = Seeker(user =user, name = form.cleaned_data['name'],birthday = form.cleaned_data['birthday'])
          seekers.save()
          return HttpResponseRedirect('/profile/')
      else:
          return render_to_response('register.html',{'form':form},context_instance = RequestContext(request))
  else:
      '''user is not submitting the form, show them a blank registration form'''
      form = RegistrationForm()
      context = {'form':form}
      return render_to_response('register.html',context,context_instance = RequestContext(request))
  </code></pre>