chore: Remove unused "rendertest" stuff (#6015)
This commit is contained in:
parent
98634ea27b
commit
5f8fca68f4
|
@ -283,12 +283,6 @@ class GroupPagesTests(TestCase):
|
|||
self.assertContains(r, milestone.desc)
|
||||
self.assertContains(r, milestone.docs.all()[0].name)
|
||||
|
||||
def test_about_rendertest(self):
|
||||
group = CharterFactory().group
|
||||
url = urlreverse('ietf.group.views.group_about_rendertest', kwargs=dict(acronym=group.acronym))
|
||||
r = self.client.get(url)
|
||||
self.assertEqual(r.status_code,200)
|
||||
|
||||
|
||||
def test_group_about(self):
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ info_detail_urls = [
|
|||
url(r'^documents/subscription/$', community_views.subscription),
|
||||
url(r'^charter/$', views.group_about),
|
||||
url(r'^about/$', views.group_about),
|
||||
url(r'^about/rendertest/$', views.group_about_rendertest),
|
||||
url(r'^about/status/$', views.group_about_status),
|
||||
url(r'^about/status/edit/$', views.group_about_status_edit),
|
||||
url(r'^about/status/meeting/(?P<num>\d+)/$', views.group_about_status_meeting),
|
||||
|
|
|
@ -604,17 +604,6 @@ def all_status(request):
|
|||
}
|
||||
)
|
||||
|
||||
def group_about_rendertest(request, acronym, group_type=None):
|
||||
group = get_group_or_404(acronym, group_type)
|
||||
charter = None
|
||||
if group.charter:
|
||||
charter = get_charter_text(group)
|
||||
try:
|
||||
rendered = markdown.markdown(charter)
|
||||
except Exception as e:
|
||||
rendered = f'Markdown rendering failed: {e}'
|
||||
return render(request, 'group/group_about_rendertest.html', {'group':group, 'charter':charter, 'rendered':rendered})
|
||||
|
||||
def group_about_status(request, acronym, group_type=None):
|
||||
group = get_group_or_404(acronym, group_type)
|
||||
status_update = group.latest_event(type='status_update')
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
{% extends "group/group_base.html" %}
|
||||
{# Copyright The IETF Trust 2021, All Rights Reserved #}
|
||||
{% load origin %}
|
||||
{% load ietf_filters %}
|
||||
{% block group_content %}
|
||||
{% if charter %}
|
||||
{% comment %}
|
||||
<div class="row">
|
||||
<div class="col-md-6 h2 text-center bg-info border-end">Current about page rendering</div>
|
||||
<div class="col-md-6 h2 text-center bg-info">Markdown rendering</div>
|
||||
</div>
|
||||
<div class="row border-bottom text-center">
|
||||
<div class="col-md-6 border-end"> </div>
|
||||
<div class="col-md-6"><input type="checkbox" class="form-check-input" name="widthconstraint"> Constrain width</input></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 border-end">{{charter|linebreaks}}</div>
|
||||
<div class="col-md-6 rightcontent">{{rendered|sanitize|safe}}</div>
|
||||
</div>
|
||||
{% endcomment %}
|
||||
<div class="my-3 row">
|
||||
<div class="col-md-6 border-end">
|
||||
<div class="h2 text-center bg-info">Current about page rendering</div>
|
||||
<div class="border-bottom text-center"> </div>
|
||||
<div>{{ charter|linebreaks }}</div>
|
||||
</div>
|
||||
<div class="col-md-6 rightpanel">
|
||||
<div class="h2 text-center bg-info">Markdown rendering</div>
|
||||
<div class="border-bottom text-center">
|
||||
<label class="form-label" for="widthconstraint">Constrain width</label>
|
||||
<input type="checkbox" class="form-check-input" name="widthconstraint" id="widthconstraint">
|
||||
</div>
|
||||
<div class="rightcontent">{{ rendered|sanitize|safe }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div>Group has no charter document</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block js %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('input[name=widthconstraint]').on("change", function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.rightcontent').css('max-width','700px')
|
||||
} else {
|
||||
$('.rightcontent').css('max-width','')
|
||||
}
|
||||
});
|
||||
$('input[name=widthconstraint').prop('checked', false);
|
||||
$('.rightcontent').css('max-width','')
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
Loading…
Reference in a new issue