Huang Yen-Chieh
Huang Yen-Chieh

Reputation: 635

What is a proper way to initialize data store for static data in Google App Engine?

I have a model called "Category" in my app in GAE.

This model simply contains a name and it's parent category, and this won't be changed frequently after the website go online.

I'd like to know what is a better way to put these model instances in the beginning?

I now only know to execute (category.put()) in a webapp.RequestHandler by issuing a http request. But I suspect there is a proper way to do this.

Thanks!

Upvotes: 2

Views: 1517

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599778

You can use the remote API to connect to your datastore in a shell and add data as required.

Or, if it's a huge amount, you could think about using the bulk loader - but I suspect that the remote API will be more suitable.

Upvotes: 7

Related Questions