Thank you. I see the problem now.

What about this?

INSTALLED_APPS = (
    'django.contrib.sessions',
    ('comments', 'django.contrib.comments'),
    (gallery, App(path='my_gallery', db_prefix='new_gallery',
verbose_name=u'My new gallery')),
    ...
)


2011/1/3 Łukasz Rekucki <lreku...@gmail.com>

> On 2 January 2011 19:27, Alex Kamedov <kame...@gmail.com> wrote:
> >
> > 2011/1/2 Łukasz Rekucki <lreku...@gmail.com>
> >>
> >> What about application order? It's important in some parts of Django,
> >> like template loading order.
> >
> > Can you describe this problem with more details?
> > Usualy each applications has own path for its templates.
>
> Yes, but sometimes you want to override a template from another
> application, like grapelli[1]. The AppDir template loader searches in
> order of installed applications. By putting grapelli in front of
> contrib.auth, you're able to override the original admin templates.
>
> >>
> >> > For backward compatibility it checks on setting load stage and convert
> >> > to
> >> > dictionary if it need.
> >> > INSTALLED_APPS will be low level API to install applications.
> >>
> >> There is another aspect of backwards-compatibility: there are many 3rd
> >> party tools that assume INSTALLED_APPS to be a tuple with application
> >> names, so changing it to a dictionary will break them.
> >
> > I've say it's no hard to provide interface like dict and compatible with
> > tuple.
> > I show only proposed syntax.
> >>
> >> Same problem as above, keyword arguments have no order.
> >
> > Can you share pruf link or provide more details of described problem?
>
> I'm not sure I know what you mean by "pruf link". If you provide
> keyword arguments to a function, you have no way of telling in which
> order they were provided, because all you get is a dictionary (which
> has no meaningful order):
>
> >>> def a(**kwargs):
> ...   print kwargs
> ...
> >>> a(a=1, b=2, c=3)
> {'a': 1, 'c': 3, 'b': 2}
>
> So you can't use that syntax and keep ordering. If the template
> example doesn't convince you, take a look at the "syncdb" command. You
> need a way to specify in which order in which custom SQL or fixtures
> are loaded from each application. I don't see a one with a dictionary
> or keyword arguments.
>
> [1]: http://code.google.com/p/django-grappelli/wiki/Installation
>
>
> --
> Łukasz Rekucki
>
> --
> 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<django-developers%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>
>


-- 
skype: kamedov
www: kamedov.ru

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