For example, using my UserProfile model:
class UserProfile(models.Model):
user = models.ForeignKey( User, unique=True )
blurb = models.CharField( max_length=200, null=True, blank=True )
public = models.BooleanField( default=True )
...
Thus, I end up with a field called "public". This doesn't jive in ActionScript because it's a keyword. It's annoying to change because it's baked into several layers of functionality in the django-profile package. So, I'm forced to rename it on the Flex side:
[RemoteClass(alias="...")]
[Bindable]
public class UserProfile
{
public function UserProfile()
{
}
public var id:int;
public var blurb:String;
public var _public:Boolean;
...
Where, on either side of the transaction, can I state "remote field public translates to local field _public"? I messed around a bit with ClassAliases on the PyAMF side but it got messy quickly and there's no documentation on how to do this nicely. And the documentation on the Flex side seems to indicate that there's a "process the incoming request" handler that I can override, but I think it occurs after already populating the fields in the com object, thus dropping them on the floor, since the appropriate field is not there, and leaving me with a bunch of:
ReferenceError: Error #1056: Cannot create property
in the Flex trace...