Browse Source

Adjust picture size

Fix #116
pull/153/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
parent
commit
357d53e8b4
  1. 6
      base/views.py
  2. 5
      parlamentares/views.py

6
base/views.py

@ -143,13 +143,14 @@ class CasaLegislativaTabelaAuxForm(ModelForm):
row4, row4,
row5, row5,
HTML("""{% if form.logotipo.value %} HTML("""{% if form.logotipo.value %}
<img class="img-responsive" <img class="img-responsive" width="225" height="300"
src="{{ MEDIA_URL }}{{ form.logotipo.value }}"> src="{{ MEDIA_URL }}{{ form.logotipo.value }}">
<br /><br />
<input type="submit" <input type="submit"
name="remover" name="remover"
id="remover" id="remover"
class="button primary" class="button primary"
value="Remover"/> value="Remover Logo"/>
{% endif %}""", ), {% endif %}""", ),
row6, row6,
row7, row7,
@ -197,7 +198,6 @@ class CasaLegislativaTableAuxView(FormMixin, GenericView):
casa_save.save() casa_save.save()
elif casa is None: elif casa is None:
form.save() form.save()
return self.form_valid(form) return self.form_valid(form)
else: else:
return self.render_to_response({'form': form}) return self.render_to_response({'form': form})

5
parlamentares/views.py

@ -365,13 +365,14 @@ class ParlamentaresForm (ModelForm):
row6, row7, row8, row9, row10, row6, row7, row8, row9, row10,
row11, row12, row13, row11, row12, row13,
HTML("""{% if form.fotografia.value %} HTML("""{% if form.fotografia.value %}
<img class="img-responsive" <img class="img-responsive" width="225" height="300"
src="{{ MEDIA_URL }}{{ form.fotografia.value }}"> src="{{ MEDIA_URL }}{{ form.fotografia.value }}">
<br /><br />
<input type="submit" <input type="submit"
name="remover" name="remover"
id="remover" id="remover"
class="button primary" class="button primary"
value="Remover"/> value="Remover Foto"/>
{% endif %}""", ), {% endif %}""", ),
row14, row14,
ButtonHolder( ButtonHolder(

Loading…
Cancel
Save