Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ticket #17804 fix.

  • Loading branch information...
commit fbb73894395b728ec96c661da6f87523718c5398 1 parent 085c03e
@bohyn bohyn authored
View
2  django/contrib/admin/options.py
@@ -49,7 +49,7 @@ class IncorrectLookupParameters(Exception):
models.TextField: {'widget': widgets.AdminTextareaWidget},
models.URLField: {'widget': widgets.AdminURLFieldWidget},
models.IntegerField: {'widget': widgets.AdminIntegerFieldWidget},
- models.BigIntegerField: {'widget': widgets.AdminIntegerFieldWidget},
+ models.BigIntegerField: {'widget': widgets.AdminBigIntegerFieldWidget},
models.CharField: {'widget': widgets.AdminTextInputWidget},
models.ImageField: {'widget': widgets.AdminFileWidget},
models.FileField: {'widget': widgets.AdminFileWidget},
View
4 django/contrib/admin/static/admin/css/forms.css
@@ -226,6 +226,10 @@ body.popup .submit-row {
width: 5em;
}
+.vBigIntegerField {
+ width: 10em;
+}
+
.vForeignKeyRawIdAdminField {
width: 5em;
}
View
7 django/contrib/admin/widgets.py
@@ -303,12 +303,17 @@ def __init__(self, attrs=None):
super(AdminURLFieldWidget, self).__init__(attrs=final_attrs)
class AdminIntegerFieldWidget(forms.TextInput):
+ class_name = 'vIntegerField'
+
def __init__(self, attrs=None):
- final_attrs = {'class': 'vIntegerField'}
+ final_attrs = {'class': self.class_name}
if attrs is not None:
final_attrs.update(attrs)
super(AdminIntegerFieldWidget, self).__init__(attrs=final_attrs)
+class AdminBigIntegerFieldWidget(AdminIntegerFieldWidget):
+ class_name = 'vBigIntegerField'
+
class AdminCommaSeparatedIntegerFieldWidget(forms.TextInput):
def __init__(self, attrs=None):
final_attrs = {'class': 'vCommaSeparatedIntegerField'}
Please sign in to comment.
Something went wrong with that request. Please try again.