Hi all,

I've been playing around this the branch on github for a while now,
but unfortunately me knowledge of Django's internals only goes so far
with regards to getting multiple instance support working fully,
particularly around how models work. I've got to the point where you
can now instantiate multiple copies of apps with distinct labels, and
these are registered in the cache:
https://github.com/cnorthwood/django/commit/52016c83b8794616b57c2296d23fb56e29a451a9

At present, this only registers one set of models and doesn't consider
the custom app_label

There are a few unanswered questions too:

* how would directly accessing a model work in a multi-instance
scenario? i.e., MyModel.objects.all() vs. get_model('my_app_instance',
'MyModel').objects.all()
* how would a view know which instance of an app it's supposed to be
responding to? One way may be to have the routing add an attribute to
the request object giving information about which app this set of URLs
belong to, i.e., put include(get_app('my_instance').urls) or similar
in the urlconf, and then when the view is called, it could perhaps
access the app object using request.app, or similar?

Thoughts?

Chris

-- 
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