hi,
The post save functionality is not working fine  for me , please
rectify mu faults ,
i have tried 2 ways to access post save functionality but both failed
( shown below  as no :1 and no: 2 )

i case of no: 1
i got the o/p of line no 12 in the server but after saving ,line no 14
is not displayed in the server

i case of no 2:
i cannot understand whatis going on



from django.db import models
from django.db.models import signals

class Selector(models.Model):
        selctor_name = models.CharField(max_length=200)
        acct_number =  models.CharField(max_length=200,editable=False)

1.      def save(self):

11          self.acct_number= 'RBSA'
12          print "i have call save method here         "
13          super(Selector, self).save()
14          print "i got the id the number is : ",self.id
15          self.acct_number += str(self.id)


2.      def after(instance, created, **kwargs):
           print '%s was just %s' % (instance, created and 'created'
or 'updated')
           print "i'ma inside after method now"
        signals.post_save.connect(after, sender=Selector)


Sorry i am new to Django, just few weeks old
i hope i have conveyed my problem in a right way
thanks in advance
ganesh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to