Delete some unused code
- Legacy-Id: 10669
This commit is contained in:
parent
1e75ee3d11
commit
4696dad536
|
@ -2,31 +2,8 @@ from django import template
|
|||
from django.template.loader import render_to_string
|
||||
from django.conf import settings
|
||||
|
||||
from ietf.community.models import CommunityList
|
||||
from ietf.group.models import Role
|
||||
|
||||
|
||||
register = template.Library()
|
||||
|
||||
@register.assignment_tag
|
||||
def community_lists_for_user(user):
|
||||
if not (user and hasattr(user, "is_authenticated") and user.is_authenticated()):
|
||||
return {}
|
||||
|
||||
try:
|
||||
person = user.person
|
||||
groups = []
|
||||
managed_areas = [i.group for i in Role.objects.filter(name__slug='ad', group__type__slug='area', group__state__slug='active', email__in=person.email_set.all())]
|
||||
for area in managed_areas:
|
||||
groups.append(CommunityList.objects.get_or_create(group=area)[0])
|
||||
managed_wg = [i.group for i in Role.objects.filter(name__slug='chair', group__type__slug='wg', group__state__slug__in=('active','bof'), email__in=person.email_set.all())]
|
||||
for wg in managed_wg:
|
||||
groups.append(CommunityList.objects.get_or_create(group=wg)[0])
|
||||
lists['group'] = groups
|
||||
except:
|
||||
pass
|
||||
return lists
|
||||
|
||||
@register.inclusion_tag('community/display_field.html', takes_context=False)
|
||||
def show_field(field, doc):
|
||||
return {'field': field,
|
||||
|
|
|
@ -95,7 +95,6 @@ def untrack_document(request, name):
|
|||
clist = get_object_or_404(CommunityList, user=request.user)
|
||||
|
||||
if request.method == "POST":
|
||||
clist = CommunityList.objects.get_or_create(user=request.user)[0]
|
||||
clist.added_ids.remove(doc)
|
||||
if request.is_ajax():
|
||||
return HttpResponse(json.dumps({ 'success': True }), content_type='text/plain')
|
||||
|
|
Loading…
Reference in a new issue