Commit b3a573ac372994cb3f689e18e43f59da7ff2ce89
1 parent
43411272
Exists in
master
and in
5 other branches
Exclude save funtion in forms #212
Showing
3 changed files
with
2 additions
and
7 deletions
Show diff stats
app/forms.py
@@ -4,11 +4,6 @@ from django.utils.translation import ugettext_lazy as _ | @@ -4,11 +4,6 @@ from django.utils.translation import ugettext_lazy as _ | ||
4 | 4 | ||
5 | class EmailBackendForm(forms.ModelForm): | 5 | class EmailBackendForm(forms.ModelForm): |
6 | 6 | ||
7 | - def save(self, commit=True): | ||
8 | - super(EmailBackendForm, self).save() | ||
9 | - print('Saved') | ||
10 | - return self.instance | ||
11 | - | ||
12 | class Meta: | 7 | class Meta: |
13 | model = EmailBackend | 8 | model = EmailBackend |
14 | fields = ('description', 'host', 'port', 'username', 'password', 'safe_conection', 'default_from_email') | 9 | fields = ('description', 'host', 'port', 'username', 'password', 'safe_conection', 'default_from_email') |
app/models.py
@@ -24,4 +24,4 @@ class EmailBackend(models.Model): | @@ -24,4 +24,4 @@ class EmailBackend(models.Model): | ||
24 | verbose_name_plural = _('Amadeus SMTP settings') | 24 | verbose_name_plural = _('Amadeus SMTP settings') |
25 | 25 | ||
26 | def __str__(self): | 26 | def __str__(self): |
27 | - return _('Custom email Backend') | 27 | + return self.username |
app/urls.py
@@ -4,5 +4,5 @@ from . import views | @@ -4,5 +4,5 @@ from . import views | ||
4 | 4 | ||
5 | urlpatterns = [ | 5 | urlpatterns = [ |
6 | url(r'^$', views.AppIndex.as_view(), name='index'), | 6 | url(r'^$', views.AppIndex.as_view(), name='index'), |
7 | - url(r'^settings$', views.AmadeusSettings.as_view(), name='settings'), | 7 | + url(r'^settings/$', views.AmadeusSettings.as_view(), name='settings'), |
8 | ] | 8 | ] |