Re: implementing a ticket submission system

2014-06-13 Thread Anurag Baidyanath
Thanks!
it solved the problem

On Wednesday, 11 June 2014 23:40:59 UTC+5:30, Ilya Kazakevich wrote:
>
> Hello, 
>
> Use Primary Key: 
> https://docs.djangoproject.com/en/dev/topics/db/models/#automatic-primary-key-fields
>  
>
>
> Ilya Kazakevich, 
> JetBrains PyCharm (Best Python/Django IDE) 
> http://www.jetbrains.com/pycharm/ 
> "Develop with pleasure!" 
>
>
> >-Original Message- 
> >From: django...@googlegroups.com  
> >[mailto:django...@googlegroups.com ] On Behalf Of Anurag 
> Baidyanath 
> >Sent: Wednesday, June 11, 2014 10:06 PM 
> >To: django...@googlegroups.com  
> >Subject: implementing a ticket submission system 
> > 
> >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...@googlegroups.com . 
> >To post to this group, send email to django...@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-13f 
> >006a688dd%40googlegroups.com 
> > >3f006a688dd%40googlegroups.com?utm_medium=email_source=footer> . 
> >For more options, visit https://groups.google.com/d/optout. 
>
>
>

-- 
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/85fd8849-22a5-41fc-ab14-8f0036793a1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: implementing a ticket submission system

2014-06-11 Thread Ilya Kazakevich
Hello,

Use Primary Key: 
https://docs.djangoproject.com/en/dev/topics/db/models/#automatic-primary-key-fields


Ilya Kazakevich,
JetBrains PyCharm (Best Python/Django IDE)
http://www.jetbrains.com/pycharm/
"Develop with pleasure!"


>-Original Message-
>From: django-users@googlegroups.com
>[mailto:django-users@googlegroups.com] On Behalf Of Anurag Baidyanath
>Sent: Wednesday, June 11, 2014 10:06 PM
>To: django-users@googlegroups.com
>Subject: implementing a ticket submission system
>
>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-13f
>006a688dd%40googlegroups.com
>3f006a688dd%40googlegroups.com?utm_medium=email_source=footer> .
>For more options, visit https://groups.google.com/d/optout.


-- 
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/00bf01cf85a0%246db7d720%2449278560%24%40JetBrains.com.
For more options, visit https://groups.google.com/d/optout.