On 1/14/07, Yasushi Masuda <[EMAIL PROTECTED]> wrote:

Adrian:

Thank you for comment.

I understood the policy not to creep the features, but let
me explain a bit about why I see benefit to have
proj_name/sql/app_name/obj_name.sql.

Just imagine we have an application comes with initial sql
data under the app directory. To customize app-provided initial
sql data, we must first install app with app-provided initial data,
then drop (a part or all of) them, and write and run some script(s)
to insert customized initial data.
If we have a hook to provide project-specific sql file (which
precedes any app-providing one as Django template does), the job
will become simple as just copying app-provided sql to project sql
directory, edit and install the app.

I should point out here that one of the goals of the Fixtures
framework (initial draft attached to ticket #2333) is to solve this
sort of problem. Using the fixtures framework, you can define initial
data sets in a database agnostic fashion (using a serialization format
like JSON or XML rather than SQL), and allow for multiple independent
fixture sets.

For example, you could have a 'US clients' fixture set, and an
'Australian Client' fixture set, which contains lists of instances of
User objects (from contrib.auth app), and some UserProfile objects (as
part of your application's models); when you sync, you could then
choose to install either or both of the either US Clients or AU
Clients data sets.

This hasn't been committed to the trunk yet, but the patches attached
to the ticket are probably pretty close to the final form; I'm hoping
to get some solid coding time in the near future to polish this
feature off. In the meantime, if you have any comments on the fixtures
framework as presented, they are most welcome.

Yours,
Russ Magee

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django 
developers" 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/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to