Django

Code

Changeset 5907

Show
Ignore:
Timestamp:
08/16/07 14:14:09 (1 year ago)
Author:
adrian
Message:

Fixed bug in django.core.management.base.copy_helper, related to refactoring in [5903]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/management/base.py

    r5903 r5907  
    6666        raise NotImplementedError() 
    6767 
    68  
    6968class AppCommand(BaseCommand): 
    7069    args = '[appname ...]' 
     
    8887        raise NotImplementedError() 
    8988 
    90  
    9189class LabelCommand(BaseCommand): 
    9290    args = '[label ...]' 
    9391    label = 'label' 
    94      
     92 
    9593    def handle(self, *labels, **options): 
    9694        if not labels: 
     
    107105        raise NotImplementedError() 
    108106 
    109  
    110107class NoArgsCommand(BaseCommand): 
    111108    args = '' 
     
    121118        raise NotImplementedError() 
    122119 
    123      
    124 def copy_helper(app_or_project, name, directory, other_name=''): 
     120def copy_helper(style, app_or_project, name, directory, other_name=''): 
    125121    import django 
    126122    import os 
     
    161157                shutil.copymode(path_old, path_new) 
    162158            except OSError: 
    163                 sys.stderr.write(self.style.NOTICE("Notice: Couldn't set permission bits on %s. You're probably using an uncommon filesystem setup. No problem.\n" % path_new)) 
     159                sys.stderr.write(style.NOTICE("Notice: Couldn't set permission bits on %s. You're probably using an uncommon filesystem setup. No problem.\n" % path_new)) 
  • django/trunk/django/core/management/commands/startapp.py

    r5903 r5907  
    2222        if app_name == project_name: 
    2323            raise CommandError("You cannot create an app with the same name (%r) as your project." % app_name) 
    24         copy_helper('app', app_name, directory, parent_dir) 
     24        copy_helper(self.style, 'app', app_name, directory, parent_dir) 
    2525 
    2626class ProjectCommand(Command): 
  • django/trunk/django/core/management/commands/startproject.py

    r5903 r5907  
    2424            raise CommandError("%r conflicts with the name of an existing Python module and cannot be used as a project name. Please try another name." % project_name) 
    2525 
    26         copy_helper('project', project_name, directory) 
     26        copy_helper(self.style, 'project', project_name, directory) 
    2727 
    2828        # Create a random SECRET_KEY hash, and put it in the main settings.