fix: prune away unsused model and view (#7585)
This commit is contained in:
parent
77f61f0f45
commit
5aacd59db0
16
ietf/iesg/migrations/0003_delete_telechat.py
Normal file
16
ietf/iesg/migrations/0003_delete_telechat.py
Normal file
|
@ -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",
|
||||
),
|
||||
]
|
|
@ -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:
|
||||
|
|
|
@ -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', ]
|
||||
# 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', ]
|
||||
# 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', ]
|
||||
# resource_name = 'telechatagendacontent'
|
||||
ordering = [
|
||||
"id",
|
||||
]
|
||||
filtering = {
|
||||
"id": ALL,
|
||||
"text": ALL,
|
||||
"section": ALL_WITH_RELATIONS,
|
||||
}
|
||||
|
||||
|
||||
api.iesg.register(TelechatAgendaContentResource())
|
||||
|
|
|
@ -11,5 +11,4 @@ urlpatterns = [
|
|||
url(r'^(?P<date>[0-9\-]+)/management/$', views.management),
|
||||
url(r'^(?P<date>[0-9\-]+)/minutes/$', views.minutes),
|
||||
url(r'^(?P<date>[0-9\-]+)/roll-call/$', views.roll_call),
|
||||
url(r'^new/$', views.new),
|
||||
]
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue