On Thu, Apr 8, 2010 at 2:56 PM, Dagvadorj Galbadrakh
<dagvad...@gmail.com> wrote:
> Good idea. Let INSTALLED_APPS be iterable, and let Django deployment
> do its job based on the configuration. Little to say though:
>
> INSTALLED_APPS = (
>    'django.contrib.auth',
>    'django.contrib.contenttypes',
>    'django.contrib.sessions',
>    'django.contrib.sites',
>    'django.contrib.admin',
>    'foo.gsoc',
>    ('foo.gsoc', 'taiwan', {'verbose_name': _('GSoC'), \
>                          'lang': 'zh-TW', \
>                          'name': 'gsoc_tw', \
>                          'db_prefix': 'gsoctw_', \
>                          'skin': 'orient'}),
> )
>
> So that app-level configuration would have been satisfied:
> Internationalization of the app name in admin, differentiated db
> prefices, default highlighting language for the app, etc.
>
> Every existence of an app will be defined as namespace URL in the
> code, thus no app with duplicate name. For instance: 'foo.gsoc' is
> named 'foo.gsoc' and models are accessed as 'from foo.gsoc.models
> import Idea', while '('foo.gsoc', 'taiwan', ..)' would be named as
> 'foo.gsoc.taiwan' if 'name' in dict is not existent, and like
> 'gsoc_tw' if 'name' attribute exists. Maybe 'name' and 'db_prefix'
> would be associated.

May I have few questions.
1) And what if foo.gsoc has taiwan submodule already?
2) How will module know what name(s) it has got?
3) How will different application names to be referenced from outside?
3) How will different application names to be loaded from outside?

I believe, the only way is to have a module for each application copy.

so you've got:
conf/gsoc.py

class App():
    option1 = 'value1'
    modules = 'apps.gsoc'
    etc.

conf/taiwan.py:

import gsoc
class App(gsoc.App):
    option1 = override

-- 
Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov,
MSN: bu...@live.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to