summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-28 11:04:13 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-28 11:04:13 +0000
commit1e8d1c808bf027be1c26329dc8695daa44cea293 (patch)
tree19f6af86e8edcddf137b7ee73b63e0b6f59f3493 /tests
parent087bf45d9379a0a898861712854d9bf48a886b40 (diff)
unicode: Fixed a problem when models had non-ASCII bytestrings for their
verbose_name. git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/basic/models.py1
-rw-r--r--tests/regressiontests/model_regress/__init__.py0
-rw-r--r--tests/regressiontests/model_regress/models.py16
3 files changed, 17 insertions, 0 deletions
diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py
index bac3f1c2e4..90e5d1755c 100644
--- a/tests/modeltests/basic/models.py
+++ b/tests/modeltests/basic/models.py
@@ -1,3 +1,4 @@
+# coding: utf-8
"""
1. Bare-bones model
diff --git a/tests/regressiontests/model_regress/__init__.py b/tests/regressiontests/model_regress/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/regressiontests/model_regress/__init__.py
diff --git a/tests/regressiontests/model_regress/models.py b/tests/regressiontests/model_regress/models.py
new file mode 100644
index 0000000000..8b43c1c3e1
--- /dev/null
+++ b/tests/regressiontests/model_regress/models.py
@@ -0,0 +1,16 @@
+# coding: utf-8
+from django.db import models
+
+class Article(models.Model):
+ headline = models.CharField(maxlength=100, default='Default headline')
+ pub_date = models.DateTimeField()
+
+ class Meta:
+ ordering = ('pub_date','headline')
+ # A utf-8 verbose name (Ångström's Articles) to test they are valid.
+ verbose_name = "\xc3\x85ngstr\xc3\xb6m's Articles"
+
+ def __unicode__(self):
+ return self.headline
+
+__test__ = {'API_TESTS': "" }