Hey Kenny,

I was a little confused what meant by 'Data Preload script', but i
think i am clear now :-)

Basically, you want to create dynamic stuff (forms, in our case) with
as little typing and as high flexibility as possible.

1. use templates
http://code.google.com/appengine/docs/python/gettingstarted/templates.html

2. use django form (validation) framework
http://code.google.com/appengine/articles/djangoforms.html

I hope these two urls are good enough to solve your problem.

Revert back, for more clarifications :)

--
Pranav Prakash

"This life is more than ordinary"

http://codecontrol.blogspot.com

On Jun 9, 3:55 am, KennyCarlile <[email protected]> wrote:
> I'm pretty new to GAE, but I've searched around and have been unable
> to find a solution to this problem, although it's quite possible that
> I didn't ask the right question when searching. :o)
>
> When creating an application in PHP/MySQL, I would often write SQL
> scripts to create the DB and permissions, create tables/stored procs/
> views, and then a script to prepopulate data, such as config values,
> types, dropdown lists, etc. It's that last script I'm curious about.
>
> So say, for example, that I have a dropdown with usertype (for
> creating new users) but I don't want that value hardcoded in the
> template. I have values for "admin", "editor", and "contributor". (For
> the sake of the argument, please disregard that this might be a bad
> example.) Normally, I'd have a table called UserTypes and I'd create a
> script to insert 3 values into that table.
>
> Here's the question: how would I do that in GAE? Remember, this
> presumes that I don't want the values hardcoded in Python (in
> handlers), HTML, and I don't want to have to create a form to enter
> all these by hand.
>
> The only solution that I've come up with is to have an admin-section
> page that preloads the database by first wiping the data from the
> types that I want to load and then by manually creating 3 Python
> objects and writing those to the DB. So in this case, I'm basically
> using Python for my data preload script. This isn't how I want to do
> this. I'd really like to just be able to have a script file with SQL
> (err...GQL) to preload data into the datastore. Any thoughts on how I
> could do this?
>
> Thanks for any help that anyone can offer.
>
> Kenny
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to