Inheritance

View: New views
6 Messages — Rating Filter:   Alert me  

Inheritance

by Jesse Warden-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Do y'all support inheritance?  What about composition?

I have a VO that's sort of like this:

package
{
[RemoteClass(alias="somedjango.app.Person")]
class PersonVO
{

    public var name:String;
    public var attack:AttackVO;

    public function PersonVO()
    {
    }
}
}

I can see it get submitted correctly through Charles, but the server throws a 500 and bitches about a missing Django logger.

The other question is, if both of those VO's map to inheritance tables, do those work in Django?  Like:

class Attack(models.Model)
    label = models.CharField(max_length=200)

class MeleeAttack(Attack)
    weapon = models.CharField(max_length=200)

Seems like that could be what's blowing up my serv-n0r; either y'all don't support inhertiance, or Python is getting made my object model doesn't translate right.  I copied how Joel was doing his with with the ArrayCollections mapping to ManyToMany's and the single's mapping to a ForeignKey.

Still isolating things down, just making sure yall support the above.

_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

Re: Inheritance

by Nick Joyce :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 22 Jul 2009, at 19:13, Jesse Warden wrote:

> Do y'all support inheritance?  What about composition?

Python inheritance is supported out of the box, however I haven't  
tried Django model inheritance.

>
> I have a VO that's sort of like this:
>
> package
> {
> [RemoteClass(alias="somedjango.app.Person")]
> class PersonVO
> {
>
>     public var name:String;
>     public var attack:AttackVO;
>
>     public function PersonVO()
>     {
>     }
> }
> }
>
> I can see it get submitted correctly through Charles, but the server  
> throws a 500 and bitches about a missing Django logger.

All should be good - can you post the stacktrace?

>
> The other question is, if both of those VO's map to inheritance  
> tables, do those work in Django?  Like:
>
> class Attack(models.Model)
>     label = models.CharField(max_length=200)
>
> class MeleeAttack(Attack)
>     weapon = models.CharField(max_length=200)
>
> Seems like that could be what's blowing up my serv-n0r; either y'all  
> don't support inhertiance, or Python is getting made my object model  
> doesn't translate right.  I copied how Joel was doing his with with  
> the ArrayCollections mapping to ManyToMany's and the single's  
> mapping to a ForeignKey.

If inheritance is not supported, then it is something that should  
be .. there is nothing in the test suite for that so I have created  
issue #629 [1] for that.

>
> Still isolating things down, just making sure yall support the above.
> _______________________________________________
> PyAMF users mailing list - users@...
> http://lists.pyamf.org/mailman/listinfo/users

[1] - http://pyamf.org/ticket/626
_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

Re: Inheritance

by Jesse Warden-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It says "no handlers could be found for logger 'blah blah blah DjangoGateway'"

Replace blah blah blah with the big-ole-package name.

On Wed, Jul 22, 2009 at 3:23 PM, Nick Joyce <nick@...> wrote:
On 22 Jul 2009, at 19:13, Jesse Warden wrote:

Do y'all support inheritance?  What about composition?

Python inheritance is supported out of the box, however I haven't tried Django model inheritance.



I have a VO that's sort of like this:

package
{
[RemoteClass(alias="somedjango.app.Person")]
class PersonVO
{

   public var name:String;
   public var attack:AttackVO;

   public function PersonVO()
   {
   }
}
}

I can see it get submitted correctly through Charles, but the server throws a 500 and bitches about a missing Django logger.

All should be good - can you post the stacktrace?



The other question is, if both of those VO's map to inheritance tables, do those work in Django?  Like:

class Attack(models.Model)
   label = models.CharField(max_length=200)

class MeleeAttack(Attack)
   weapon = models.CharField(max_length=200)

Seems like that could be what's blowing up my serv-n0r; either y'all don't support inhertiance, or Python is getting made my object model doesn't translate right.  I copied how Joel was doing his with with the ArrayCollections mapping to ManyToMany's and the single's mapping to a ForeignKey.

If inheritance is not supported, then it is something that should be .. there is nothing in the test suite for that so I have created issue #629 [1] for that.


Still isolating things down, just making sure yall support the above.
_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

[1] - http://pyamf.org/ticket/626
_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users


_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

Re: Inheritance

by Nick Joyce :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

PyAMF 0.4.2 has loggers for the gateway enabled by default so they need to be configured in some way. The upcoming 0.5 release disables this for performance reasons (although you can still enable the logger if you want).

before initialising the DjangoGateway, add in something along the lines:

import logging
logging.basicConfig()

and that error message should go away.

On 22 Jul 2009, at 20:25, Jesse Warden wrote:

It says "no handlers could be found for logger 'blah blah blah DjangoGateway'"

Replace blah blah blah with the big-ole-package name.

On Wed, Jul 22, 2009 at 3:23 PM, Nick Joyce <nick@...> wrote:
On 22 Jul 2009, at 19:13, Jesse Warden wrote:

Do y'all support inheritance?  What about composition?

Python inheritance is supported out of the box, however I haven't tried Django model inheritance.



I have a VO that's sort of like this:

package
{
[RemoteClass(alias="somedjango.app.Person")]
class PersonVO
{

   public var name:String;
   public var attack:AttackVO;

   public function PersonVO()
   {
   }
}
}

I can see it get submitted correctly through Charles, but the server throws a 500 and bitches about a missing Django logger.

All should be good - can you post the stacktrace?



The other question is, if both of those VO's map to inheritance tables, do those work in Django?  Like:

class Attack(models.Model)
   label = models.CharField(max_length=200)

class MeleeAttack(Attack)
   weapon = models.CharField(max_length=200)

Seems like that could be what's blowing up my serv-n0r; either y'all don't support inhertiance, or Python is getting made my object model doesn't translate right.  I copied how Joel was doing his with with the ArrayCollections mapping to ManyToMany's and the single's mapping to a ForeignKey.

If inheritance is not supported, then it is something that should be .. there is nothing in the test suite for that so I have created issue #629 [1] for that.


Still isolating things down, just making sure yall support the above.
_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

[1] - http://pyamf.org/ticket/626
_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users


_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

Re: Inheritance

by Jesse Warden-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well now, that's a huge Terminal puke.  I added those lines and I'm now seeing exceptions apparently.  Check it:


The VO structure, which does have all it's necessary remote class tags, is like:

PowerVO
- name : String
- attack : AttackVO

AttackVO
- label : String

MeleeAttackVO extends AttackVO

Hope that helps.

On Wed, Jul 22, 2009 at 3:43 PM, Nick Joyce <nick@...> wrote:
PyAMF 0.4.2 has loggers for the gateway enabled by default so they need to be configured in some way. The upcoming 0.5 release disables this for performance reasons (although you can still enable the logger if you want).

before initialising the DjangoGateway, add in something along the lines:

import logging
logging.basicConfig()

and that error message should go away.

On 22 Jul 2009, at 20:25, Jesse Warden wrote:

It says "no handlers could be found for logger 'blah blah blah DjangoGateway'"

Replace blah blah blah with the big-ole-package name.

On Wed, Jul 22, 2009 at 3:23 PM, Nick Joyce <nick@...> wrote:
On 22 Jul 2009, at 19:13, Jesse Warden wrote:

Do y'all support inheritance?  What about composition?

Python inheritance is supported out of the box, however I haven't tried Django model inheritance.



I have a VO that's sort of like this:

package
{
[RemoteClass(alias="somedjango.app.Person")]
class PersonVO
{

   public var name:String;
   public var attack:AttackVO;

   public function PersonVO()
   {
   }
}
}

I can see it get submitted correctly through Charles, but the server throws a 500 and bitches about a missing Django logger.

All should be good - can you post the stacktrace?



The other question is, if both of those VO's map to inheritance tables, do those work in Django?  Like:

class Attack(models.Model)
   label = models.CharField(max_length=200)

class MeleeAttack(Attack)
   weapon = models.CharField(max_length=200)

Seems like that could be what's blowing up my serv-n0r; either y'all don't support inhertiance, or Python is getting made my object model doesn't translate right.  I copied how Joel was doing his with with the ArrayCollections mapping to ManyToMany's and the single's mapping to a ForeignKey.

If inheritance is not supported, then it is something that should be .. there is nothing in the test suite for that so I have created issue #629 [1] for that.


Still isolating things down, just making sure yall support the above.
_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

[1] - http://pyamf.org/ticket/626
_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users


_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users



_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

Re: Inheritance

by Jesse Warden-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Er, this time with feeling:

http://pastebin.be/19933

On Wed, Jul 22, 2009 at 8:09 PM, Jesse Warden <jesse.warden@...> wrote:
Well now, that's a huge Terminal puke.  I added those lines and I'm now seeing exceptions apparently.  Check it:


The VO structure, which does have all it's necessary remote class tags, is like:

PowerVO
- name : String
- attack : AttackVO

AttackVO
- label : String

MeleeAttackVO extends AttackVO

Hope that helps.

On Wed, Jul 22, 2009 at 3:43 PM, Nick Joyce <nick@...> wrote:
PyAMF 0.4.2 has loggers for the gateway enabled by default so they need to be configured in some way. The upcoming 0.5 release disables this for performance reasons (although you can still enable the logger if you want).

before initialising the DjangoGateway, add in something along the lines:

import logging
logging.basicConfig()

and that error message should go away.

On 22 Jul 2009, at 20:25, Jesse Warden wrote:

It says "no handlers could be found for logger 'blah blah blah DjangoGateway'"

Replace blah blah blah with the big-ole-package name.

On Wed, Jul 22, 2009 at 3:23 PM, Nick Joyce <nick@...> wrote:
On 22 Jul 2009, at 19:13, Jesse Warden wrote:

Do y'all support inheritance?  What about composition?

Python inheritance is supported out of the box, however I haven't tried Django model inheritance.



I have a VO that's sort of like this:

package
{
[RemoteClass(alias="somedjango.app.Person")]
class PersonVO
{

   public var name:String;
   public var attack:AttackVO;

   public function PersonVO()
   {
   }
}
}

I can see it get submitted correctly through Charles, but the server throws a 500 and bitches about a missing Django logger.

All should be good - can you post the stacktrace?



The other question is, if both of those VO's map to inheritance tables, do those work in Django?  Like:

class Attack(models.Model)
   label = models.CharField(max_length=200)

class MeleeAttack(Attack)
   weapon = models.CharField(max_length=200)

Seems like that could be what's blowing up my serv-n0r; either y'all don't support inhertiance, or Python is getting made my object model doesn't translate right.  I copied how Joel was doing his with with the ArrayCollections mapping to ManyToMany's and the single's mapping to a ForeignKey.

If inheritance is not supported, then it is something that should be .. there is nothing in the test suite for that so I have created issue #629 [1] for that.


Still isolating things down, just making sure yall support the above.
_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

[1] - http://pyamf.org/ticket/626
_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users

_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users


_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users




_______________________________________________
PyAMF users mailing list - users@...
http://lists.pyamf.org/mailman/listinfo/users