Skip to content
Browse files

Fixed #11621 - don't copy .pyo and .py.class files from example app/p…


Thanks fwierzbicki, Steve Milner

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 4b82421 commit 95393aedc989882190d7f3f4c7afee8e4dc604d3 @spookylukey spookylukey committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 django/core/management/
4 django/core/management/
@@ -398,7 +398,9 @@ def copy_helper(style, app_or_project, name, directory, other_name=''):
if subdir.startswith('.'):
del subdirs[i]
for f in files:
- if f.endswith('.pyc'):
+ if not f.endswith('.py'):
+ # Ignore .pyc, .pyo, .py.class etc, as they cause various
+ # breakages.
path_old = os.path.join(d, f)
path_new = os.path.join(top_dir, relative_dir, f.replace('%s_name' % app_or_project, name))

0 comments on commit 95393ae

Please sign in to comment.
Something went wrong with that request. Please try again.