On Dec 5, 5:55 pm, "Jacob Kaplan-Moss" <[EMAIL PROTECTED]>
wrote:
> Howdy folks --
>
> I just had a nasty realization here at work: we're gonna need to fix
> app_label pretty damn quick. The good news is that this means we'll
> get to fix this problem on work time; the bad news is that I'm totally
> unsure how to start.
>
> For those who haven't been following along, the main problem is that
> app_label must be unique across all installed apps, so you can't have,
> say, an "ellington.search" and a "marketplace.search" app -- both
> would be known by Django as "search", and Django would get all
> confused.
>
> http://code.djangoproject.com/ticket/3591has been following this
> problem (and the other, related ones). The patches there look
> relatively good and the tests appear to pass, but I'm concerned about
> the level of boat-rocking this patch introduces (it basically redoes
> the entire app/model loading mechanism in the process).

The change in django/db/models/loading.py is of similar magnitude to
the change that was made when AppCache was introduced - it also
revamped the app/model loading machinery to a similar extent. And the
tests do all pass, so unless we feel that the tests need beefing up,
there shouldn't be a lack of confidence in the patch from a TDD
viewpoint.

> I know that at least a couple other committers -- Malcolm, Joseph --
> have looked at this in the past, as have a number of developer
> community members.
>
> So what I'm looking for here is some insight from folks that have
> already looked at this ticket. What are the with the current patch?
> Are there simpler ways? What types of breakage should I be looking
> for? Is there anything out on one of the branches that I'm going to
> fubar if I start working on this?
>

If there is a simpler solution, I would surely welcome it. In terms of
breakage, the big change is that INSTALLED_APPS now can contain both
strings and app instances, so existing code which iterates over
settings.INSTALLED_APPS should now iterate over the list returned by
get_installed_app_paths(). Given that the number of places this
iteration happens in Django itself was the cause of most of the edits
in the patch, I would guess that in other code, the same sort of
changes might need to be made.

Best regards,

Vinay Sajip
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
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