mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
changed some display settings
This commit is contained in:
parent
16b649fc4c
commit
64a0e3c3e3
2 changed files with 16 additions and 6 deletions
|
|
@ -17,15 +17,16 @@ from django import forms
|
|||
from constance import config
|
||||
|
||||
|
||||
NUMERIC_WIDGET = forms.TextInput(attrs={'size': 10})
|
||||
|
||||
FIELDS = {
|
||||
bool: (fields.BooleanField, {'required': False}),
|
||||
int: (fields.IntegerField, {}),
|
||||
long: (fields.IntegerField, {}),
|
||||
Decimal: (fields.DecimalField, {}),
|
||||
str: (fields.CharField, {}),
|
||||
int: (fields.IntegerField, {'widget': NUMERIC_WIDGET}),
|
||||
long: (fields.IntegerField, {'widget': NUMERIC_WIDGET}),
|
||||
Decimal: (fields.DecimalField, {'widget': NUMERIC_WIDGET}),
|
||||
str: (fields.CharField, {'widget': forms.TextInput(attrs={'size': 25})}),
|
||||
datetime: (fields.DateTimeField, {'widget': AdminSplitDateTime}),
|
||||
float: (fields.FloatField, {}),
|
||||
float: (fields.FloatField, {'widget': NUMERIC_WIDGET}),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,15 @@
|
|||
#result_list td{
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#result_list th.help_text{
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
#result_list td.value_name{
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
|
|
@ -45,7 +54,7 @@
|
|||
<th>Name</th>
|
||||
<th>Default</th>
|
||||
<th>Value</th>
|
||||
<th>Help text</th>
|
||||
<th class="help_text">Help text</th>
|
||||
</tr>
|
||||
{% for item in config %}
|
||||
<tr {% ifnotequal item.value item.default %} class="changed" {% endifnotequal %}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue