diff --git a/mamweb/settings_local.py b/mamweb/settings_local.py index 9368524b..4cf76dc2 100644 --- a/mamweb/settings_local.py +++ b/mamweb/settings_local.py @@ -31,6 +31,7 @@ TEMPLATES[0]['OPTIONS']['debug'] = True from ipaddress import ip_network ALLOWED_HOSTS = [str(ip) for ip in ip_network('192.168.0.0/16')] ALLOWED_HOSTS.append('127.0.0.1') +ALLOWED_HOSTS.append('localhost') # Database # https://docs.djangoproject.com/en/1.7/ref/settings/#databases diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index fa5de880..53e06967 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -421,6 +421,10 @@ input { margin: 5px; } +textarea.feedback { + margin: 5px; +} + /* titulni stranka */ diff --git a/odevzdavatko/forms.py b/odevzdavatko/forms.py index 6eb2a973..a8538668 100644 --- a/odevzdavatko/forms.py +++ b/odevzdavatko/forms.py @@ -88,11 +88,12 @@ ReseniSPrilohamiFormSet = inlineformset_factory(m.Reseni,m.PrilohaReseni, class JednoHodnoceniForm(forms.ModelForm): class Meta: model = m.Hodnoceni - fields = ('problem', 'body', 'deadline_body') + fields = ('problem', 'body', 'deadline_body', 'feedback',) widgets = { 'problem': autocomplete.ModelSelect2( url='autocomplete_problem_odevzdatelny', # FIXME: Dovolit i starší? - ) + ), + 'feedback': forms.Textarea(attrs={'rows': 1, 'cols': 30, 'class': 'feedback'}), } OhodnoceniReseniFormSet = formset_factory(JednoHodnoceniForm, diff --git a/odevzdavatko/templates/odevzdavatko/detail.html b/odevzdavatko/templates/odevzdavatko/detail.html index 10f86a14..9f6d31ac 100644 --- a/odevzdavatko/templates/odevzdavatko/detail.html +++ b/odevzdavatko/templates/odevzdavatko/detail.html @@ -91,7 +91,7 @@ $(document).ready(function(){