I want to have a user submitted form in a certain page. My model is like this
class Ask(models.Model):
name = models.CharField(max_length=500)
designation = models.CharField(max_length=200, blank=True)
email = models.EmailField()
phone = models.CharField(max_length=20, blank=True)
avatar = models.ImageField(upload_to="/ask/users/avaters", blank=True)
question = models.CharField(max_length= 1024)
ques_time = models.DateField()
answere = models.TextField()
ans_time = models.DateField()
display = models.BooleanField()
asker_ip = models.CharField(max_length=100)
From user I will receive name, designation, email, phone, avater and question. ques_time and ans_time will automatically update in that time. Answer will be filled from site owner in the django admin. asker_ip will be automatically received from browser ip address.
I have a basic template in the template section. When the form submitted user will redirect to that page but with a success message in the form portion. BTW I want user to upload that avater image.
Now how should I start on this topic. If you can just describe how to start writing or send me an url that would be helpful.