diff --git a/app/models.py b/app/models.py index 1c62fcf..c1d05dd 100644 --- a/app/models.py +++ b/app/models.py @@ -3,7 +3,7 @@ from django.utils.translation import ugettext_lazy as _ # Create your models here. class EmailBackend(models.Model): - + SAFE_CONECTIONS = ( (0, _('No')), (1, _('TLS, if available')), @@ -17,7 +17,7 @@ class EmailBackend(models.Model): username = models.CharField(_('Email host username'), max_length=30) password = models.CharField(_('Email host password'), max_length=30, blank=True) safe_conection = models.IntegerField(_('Use safe conection'), choices=SAFE_CONECTIONS, default=0) - default_from_email = models.EmailField(_('Default from email'), blank=True) + default_from_email = models.EmailField(_('Default from email')) class Meta: verbose_name = _('Amadeus SMTP setting') diff --git a/app/templates/admin_settings.html b/app/templates/admin_settings.html index d0aabd1..6a52c90 100644 --- a/app/templates/admin_settings.html +++ b/app/templates/admin_settings.html @@ -3,268 +3,266 @@ {% load static i18n django_bootstrap_breadcrumbs permission_tags widget_tweaks %} {% block breadcrumbs %} - {{ block.super }} - {% breadcrumb 'Settings' 'app:settings' %} +{{ block.super }} +{% breadcrumb 'Settings' 'app:settings' %} {% endblock %} {% block content %} - {% for message in messages %} - - {% endfor %} - - +{% for message in messages %} + +{% endfor %} + + - -
- + +
+ {% if form.errors %} -
- {% else %} -
- {% endif %} -
-
-

{% trans "General" %}

-
-
- Content -
-
-
-
-
-
- - - - {% if form.errors %} -
- {% else %} -
- {% endif %} -
-
- {% csrf_token %} -
-

{% trans "Outgoing Server (SMTP)" %}

-
-
-

{% trans "Settings" %}

-
-
- {% if form.description.field.required %} - - {% else %} - - {% endif %} - {% render_field form.description class='form-control' %} -
- {% if form.description.errors %} - - {% endif %} -
- {% if form.host.field.required %} - - {% else %} - - {% endif %} - {% render_field form.host class='form-control' %} -
- {% if form.host.errors %} - - {% endif %} -
- {% if form.port.field.required %} - - {% else %} - - {% endif %} -
- {% render_field form.port class='form-control' onkeypress='campoNumerico(this,event);' %} -
-
- 25 -
-
- {% if form.port.errors %} - - {% endif %} -
-
-
-
-
-
-

{% trans "Security and authentication" %}

-
-
- {% if form.username.field.required %} - - {% else %} - - {% endif %} - {% render_field form.username class='form-control' %} -
- {% if form.username.errors %} - - {% endif %} -
- {% if form.password.field.required %} - - {% else %} - - {% endif %} - {% render_field form.password type='password' class='form-control' %} -
- {% if form.password.errors %} - - {% endif %} -
- {% if form.default_from_email.field.required %} - - {% else %} - - {% endif %} - {% render_field form.default_from_email class='form-control' %} -
- {% if form.default_from_email.errors %} - - {% endif %} -
- {% if form.safe_conection.fiel.required %} -

{{ form.safe_conection.label }}*

- {% else %} -

{{ form.safe_conection.label }}

- {% endif %} -
-
- {% for value, text in form.safe_conection.field.choices %} - - {% endfor %} -
-
-
- {% if form.safe_conection.errors %} - - {% endif %} -
-
- -
-
-
+
+ {% else %} +
+ {% endif %} +
+
+

{% trans "General" %}

+
+
+ Content +
+
+
+
+
+ + + + {% if form.errors %} +
+ {% else %} +
+ {% endif %} +
+
+ {% csrf_token %} +
+

{% trans "Outgoing Server (SMTP)" %}

+
+
+

{% trans "Settings" %}

+
+
+ {% if form.description.field.required %} + + {% else %} + + {% endif %} + {% render_field form.description class='form-control' %} +
+ {% if form.description.errors %} + + {% endif %} +
+ {% if form.host.field.required %} + + {% else %} + + {% endif %} + {% render_field form.host class='form-control' %} +
+ {% if form.host.errors %} + + {% endif %} +
+ {% if form.port.field.required %} + + {% else %} + + {% endif %} +
+ {% render_field form.port class='form-control' onkeypress='campoNumerico(this,event);' %} +
+
+ 25 +
+
+ {% if form.port.errors %} + + {% endif %} +
+
+
+
+
+
+

{% trans "Security and authentication" %}

+
+
+ {% if form.username.field.required %} + + {% else %} + + {% endif %} + {% render_field form.username class='form-control' %} +
+ {% if form.username.errors %} + + {% endif %} +
+ {% if form.password.field.required %} + + {% else %} + + {% endif %} + {% render_field form.password type='password' class='form-control' %} +
+ {% if form.password.errors %} + + {% endif %} +
+ {% if form.default_from_email.field.required %} + + {% else %} + + {% endif %} + {% render_field form.default_from_email class='form-control' %} +
+ {% if form.default_from_email.errors %} + + {% endif %} +
+ {% if form.safe_conection.fiel.required %} +

{{ form.safe_conection.label }}*

+ {% else %} +

{{ form.safe_conection.label }}

+ {% endif %} +
+
+ {% for value, text in form.safe_conection.field.choices %} + + {% endfor %} +
+
+
+ {% if form.safe_conection.errors %} + + {% endif %} +
+
+ +
+
+
+
- + - -
-
-
-
- -
- -
-
+ +
+
+
+
+ +
+ +
+
+
-
-{% endblock content %} \ No newline at end of file + {% endblock content %} -- libgit2 0.21.2