DavidA wrote:
> improve it a bit:
> 
> 1) In addition to providing initial data in a file
> <appname>/sql/<modelname>.sql, I think it would be good to support a
> form of <appname>/sql/<backend>/<modelname>.sql so if you want to put
> DB-specific stuff in there you can. That way if I moved my app to
> PostgreSQL, for example, it wouldn't try to execute the SQL (which
> would break)

You already have that, just is undocumented ;)

You can have <appname>/sql/<modelname>.<backend>.sql which will be executed 
only for the given backend (i.e.
test.sqlite3.sql, test.mysql.sql, test.pgsql.sql).

See 
http://code.djangoproject.com/browser/django/trunk/django/core/management.py#L342

-- 
Nebojša Đorđević - nesh
Studio Quattro - Niš - SCG
http://studioquattro.biz/
http://djnesh.blogspot.com/  |  http://djnesh-django.blogspot.com/ |  
http://trac.studioquattro.biz/djangoutils/
Registered Linux User 282159 [http://counter.li.org]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to