Re: return pk id on Form

2010-08-02 Thread alan-l
Thank you for the point in the right direction. In the end i now have: @models.permalink def get_absolute_url(self): return ('c_viewcontact', [str(self.id)]) class ContactForm(ModelForm): class Meta: model = Contacts fields = ('contact_type', 'firstname', 'surname', 'note

Re: return pk id on Form

2010-08-02 Thread Daniel Roseman
On Aug 2, 3:27 pm, alan-l wrote: > Hi, > i have the below that im thought would be the best approach to have a > add contact page on my app: > > class ContactForm(ModelForm): >     class Meta: >         model = Contacts >         fields = ('contact_type', 'firstname', 'surname', 'notes') > > def a

return pk id on Form

2010-08-02 Thread alan-l
Hi, i have the below that im thought would be the best approach to have a add contact page on my app: class ContactForm(ModelForm): class Meta: model = Contacts fields = ('contact_type', 'firstname', 'surname', 'notes') def addcontact(request, request_id=0, template_name='addc