Browse Source

Update select multiple

pull/10/head
Hironsan 6 years ago
parent
commit
4b2413a46b
3 changed files with 7 additions and 6 deletions
  1. 4
      app/server/static/css/forum.css
  2. 2
      app/server/templates/projects.html
  3. 7
      app/server/views.py

4
app/server/static/css/forum.css

@ -106,4 +106,8 @@ p {
.menu-list a.active {
background-color: #3273dc;
color: #fff;
}
.select-height {
height: 100% !important;
max-height: 200px !important;
}

2
app/server/templates/projects.html

@ -61,7 +61,7 @@
<div class="field">
{{ field.label_tag }}
<div class="control">
{% render_field field class="input" %}
{% render_field field class="input select-height" %}
</div>
{% if field.help_text %}
<small class="form-text text-muted">{{ field.help_text }}</small>

7
app/server/views.py

@ -58,12 +58,9 @@ class ProjectsView(LoginRequiredMixin, TemplateView):
paginate_by = 100
template_name = 'projects.html'
def get_context_data(self, *, object_list=None, **kwargs):
context = super().get_context_data()
def get(self, request, *args, **kwargs):
form = ProjectForm()
context['form'] = form
return context
return render(request, self.template_name, {'form': form})
def post(self, request, *args, **kwargs):
form = ProjectForm(request.POST)

Loading…
Cancel
Save