i am implementing a ticket submission system whose model.py file looks loke 
this:
class Ticket(models.Model):
    user_id=models.ForeignKey(User)
    category_id=models.ForeignKey(Category)
    subject=models.CharField(max_length=100)
    message=models.TextField(help_text="enter message")
    ticket_id=models.IntegerField(help_text="enter tid",unique=True)
    created_date_time=models.DateTimeField(auto_now_add=True)
    overdue_date_time=models.DateTimeField(auto_now_add=True)
    closed_date_time=models.DateTimeField(auto_now_add=True)
    status=models.IntegerField(help_text="enter status",default=0)
    reopened_date_time=models.DateTimeField(auto_now_add=True)
    topic_priority=models.IntegerField(help_text="enter priority",default=1)
    duration_for_reply=models.IntegerField(help_text="enter duration for 
reply",default=24)

i need to take the data submitted by the user(message and subject); and 
generate the ticket_id dynamically for each ticket. Then the data has to be 
saved into the database. please suggest an approach for this.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/557b5a43-536b-4051-b80c-13f006a688dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to