#19401: 'swapped' checking does not account for case insensitivity -------------------------------------+------------------------------------- Reporter: chris@… | Owner: nobody Type: Bug | Status: reopened Component: Database layer | Version: (models, ORM) | 1.5-beta-1 Severity: Release blocker | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by ptone):
* severity: Normal => Release blocker * stage: Unreviewed => Accepted Comment: OK - so setting AUTH_USER_MODEL='auth.user' is something that should be handled better - auth.User should not think it is swapped with 'auth.user' The appname.model is established as a convention for Django - swapped models furthers that (for better or worse), and has the flaw in being easily confused with a python path. Because get_model has always used lowercase, it seems that we should just say that the Django specific "appname.modelname" convention is case insensitive. Which could make the solution as simple as: https://github.com/django/django/blob/7eba5fbc027face8dd33475148d442655a92cecd/django/db/models/options.py#L220 {{{ if swapped_for.lower() not in (None, model_label.lower()):}}} supporting case sensitive module names is against PEP-8, and unless you get tricky about where modules are on your path, not even possible for systems that don't have case-sensitive FS. -- Ticket URL: <https://code.djangoproject.com/ticket/19401#comment:6> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.