#5825: Customized actions for manage.py not working
----------------------------------------+-----------------------------------
   Reporter:  [EMAIL PROTECTED]      |                Owner:  nobody         
     Status:  new                       |            Component:  django-admin.py
    Version:  SVN                       |           Resolution:                 
   Keywords:  custom actions manage.py  |                Stage:  Unreviewed     
  Has_patch:  0                         |           Needs_docs:  0              
Needs_tests:  0                         |   Needs_better_patch:  0              
----------------------------------------+-----------------------------------
Changes (by [EMAIL PROTECTED]):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 In django.core.management.__init__.py in find_management_module function
 to define path to management module of each application (user app as well
 as django core) used function find_module from standard imp. Function
 find_module is called iterately on each part of application name with
 project name.
 If application is called "common", and project is called "holdem" then
 find_module first tries to import "holdem", then using it's path tries to
 import "common", then using it's path tries to import "management".
 Before first call of find_module path is set to None. This makes
 find_module to use "clean" sys.path on start. In that sys.path project
 dirname itself appears, but it's parent directory does not. Which is
 required to import user application  whose name is starts from project
 name.
 I added to my project settings.py lines

 {{{import os, sys
 sys.path.append(os.path.dirname(os.getcwd()))}}}

 This makes manage.py to see management commands added by user
 applications.
 I think that project parent directory appending have to be done by
 manage.py if that directory is not in sys.path.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5825#comment:1>
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