#3591: add support for custom app_label and verbose_name
---------------------------+------------------------------------------------
   Reporter:  jkocherhans  |                Owner:  adrian                
     Status:  assigned     |            Component:  Core framework        
    Version:  SVN          |           Resolution:                        
   Keywords:               |                Stage:  Design decision needed
  Has_patch:  1            |           Needs_docs:  0                     
Needs_tests:  0            |   Needs_better_patch:  0                     
---------------------------+------------------------------------------------
Comment (by Vinay Sajip <[EMAIL PROTECTED]>):

 Replying to [comment:24 brosner]:
 > However, I do have a question why ```get_installed_app_paths``` exists?
 Why can't it be done in ```__init__``` of ```Settings``` when it expands
 out ```.*``` app paths?  That way there isn't a need to change all
 instances of ```settings.INSTALLED_APPS```.  Making this completely
 backward compatible.

 I had another look at the get_installed_app_paths vs. INSTALLED_APPS
 issue. With my patch, INSTALLED_APPS can contain either package names
 (explicit or wild-card) or app instances. However, get_installed_app_paths
 always returns a set of strings - the package paths of the applications.
 This is used, as you've seen, in a lot of places. If a user puts an app
 instance into INSTALLED_APPS, I'm not sure they'd take kindly to having it
 automatically replaced with the corresponding path string. So,
 get_installed_app_paths insulates the rest of the code from having to know
 whether the INSTALLED_APPS entries are path strings or app instances. It
 seems to me that some kind of encapsulation '''will''' be needed - and
 get_installed_app_paths performs this function. I would like to be able to
 use INSTALLED_APPS and do away with get_installed_app_paths - but I'm not
 quite sure how, yet. If you provide a patch which sorts out this issue,
 I'll happy incorporate it, as I mentioned.

 In your testing, did you have any app instances in your INSTALLED_APPS?
 I'd be interested in seeing what your INSTALLED_APPS looks like. From a
 quick inspection of your patch, I would expect some tests to fail if
 INSTALLED_APPS contained any app instances, because in some places where
 framework code expects a string, it would get an app instance.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3591#comment:26>
Django Code <http://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 [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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to