limscoder / amfast

An Adobe AMF serialization and RPC implementation for Python, written as a C extension for speed.
MIT License
5 stars 6 forks source link

Django specific ClassDef #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Django ClassDef needs to override 'getInstance' method to call __init__ instead 
of __new__

Original issue reported on code.google.com by dthomp...@gmail.com on 20 Nov 2010 at 3:56

GoogleCodeExporter commented 9 years ago
Hey dave,

first off thanks for opening this ticket.
I did as you suggested, ie: made a new class MyClassDef and did an override of 
the getInstance function. Works great!

here is my MyClassDef class:

from amfast import class_def

class MyClassDef(class_def.ClassDef):
    def getInstance(self):
        c = self.class_.__new__(self.class_)
        c.__init__()
        return c

Thanks again for your help!
Cheers,
B.

Original comment by anthony....@gmail.com on 20 Nov 2010 at 5:04

GoogleCodeExporter commented 9 years ago
I added a DjangoClassDef class to the project. It's in trunk.

Original comment by dthomp...@gmail.com on 14 Aug 2011 at 11:33