Thanks for those explanations.

I think I get it. If I add that class method to all of my model classes, my
models.py will then be able to be used across AEP and webapp?


2010/1/8 Paweł H <[email protected]>

> Simple example. It always returns kind in GAE style.
>
> class YourModel(db.Model):
>
>     @classmethod
>     def kind(cls):
>         module_name = cls.__name__.lower()
>         return '%s_%s' % ('app_name', module_name)
>
> 2010/1/7 Nickolas Daskalou <[email protected]>
>
>> I'm not too sure what that means, can you please elaborate a little?
>>
>>
>> On 08/01/2010, at 12:17 AM, Paweł H <[email protected]> wrote:
>>
>> There is a little problem, because GAE add prefix to model kind name
>> (appname_modelname). It can be fixed by overriding kind method.
>>
>> 2010/1/7 Nickolas Daskalou < <[email protected]>[email protected]>
>>
>>> I've managed to use AEP and webapp on the same GAE application by
>>> filtering based on the HTTP host, as described here:
>>> <http://groups.google.com/group/google-appengine/browse_thread/thread/44d2d67cb1f4f735>
>>> http://groups.google.com/group/google-appengine/browse_thread/thread/44d2d67cb1f4f735
>>>
>>> I have not yet tried sharing models between the two (eg. having one
>>> models.py file that both webapp and AEP import and use).
>>>
>>> Anyone have any tips on the "best" way to do this?
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "app-engine-patch" group.
>>> To post to this group, send email to <[email protected]>
>>> [email protected].
>>> To unsubscribe from this group, send email to
>>> <app-engine-patch%[email protected]>
>>> [email protected].
>>> For more options, visit this group at
>>> <http://groups.google.com/group/app-engine-patch?hl=en>
>>> http://groups.google.com/group/app-engine-patch?hl=en.
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "app-engine-patch" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/app-engine-patch?hl=en.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "app-engine-patch" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<app-engine-patch%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/app-engine-patch?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "app-engine-patch" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<app-engine-patch%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/app-engine-patch?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "app-engine-patch" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/app-engine-patch?hl=en.

Reply via email to