diff --git a/ietf/iesg/migrations/0003_delete_telechat.py b/ietf/iesg/migrations/0003_delete_telechat.py new file mode 100644 index 000000000..6a09b8855 --- /dev/null +++ b/ietf/iesg/migrations/0003_delete_telechat.py @@ -0,0 +1,16 @@ +# Generated by Django 4.2.13 on 2024-06-21 20:40 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("iesg", "0002_telechatagendacontent"), + ] + + operations = [ + migrations.DeleteModel( + name="Telechat", + ), + ] diff --git a/ietf/iesg/models.py b/ietf/iesg/models.py index 96b78a195..dcc8a9880 100644 --- a/ietf/iesg/models.py +++ b/ietf/iesg/models.py @@ -59,20 +59,6 @@ class TelechatAgendaItem(models.Model): type_name = self.TYPE_CHOICES_DICT.get(self.type, str(self.type)) return "%s: %s" % (type_name, self.title or "") -class Telechat(models.Model): - telechat_id = models.IntegerField(primary_key=True) - telechat_date = models.DateField(null=True, blank=True) - minute_approved = models.IntegerField(null=True, blank=True) - wg_news_txt = models.TextField(blank=True) - iab_news_txt = models.TextField(blank=True) - management_issue = models.TextField(blank=True) - frozen = models.IntegerField(null=True, blank=True) - mi_frozen = models.IntegerField(null=True, blank=True) - - class Meta: - db_table = 'telechat' - - def next_telechat_date(): dates = TelechatDate.objects.order_by("-date") if dates: diff --git a/ietf/iesg/resources.py b/ietf/iesg/resources.py index c5deed27f..c28dcf51d 100644 --- a/ietf/iesg/resources.py +++ b/ietf/iesg/resources.py @@ -9,7 +9,7 @@ from tastypie.cache import SimpleCache from ietf import api -from ietf.iesg.models import TelechatDate, Telechat, TelechatAgendaItem, TelechatAgendaContent +from ietf.iesg.models import TelechatDate, TelechatAgendaItem, TelechatAgendaContent class TelechatDateResource(ModelResource): @@ -17,62 +17,57 @@ class TelechatDateResource(ModelResource): cache = SimpleCache() queryset = TelechatDate.objects.all() serializer = api.Serializer() - #resource_name = 'telechatdate' - ordering = ['id', ] - filtering = { + # resource_name = 'telechatdate' + ordering = [ + "id", + ] + filtering = { "id": ALL, "date": ALL, } + + api.iesg.register(TelechatDateResource()) -class TelechatResource(ModelResource): - class Meta: - cache = SimpleCache() - queryset = Telechat.objects.all() - serializer = api.Serializer() - #resource_name = 'telechat' - ordering = ['tlechat_id', ] - filtering = { - "telechat_id": ALL, - "telechat_date": ALL, - "minute_approved": ALL, - "wg_news_txt": ALL, - "iab_news_txt": ALL, - "management_issue": ALL, - "frozen": ALL, - "mi_frozen": ALL, - } -api.iesg.register(TelechatResource()) class TelechatAgendaItemResource(ModelResource): class Meta: cache = SimpleCache() queryset = TelechatAgendaItem.objects.all() serializer = api.Serializer() - #resource_name = 'telechatagendaitem' - ordering = ['id', ] - filtering = { + # resource_name = 'telechatagendaitem' + ordering = [ + "id", + ] + filtering = { "id": ALL, "text": ALL, "type": ALL, "title": ALL, } + + api.iesg.register(TelechatAgendaItemResource()) - - from ietf.name.resources import TelechatAgendaSectionNameResource + + class TelechatAgendaContentResource(ModelResource): - section = ToOneField(TelechatAgendaSectionNameResource, 'section') + section = ToOneField(TelechatAgendaSectionNameResource, "section") + class Meta: queryset = TelechatAgendaContent.objects.none() serializer = api.Serializer() cache = SimpleCache() - #resource_name = 'telechatagendacontent' - ordering = ['id', ] - filtering = { + # resource_name = 'telechatagendacontent' + ordering = [ + "id", + ] + filtering = { "id": ALL, "text": ALL, "section": ALL_WITH_RELATIONS, } + + api.iesg.register(TelechatAgendaContentResource()) diff --git a/ietf/secr/telechat/urls.py b/ietf/secr/telechat/urls.py index 0f2ff4aac..08c51eab5 100644 --- a/ietf/secr/telechat/urls.py +++ b/ietf/secr/telechat/urls.py @@ -11,5 +11,4 @@ urlpatterns = [ url(r'^(?P[0-9\-]+)/management/$', views.management), url(r'^(?P[0-9\-]+)/minutes/$', views.minutes), url(r'^(?P[0-9\-]+)/roll-call/$', views.roll_call), - url(r'^new/$', views.new), ] diff --git a/ietf/secr/telechat/views.py b/ietf/secr/telechat/views.py index 356a9b934..c39aecf74 100644 --- a/ietf/secr/telechat/views.py +++ b/ietf/secr/telechat/views.py @@ -17,7 +17,7 @@ from ietf.doc.utils import add_state_change_event, update_action_holders from ietf.person.models import Person from ietf.doc.lastcall import request_last_call from ietf.doc.mails import email_state_changed -from ietf.iesg.models import TelechatDate, TelechatAgendaItem, Telechat +from ietf.iesg.models import TelechatDate, TelechatAgendaItem from ietf.iesg.agenda import agenda_data, get_doc_section from ietf.ietfauth.utils import role_required from ietf.secr.telechat.forms import BallotForm, ChangeStateForm, DateSelectForm, TELECHAT_TAGS @@ -419,18 +419,6 @@ def minutes(request, date): 'da_docs': da_docs}, ) -@role_required('Secretariat') -def new(request): - ''' - This view creates a new telechat agenda and redirects to the default view - ''' - if request.method == 'POST': - date = request.POST['date'] - # create legacy telechat record - Telechat.objects.create(telechat_date=date) - - messages.success(request,'New Telechat Agenda created') - return redirect('ietf.secr.telechat.views.doc', date=date) @role_required('Secretariat') def roll_call(request, date):