From d75fde94a736a4df6a068289d2204c4cd0497613 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 15 Jul 2005 22:24:51 +0000 Subject: [PATCH] Changed django-admin startproject so that it doesn't copy .pyc files git-svn-id: http://code.djangoproject.com/svn/django/trunk@79 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/bin/django-admin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/bin/django-admin.py b/django/bin/django-admin.py index 3bf3501d186..b6ed7d2095e 100644 --- a/django/bin/django-admin.py +++ b/django/bin/django-admin.py @@ -318,6 +318,8 @@ def _start_helper(app_or_project, name, directory, other_name=''): if subdir.startswith('.'): del subdirs[i] for f in files: + if f.endswith('.pyc'): + continue fp_old = open(os.path.join(d, f), 'r') fp_new = open(os.path.join(top_dir, relative_dir, f.replace('%s_name' % app_or_project, name)), 'w') fp_new.write(fp_old.read().replace('{{ %s_name }}' % app_or_project, name).replace('{{ %s_name }}' % other, other_name))