Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #12980 - Use raw strings for locale formats which contain singl…

…e backslahes. Thanks for report and patch, Martin von Löwis and Ramiro Morales.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 413ae251acba11cafd643086d5cd75d1eb021d01 1 parent 5f7732d
Jannis Leidel authored
8  django/conf/locale/ca/formats.py
@@ -2,11 +2,11 @@
2 2
 # This file is distributed under the same license as the Django package.
3 3
 #
4 4
 
5  
-DATE_FORMAT = 'j \de F \de Y'
  5
+DATE_FORMAT = r'j \de F \de Y'
6 6
 TIME_FORMAT = 'G:i:s'
7  
-DATETIME_FORMAT = 'j \de F \de Y \\a \le\s G:i'
8  
-YEAR_MONTH_FORMAT = 'F \de\l Y'
9  
-MONTH_DAY_FORMAT = 'j \de F'
  7
+DATETIME_FORMAT = r'j \de F \de Y \a \le\s G:i'
  8
+YEAR_MONTH_FORMAT = r'F \de\l Y'
  9
+MONTH_DAY_FORMAT = r'j \de F'
10 10
 SHORT_DATE_FORMAT = 'd/m/Y'
11 11
 SHORT_DATETIME_FORMAT = 'd/m/Y G:i'
12 12
 FIRST_DAY_OF_WEEK = 1 # Monday
8  django/conf/locale/es/formats.py
@@ -2,11 +2,11 @@
2 2
 # This file is distributed under the same license as the Django package.
3 3
 #
4 4
 
5  
-DATE_FORMAT = 'j \de F \de Y'
  5
+DATE_FORMAT = r'j \de F \de Y'
6 6
 TIME_FORMAT = 'H:i:s'
7  
-DATETIME_FORMAT = 'j \de F \de Y \a \l\a\s H:i'
8  
-YEAR_MONTH_FORMAT = 'F \de Y'
9  
-MONTH_DAY_FORMAT = 'j \de F'
  7
+DATETIME_FORMAT = r'j \de F \de Y \a \l\a\s H:i'
  8
+YEAR_MONTH_FORMAT = r'F \de Y'
  9
+MONTH_DAY_FORMAT = r'j \de F'
10 10
 SHORT_DATE_FORMAT = 'd/m/Y'
11 11
 SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
12 12
 FIRST_DAY_OF_WEEK = 1 # Monday
2  django/conf/locale/eu/formats.py
@@ -2,7 +2,7 @@
2 2
 # This file is distributed under the same license as the Django package.
3 3
 #
4 4
 
5  
-DATE_FORMAT = 'Yeko M\re\n d\a'
  5
+DATE_FORMAT = r'Yeko M\re\n d\a'
6 6
 TIME_FORMAT = 'H:i:s'
7 7
 # DATETIME_FORMAT = 
8 8
 # YEAR_MONTH_FORMAT = 
2  django/conf/locale/lt/formats.py
@@ -2,7 +2,7 @@
2 2
 # This file is distributed under the same license as the Django package.
3 3
 #
4 4
 
5  
-DATE_FORMAT = 'Y \m. F j \d.'
  5
+DATE_FORMAT = r'Y \m. F j \d.'
6 6
 TIME_FORMAT = 'H:i:s'
7 7
 # DATETIME_FORMAT = 
8 8
 # YEAR_MONTH_FORMAT = 
6  django/conf/locale/lv/formats.py
@@ -2,12 +2,12 @@
2 2
 # This file is distributed under the same license as the Django package.
3 3
 #
4 4
 
5  
-DATE_FORMAT = 'Y. \g\a\d\a j. F'
  5
+DATE_FORMAT = r'Y. \g\a\d\a j. F'
6 6
 TIME_FORMAT = 'H:i:s'
7 7
 # DATETIME_FORMAT = 
8  
-YEAR_MONTH_FORMAT = 'Y. \g. F'
  8
+YEAR_MONTH_FORMAT = r'Y. \g. F'
9 9
 MONTH_DAY_FORMAT = 'j. F'
10  
-SHORT_DATE_FORMAT = 'Y. \g\a\d\a j. M'
  10
+SHORT_DATE_FORMAT = r'Y. \g\a\d\a j. M'
11 11
 # SHORT_DATETIME_FORMAT = 
12 12
 # FIRST_DAY_OF_WEEK = 
13 13
 # DATE_INPUT_FORMATS = 
6  django/conf/locale/pt/formats.py
@@ -2,11 +2,11 @@
2 2
 # This file is distributed under the same license as the Django package.
3 3
 #
4 4
 
5  
-DATE_FORMAT = 'j \de F \de Y'
  5
+DATE_FORMAT = r'j \de F \de Y'
6 6
 TIME_FORMAT = 'H:i:s'
7 7
 # DATETIME_FORMAT = 
8  
-YEAR_MONTH_FORMAT = 'F \de Y'
9  
-MONTH_DAY_FORMAT = 'j \de F'
  8
+YEAR_MONTH_FORMAT = r'F \de Y'
  9
+MONTH_DAY_FORMAT = r'j \de F'
10 10
 SHORT_DATE_FORMAT = 'd/m/Y'
11 11
 # SHORT_DATETIME_FORMAT = 
12 12
 # FIRST_DAY_OF_WEEK = 
4  django/conf/locale/vi/formats.py
@@ -2,9 +2,9 @@
2 2
 # This file is distributed under the same license as the Django package.
3 3
 #
4 4
 
5  
-DATE_FORMAT = '\N\gà\y d \t\há\n\g n \nă\m Y'
  5
+DATE_FORMAT = r'\N\gà\y d \t\há\n\g n \nă\m Y'
6 6
 TIME_FORMAT = 'H:i:s'
7  
-DATETIME_FORMAT = 'H:i:s \N\gà\y d \t\há\n\g n \nă\m Y'
  7
+DATETIME_FORMAT = r'H:i:s \N\gà\y d \t\há\n\g n \nă\m Y'
8 8
 YEAR_MONTH_FORMAT = 'F Y'
9 9
 MONTH_DAY_FORMAT = 'j F'
10 10
 SHORT_DATE_FORMAT = 'd-m-Y'

0 notes on commit 413ae25

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