diff --git a/ietf/secr/templates/includes/awp_add_form.html b/ietf/secr/templates/includes/awp_add_form.html
deleted file mode 100644
index fd5d73abd..000000000
--- a/ietf/secr/templates/includes/awp_add_form.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
Additional Web Pages
- {{ awp_formset.management_form }}
- {{ awp_formset.non_form_errors }}
-
- {% for form in awp_formset.forms %}
-
- {% endfor %}
-
diff --git a/ietf/secr/templates/includes/awp_edit_form.html b/ietf/secr/templates/includes/awp_edit_form.html
deleted file mode 100644
index b6eeb2c52..000000000
--- a/ietf/secr/templates/includes/awp_edit_form.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
Additional Web Pages
-{{ awp_formset.management_form }}
-{{ awp_formset.non_form_errors }}
-
-{% for form in awp_formset.forms %}
-
-{% endfor %}
diff --git a/ietf/secr/templates/includes/awp_view.html b/ietf/secr/templates/includes/awp_view.html
deleted file mode 100644
index 55e070ddc..000000000
--- a/ietf/secr/templates/includes/awp_view.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
Additional Web Pages
- {% for item in awps %}
-
- {% endfor %}
-
diff --git a/ietf/submit/utils.py b/ietf/submit/utils.py
index c60fc2d41..a833ce7f0 100644
--- a/ietf/submit/utils.py
+++ b/ietf/submit/utils.py
@@ -382,10 +382,9 @@ def post_submission(request, submission, approved_doc_desc, approved_subm_desc):
moduleargs = '&'.join([ f.format(module=m) for m in modules])
url = settings.SUBMIT_YANG_CATALOG_IMPACT_URL.format(moduleargs=moduleargs, draft=draft.name)
desc = settings.SUBMIT_YANG_CATALOG_IMPACT_DESC.format(modules=','.join(modules), draft=draft.name)
- draft.docextresource_set.create(value=url, name_id='yang-impact-analysis', display_name=desc)
+ draft.docextresource_set.create(value=url, name_id='yc_impact', display_name=desc)
# Yang module metadata URLs
- old_urls = draft.documenturl_set.filter(tag_id='yc_entry')
- old_urls.delete()
+ draft.docextresource_set.filter(name_id='yc_entry').delete()
for module in modules:
url = settings.SUBMIT_YANG_CATALOG_MODULE_URL.format(module=module)
desc = settings.SUBMIT_YANG_CATALOG_MODULE_DESC.format(module=module)
diff --git a/ietf/utils/management/commands/create_group_wikis.py b/ietf/utils/management/commands/create_group_wikis.py
index 13315b012..bbcfadf78 100644
--- a/ietf/utils/management/commands/create_group_wikis.py
+++ b/ietf/utils/management/commands/create_group_wikis.py
@@ -22,7 +22,7 @@ from django.template.loader import render_to_string
import debug # pyflakes:ignore
-from ietf.group.models import Group, GroupURL, GroupFeatures
+from ietf.group.models import Group, GroupFeatures
from ietf.utils.pipe import pipe
logtag = __name__.split('.')[-1]
@@ -217,8 +217,8 @@ class Command(BaseCommand):
env = Environment(group.trac_dir, create=True, options=options)
self.remove_demo_components(env)
self.remove_demo_milestones(env)
- self.maybe_add_group_url(group, 'Wiki', settings.TRAC_WIKI_URL_PATTERN % group.acronym)
- self.maybe_add_group_url(group, 'Issue tracker', settings.TRAC_ISSUE_URL_PATTERN % group.acronym)
+ self.maybe_add_group_url(group, 'wiki', settings.TRAC_WIKI_URL_PATTERN % group.acronym)
+ self.maybe_add_group_url(group, 'tracker', settings.TRAC_ISSUE_URL_PATTERN % group.acronym)
# Use custom assets (if any) from the master setup
self.symlink_to_master_assets(group.trac_dir, env)
if group.features.acts_like_wg:
@@ -301,12 +301,10 @@ class Command(BaseCommand):
comp.owner = "%s@ietf.org" % doc.name
comp.insert()
- def maybe_add_group_url(self, group, name, url):
- urls = [ u for u in group.groupurl_set.all() if name.lower() in u.name.lower() ]
- if not urls:
- self.note(" adding %s %s URL ..." % (group.acronym, name.lower()))
- url = GroupURL.objects.create(group=group, name=name, url=url)
- group.groupurl_set.add(url)
+ def maybe_add_group_url(self, group, slug, url):
+ if not group.groupextresource_set.filter(name__slug=slug).exists():
+ self.note(" adding %s %s URL ..." % (group.acronym, slug))
+ group.groupextresource_set.create(name_id=slug,value=url)
def add_custom_pages(self, group, env):
for template_name in settings.TRAC_WIKI_PAGES_TEMPLATES:
diff --git a/ietf/utils/validators.py b/ietf/utils/validators.py
index e82a02950..6bac6fb81 100644
--- a/ietf/utils/validators.py
+++ b/ietf/utils/validators.py
@@ -174,7 +174,8 @@ def validate_external_resource_value(name, value):
if name.slug in ( 'github_org', 'github_repo' ):
validate_http_url(value)
- if urlparse(value).netloc.lower() != 'github.com':
+ hostname = urlparse(value).netloc.lower()
+ if not any([ hostname.endswith(x) for x in ('github.com','github.io' ) ]):
raise ValidationError('URL must be a github url')
elif name.slug == 'jabber_room':
validate_xmpp(value)