Wednesday, June 12, 2013

how could I get the instance of a proxy model

for example

class ModelA(models.Model):
     field1 = charfield ()
     field2 = charfield ()
     field3 = charfield ()

def create_itemmodel (sender, instance, created, ** kwargs):
     print "here my class", instance

class ItemModel(ModelA):
     class Meta:
         proxy = True

signals.post_save.connect (create_itemmodel, sender = ItemModel)

but when I save the model only appears: here my class but does not appear instance?

someone help me, because the instance does not print?

Cheers

--
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+unsubscribe@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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate