I'm trying to migrate a project from DB to NDB and found db._initialize_properties.
I searched a lot but couldn't find anything related to _initialize_properties. Not even in appengine documentation.
Also _initialize_properties is not a custom defined function in project.
Can someone please shed some light on this?
Code :
db._initialize_properties(
model_class, model_class.__name__, model_class.__bases__,
model_class.__dict__)
There's actually no NDB equivalent for that. _initialize_properties is actually a internal function of Appengine DB and can be found at google_appengine/google/appengine/ext/db/__init__.py
If you want to use _initialize_properties with NDB, you need to create a custom function in your project with that name and paste the function definition of _initialize_properties with modifications that would comply with NDB.
Related
I have used JasperReports in past Java projects in combination with iReport for building dynamic reports that run against a database, but I understand that Google App Engine does not support JasperReports. Can anyone point me to something similar, or a report generation mechanism that is compatible with GAE?
I'm not really sure if you made any progress on this ( if you did please let us know!)
As far as I know The GAE team has marked this issue as NO-FIX. My suggestion is to try:
1) PDF Jet + Jcharts , both are pure java and do not depend on any of the balcklisted classes. I've has some limited succes with this.
2) Using Managed VMs which are not limited as the standard sandbox.
3) Finnaly, using the Google Drive API to create your docs (using a service account) and then just provide the export URL for PDF.
To be honest I ended up doing #3, while being a little more complex in the long run i found some additional benefits of having my reports pre-built and hosted on Drive.
Hope it helps.
Is it possible to run a protorpc based service outside of GAE? I see that there is a project hosted at http://code.google.com/p/google-protorpc/ but it seems to depend on the GAE. The documentation is VERY vague on this point, does anyone have a clear answer?
Thanks!
Yes. The source code available at http://code.google.com/p/google-protorpc/source/browse/ includes all of the necessary libraries (minus protobufs itself, which you can download from the Google Developers site), and contains examples both for AppEngine and for a generic WSGI server.
The protorpc library itself is server-agnostic.
After messing around with this quite a bit, I have determined that ProtoRPC currently has dependencies on the google app engine. It is possible to rip the libraries you need out of the sdk, but you will have to change the protorpc source to not import from relative paths. All in all, it is not worth the hassle, either use the GAE, or don't use protorpc until it can stand on its own.
Thanks.
I'm trying to understand how to use Json-RPC calls in Google Go that would be used in a Google App Engine app. So far I understand that I somehow should call rpc.Client.Dial, but I don't understand what the "network" and "address" parameters should be. Can anyone provide a sample, working code that demonstrates how to use Json-RPC in Go?
I have already written an answer to your question on the go-nuts group, but for completeness, here it is:
Go's jsonrpc package isn't compatible with GAE yet.
Reference: https://groups.google.com/d/msg/google-appengine-go/uQ0cv0m9j0E/H3VCrFgEWvcJ
It's probably a good idea to read the full thread there, since it describes the limitations on GAE nicely and links to a patched library with lots of workarounds... The issue is already known, but has not been solved yet.
I have been developing an app using appengine. We are likely to be storing a lot of records in the datastore but I find the admin functionality you are given to manage this data lacking.
As an example, there are no good ways to bulk delete a bunch of data - you have to write a class of your own to do this.
Before I start down the path of building the admin ui and features I need to manage the datastore entities, I was wondering if anyone knows of a good 3rd party tool that's already been written to do this for me? Something that has basic CRUD functionality plus bulk import and bulk export features.
I am using the Python SDK.
You haven't specified whether you're using the Java or Python SDK, but if you're using Java App Engine, I suggest using the Objectify framework to interact with the datastore rather than the standard JDO/JPA method. It's much nicer.
does anyone know how to handle a "one to many" relationship with Grails/GORM on the google appengine?
I do understand how relationships get handled with Gorm, and there is also a good series of articles about it:
http://blog.springsource.com/2010/06/23/gorm-gotchas-part-1/
http://blog.springsource.com/2010/07/02/gorm-gotchas-part-2/
http://blog.springsource.com/2010/07/28/gorm-gotchas-part-3/
But I could not find any examples about releastionships within the appengine and JPA.
Have you tried Gaelyk? Its a pretty good framework for running groovy on google app engine. The following link goes over the datasource with groovy on GAE: http://gaelyk.appspot.com/tutorial/app-engine-shortcuts#datastore
I haven't tried it, but as far as I've read, you have to use JPA annotations. See here: http://blogs.oracle.com/enterprisetechtips/entry/combining_groovy_grails_mysql_and