Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

magic-removal: Merged to [2356]

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 6c9e2bc3f18f3fd12cdcc768969362e1a8f66966 1 parent 9cb04f5
Adrian Holovaty authored
2  django/bin/compile-messages.py
... ...
@@ -1,4 +1,4 @@
1  
-#!/usr/bin/python
  1
+#!/usr/bin/env python
2 2
 
3 3
 import os
4 4
 import sys
2  django/bin/make-messages.py
... ...
@@ -1,4 +1,4 @@
1  
-#!/usr/bin/python
  1
+#!/usr/bin/env python
2 2
 
3 3
 from django.utils.translation import templatize
4 4
 import re
2  django/bin/unique-messages.py
... ...
@@ -1,4 +1,4 @@
1  
-#!/usr/bin/python
  1
+#!/usr/bin/env python
2 2
 
3 3
 import os
4 4
 import sys
4  django/core/management.py
@@ -805,6 +805,10 @@ def table2model(table_name):
805 805
                 if field_type == 'CharField' and row[3]:
806 806
                     extra_params['maxlength'] = row[3]
807 807
 
  808
+                if field_type == 'FloatField':
  809
+                    extra_params['max_digits'] = row[4]
  810
+                    extra_params['decimal_places'] = row[5]
  811
+
808 812
                 # Add primary_key and unique, if necessary.
809 813
                 column_name = extra_params.get('db_column', att_name)
810 814
                 if column_name in indexes:
4  django/core/validators.py
@@ -16,7 +16,7 @@
16 16
 _datere = r'(19|2\d)\d{2}-((?:0?[1-9])|(?:1[0-2]))-((?:0?[1-9])|(?:[12][0-9])|(?:3[0-1]))'
17 17
 _timere = r'(?:[01]?[0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?'
18 18
 alnum_re = re.compile(r'^\w+$')
19  
-alnumurl_re = re.compile(r'^[\w/]+$')
  19
+alnumurl_re = re.compile(r'^[-\w/]+$')
20 20
 ansi_date_re = re.compile('^%s$' % _datere)
21 21
 ansi_time_re = re.compile('^%s$' % _timere)
22 22
 ansi_datetime_re = re.compile('^%s %s$' % (_datere, _timere))
@@ -62,7 +62,7 @@ def isAlphaNumeric(field_data, all_data):
62 62
 
63 63
 def isAlphaNumericURL(field_data, all_data):
64 64
     if not alnumurl_re.search(field_data):
65  
-        raise ValidationError, gettext("This value must contain only letters, numbers, underscores and slashes.")
  65
+        raise ValidationError, gettext("This value must contain only letters, numbers, underscores, dashes or slashes.")
66 66
 
67 67
 def isSlug(field_data, all_data):
68 68
     if not slug_re.search(field_data):

0 notes on commit 6c9e2bc

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