i started to learn django using the official documentation tutorial and in turn created this registration form. i have the whole app setup but am stuck at how to process the data. i mean the documentation is a little tough to understand. if i can get some help, it would be great.
this is how the models are setup:
class user (models.Model):
username = models.CharField(max_length=20)
name = models.CharField(max_length=25)
collegename = models.CharField(max_length=50)
event = models.CharField(max_length=30)
col_roll = models.CharField(max_length=15)
def __unicode__(self):
return self.username
and this is the form in index.html:
<form action="" method="post"></form>
<input name="username" type="text" maxlength="40" />
<input name="name" type="text" maxlength="40" />
<input name="collegename" type="text" maxlength="40" />
<input name="event" type="text" maxlength="40" />
<input name="col_roll" type="text" maxlength="40" />
<input type="submit" value="Register" />
</form>
i do not follow how to create the view to process this registration of a new user. if anybody could help me, it would be great. The database (MySQL) is created with the name (register_user). I do not understand how to put the values from the above form in to the database. If it would have been regular python, it would have been easily done, but DJANGO i dont understand.
Thanks a lot.