mirror of https://github.com/django/django.git
Fixed #2956 -- Made 'django-admin.py startproject' tolerant of filesystem arrangements that cannot accept file-permission changes. Thanks for the patch, masonsimon+django@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
8211eb23e4
commit
4baeadb9a2
1
AUTHORS
1
AUTHORS
|
@ -112,6 +112,7 @@ answer newbie questions, and generally made Django that much better:
|
||||||
limodou
|
limodou
|
||||||
mattmcc
|
mattmcc
|
||||||
Martin Maney <http://www.chipy.org/Martin_Maney>
|
Martin Maney <http://www.chipy.org/Martin_Maney>
|
||||||
|
masonsimon+django@gmail.com
|
||||||
Manuzhai
|
Manuzhai
|
||||||
Petar Marić
|
Petar Marić
|
||||||
mark@junklight.com
|
mark@junklight.com
|
||||||
|
|
|
@ -32,6 +32,7 @@ class dummy: pass
|
||||||
style = dummy()
|
style = dummy()
|
||||||
style.ERROR = termcolors.make_style(fg='red', opts=('bold',))
|
style.ERROR = termcolors.make_style(fg='red', opts=('bold',))
|
||||||
style.ERROR_OUTPUT = termcolors.make_style(fg='red', opts=('bold',))
|
style.ERROR_OUTPUT = termcolors.make_style(fg='red', opts=('bold',))
|
||||||
|
style.NOTICE = termcolors.make_style(fg='red')
|
||||||
style.SQL_FIELD = termcolors.make_style(fg='green', opts=('bold',))
|
style.SQL_FIELD = termcolors.make_style(fg='green', opts=('bold',))
|
||||||
style.SQL_COLTYPE = termcolors.make_style(fg='green')
|
style.SQL_COLTYPE = termcolors.make_style(fg='green')
|
||||||
style.SQL_KEYWORD = termcolors.make_style(fg='yellow')
|
style.SQL_KEYWORD = termcolors.make_style(fg='yellow')
|
||||||
|
@ -696,7 +697,10 @@ def _start_helper(app_or_project, name, directory, other_name=''):
|
||||||
fp_new.write(fp_old.read().replace('{{ %s_name }}' % app_or_project, name).replace('{{ %s_name }}' % other, other_name))
|
fp_new.write(fp_old.read().replace('{{ %s_name }}' % app_or_project, name).replace('{{ %s_name }}' % other, other_name))
|
||||||
fp_old.close()
|
fp_old.close()
|
||||||
fp_new.close()
|
fp_new.close()
|
||||||
|
try:
|
||||||
shutil.copymode(path_old, path_new)
|
shutil.copymode(path_old, path_new)
|
||||||
|
except OSError:
|
||||||
|
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))
|
||||||
|
|
||||||
def startproject(project_name, directory):
|
def startproject(project_name, directory):
|
||||||
"Creates a Django project for the given project_name in the given directory."
|
"Creates a Django project for the given project_name in the given directory."
|
||||||
|
|
Loading…
Reference in New Issue