diff --git a/src/postorius/forms.py b/src/postorius/forms.py index c324a3e..5917e6b 100644 --- a/src/postorius/forms.py +++ b/src/postorius/forms.py @@ -68,13 +68,6 @@ required=True, help_text=_('Example: domain.org'), ) - web_host = forms.URLField( - label=_('Web Host'), - error_messages={'required': _('Please enter a host name'), - 'invalid': _('Please enter a valid host name.')}, - required=False, - help_text=_('Example: http://www.domain.org'), - ) description = forms.CharField( label=_('Description'), required=False) @@ -98,7 +91,6 @@ """ layout = [["Please enter Details", "mail_host", - "web_host", "description"]] diff --git a/src/postorius/models.py b/src/postorius/models.py index 2f63441..1ab0349 100644 --- a/src/postorius/models.py +++ b/src/postorius/models.py @@ -20,20 +20,13 @@ absolute_import, division, print_function, unicode_literals) -import uuid import logging -from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth.models import User -from django.core.exceptions import ImproperlyConfigured -from django.core.mail import send_mail from django.db.models.signals import post_save -from django.core.urlresolvers import reverse from django.dispatch import receiver -from django.db import models from django.http import Http404 -from django.template.loader import render_to_string from django_mailman3.lib.mailman import get_mailman_client from mailmanclient import MailmanConnectionError try: diff --git a/src/postorius/templates/postorius/domain/index.html b/src/postorius/templates/postorius/domain/index.html index 6a24684..9b6f870 100644 --- a/src/postorius/templates/postorius/domain/index.html +++ b/src/postorius/templates/postorius/domain/index.html @@ -18,7 +18,6 @@ {% trans 'Mail Host' %} - {% trans 'URL Host' %} {% trans 'Description' %}   @@ -27,7 +26,6 @@ {% for domain in domains %} {{ domain.mail_host }} - {{ domain.base_url }} {{ domain.description }} {% trans 'Delete' %} diff --git a/src/postorius/tests/test_forms.py b/src/postorius/tests/test_forms.py index 08f739f..9157c8e 100644 --- a/src/postorius/tests/test_forms.py +++ b/src/postorius/tests/test_forms.py @@ -37,24 +37,14 @@ class DomainNewTest(TestCase): - def test_form_fields_webhost(self): + def test_form_fields_valid(self): form = DomainNew({ 'mail_host': 'mailman.most-desirable.org', - 'web_host': 'http://mailman.most-desirable.org', 'description': 'The Most Desirable organization', 'contact_address': 'contact@mailman.most-desirable.org', }) self.assertTrue(form.is_valid()) - def test_form_fields_webhost_invalid(self): - form = DomainNew({ - 'mail_host': 'mailman.most-desirable.org', - 'web_host': 'most-desirable', - 'description': 'The Most Desirable organization', - 'contact_address': 'contact@mailman.most-desirable.org', - }) - self.assertFalse(form.is_valid()) - class ListSubscribeTest(TestCase): def test_subscribe_works(self): diff --git a/src/postorius/tests/utils.py b/src/postorius/tests/utils.py index 1438227..a8cf94d 100644 --- a/src/postorius/tests/utils.py +++ b/src/postorius/tests/utils.py @@ -44,11 +44,9 @@ :rtype: MagicMock """ mock_object = MagicMock(name='Domain') - mock_object.base_url = '' mock_object.contact_address = '' mock_object.description = '' mock_object.mail_host = '' - mock_object.url_host = '' mock_object.lists = [] if properties is not None: for key in properties: diff --git a/src/postorius/views/domain.py b/src/postorius/views/domain.py index 1d68d90..3824bbb 100644 --- a/src/postorius/views/domain.py +++ b/src/postorius/views/domain.py @@ -52,7 +52,6 @@ form = DomainNew(request.POST) if form.is_valid(): domain = Domain(mail_host=form.cleaned_data['mail_host'], - base_url=form.cleaned_data['web_host'], description=form.cleaned_data['description'], owner=request.user.email) try: