#18091: Non-ASCII templates break `django-admin.py startproject
--template=TEMPLATE`
-------------------------------------+-------------------------------------
     Reporter:  akaihola             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core (Management     |                  Version:  master
  commands)                          |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by apollo13):

 The patch in the current form causes the following test failures for me:
 {{{
 florian@apollo13:~/sources/django.git/tests$ PYTHONPATH=.. ./runtests.py
 --settings=test_sqlite admin_scripts
 Creating test database for alias 'default'...
 Creating test database for alias 'other'...
 
.....................................................................................................................................FF......F...F.
 ======================================================================
 FAIL: test_custom_project_template
 (regressiontests.admin_scripts.tests.StartProject)
 Make sure the startproject management command is able to use a different
 project template
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 
"/home/florian/sources/django.git/tests/regressiontests/admin_scripts/tests.py",
 line 1444, in test_custom_project_template
     self.assertNoOutput(err)
   File
 
"/home/florian/sources/django.git/tests/regressiontests/admin_scripts/tests.py",
 line 159, in assertNoOutput
     self.assertEqual(len(stream), 0, "Stream should be empty: actually
 contains '%s'" % stream)
 AssertionError: Stream should be empty: actually contains
 'UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 47:
 ordinal not in range(128)
 '

 ======================================================================
 FAIL: test_custom_project_template_context_variables
 (regressiontests.admin_scripts.tests.StartProject)
 Make sure template context variables are rendered with proper values
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 
"/home/florian/sources/django.git/tests/regressiontests/admin_scripts/tests.py",
 line 1537, in test_custom_project_template_context_variables
     self.assertNoOutput(err)
   File
 
"/home/florian/sources/django.git/tests/regressiontests/admin_scripts/tests.py",
 line 159, in assertNoOutput
     self.assertEqual(len(stream), 0, "Stream should be empty: actually
 contains '%s'" % stream)
 AssertionError: Stream should be empty: actually contains
 'UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 47:
 ordinal not in range(128)
 '

 ======================================================================
 FAIL: test_no_escaping_of_project_variables
 (regressiontests.admin_scripts.tests.StartProject)
 Make sure template context variables are not html escaped
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 
"/home/florian/sources/django.git/tests/regressiontests/admin_scripts/tests.py",
 line 1554, in test_no_escaping_of_project_variables
     self.assertNoOutput(err)
   File
 
"/home/florian/sources/django.git/tests/regressiontests/admin_scripts/tests.py",
 line 159, in assertNoOutput
     self.assertEqual(len(stream), 0, "Stream should be empty: actually
 contains '%s'" % stream)
 AssertionError: Stream should be empty: actually contains
 'UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 47:
 ordinal not in range(128)
 '

 ======================================================================
 FAIL: test_template_dir_with_trailing_slash
 (regressiontests.admin_scripts.tests.StartProject)
 Ticket 17475: Template dir passed has a trailing path separator
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 
"/home/florian/sources/django.git/tests/regressiontests/admin_scripts/tests.py",
 line 1456, in test_template_dir_with_trailing_slash
     self.assertNoOutput(err)
   File
 
"/home/florian/sources/django.git/tests/regressiontests/admin_scripts/tests.py",
 line 159, in assertNoOutput
     self.assertEqual(len(stream), 0, "Stream should be empty: actually
 contains '%s'" % stream)
 AssertionError: Stream should be empty: actually contains
 'UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 47:
 ordinal not in range(128)
 '

 ----------------------------------------------------------------------
 Ran 147 tests in 22.055s

 FAILED (failures=4)
 Destroying test database for alias 'default'...
 Destroying test database for alias 'other'...
 }}}

 Please reopen a pull request once those are fixed, Thx!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18091#comment:5>
Django <https://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 https://groups.google.com/groups/opt_out.


Reply via email to