On 1/11/07, Nicola Larosa (tekNico) <[EMAIL PROTECTED]> wrote:
>
> Every middle-to-big project has its own version, and Django is no
> exception, look in django.utils.datastructures.

I have a patch ready to go for named backends, and it uses
django.utils.datastructures.SortedDict from django purely for
convenice sake, but it seems like bad form to me to import it in a
settings file, so I'm just lazily converting the tuple of tuples into
a SortedDict and loading the backends into that structure. It's more
of an aesthetic issue than a technical one to me.

from django.utils.datastructures import SortedDict

AUTHENTICATION_BACKENDS = SortedDict()
AUTHENTICATION_BACKENDS['default'] = 'django.contrib.auth.backends.ModelBackend'
AUTHENTICATION_BACKENDS['ldap'] = 'mypkg.backends.LDAPBackend'

I'm sort of ok with that in source code, but in configuration code? Yuck. ;)

Joseph

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