﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12653	add Meta option when working with multiple databases	Chris Curvey	nobody	"when working with multiple databases,  I'd like to see the database specifier as an option in the Meta section of models, so that you're not repeating your database names everywhere. For example:

in settings.py:


{{{
DATABASES = { 
  ""default"" : {""ENGINE"" : ""mysql""....},
  ""foo"" : {""ENGINE"" : ""postgres""...}
}
}}}


then in your model.py file, you would have:


{{{
class Bar(models.Model):
  class Meta:
     db_name = ""foo""
}}}


The existing ""using"" method works fine, especially if you are dealing with sharding, but if you're working with models that are just in different physical databases, then it would be nice to be able to specify the location in one place and not every time you do a query (.using(""foo"")) and every time you do a save ( .save(using=""foo""))

(This may exist somewhere and I just can't find it in the docs yet.  Django people are sometimes smart like that.)
"		closed	Database layer (models, ORM)	1.2-alpha		wontfix			Unreviewed	0	0	0	0	0	0
