Skip to content

Commit

Permalink
Tear out old meeting schedule editor and related code
Browse files Browse the repository at this point in the history
 - Legacy-Id: 19551
  • Loading branch information
jennifer-richards committed Nov 4, 2021
1 parent 7b35c09 commit d7f2034
Show file tree
Hide file tree
Showing 22 changed files with 88 additions and 6,161 deletions.
28 changes: 0 additions & 28 deletions ietf/group/models.py
Expand Up @@ -8,16 +8,12 @@
import os
import re

from urllib.parse import urljoin

from django.conf import settings
from django.core.validators import RegexValidator
from django.db import models
from django.db.models.deletion import CASCADE, PROTECT
from django.dispatch import receiver

#from simple_history.models import HistoricalRecords

import debug # pyflakes:ignore

from ietf.group.colors import fg_group_colors, bg_group_colors
Expand Down Expand Up @@ -168,30 +164,6 @@ def fg_color(self):
def bg_color(self):
return bg_group_colors[self.upcase_acronym]

def json_url(self):
return "/group/%s.json" % (self.acronym,)

def json_dict(self, host_scheme):
group1= dict()
group1['href'] = urljoin(host_scheme, self.json_url())
group1['acronym'] = self.acronym
group1['name'] = self.name
group1['state'] = self.state.slug
group1['type'] = self.type.slug
if self.parent is not None:
group1['parent_href'] = urljoin(host_scheme, self.parent.json_url())
# uncomment when people URL handle is created
try:
if self.ad_role() is not None:
group1['ad_href'] = urljoin(host_scheme, self.ad_role().person.json_url())
except Person.DoesNotExist:
pass
group1['list_email'] = self.list_email
group1['list_subscribe'] = self.list_subscribe
group1['list_archive'] = self.list_archive
group1['comments'] = self.comments
return group1

def has_tools_page(self):
return self.type_id in ['wg', ] and self.state_id in ['active', 'dormant', 'replaced', 'conclude']

Expand Down
1 change: 0 additions & 1 deletion ietf/group/urls.py
Expand Up @@ -54,7 +54,6 @@
group_urls = [
url(r'^$', views.active_groups),
url(r'^groupmenu.json', views.group_menu_data, None, 'ietf.group.views.group_menu_data'),
url(r'^%(acronym)s.json$' % settings.URL_REGEXPS, views.group_json),
url(r'^chartering/$', views.chartering_groups),
url(r'^chartering/create/(?P<group_type>(wg|rg))/$', views.edit, {'action': "charter"}),
url(r'^concluded/$', views.concluded_groups),
Expand Down
8 changes: 0 additions & 8 deletions ietf/group/views.py
Expand Up @@ -38,7 +38,6 @@
import datetime
import itertools
import io
import json
import markdown
import math
import os
Expand Down Expand Up @@ -1299,13 +1298,6 @@ def stream_edit(request, acronym):
)


def group_json(request, acronym):
group = get_object_or_404(Group, acronym=acronym)

return HttpResponse(json.dumps(group.json_dict(request.build_absolute_uri('/')),
sort_keys=True, indent=2),
content_type="application/json")

@cache_control(public=True, max_age=30*60)
@cache_page(30 * 60)
def group_menu_data(request):
Expand Down

0 comments on commit d7f2034

Please sign in to comment.