Switch to unified view

a/OSSEval/entity/views.py b/OSSEval/entity/views.py
1
from django.shortcuts import render
1
from django.shortcuts import render
2
from django.http import HttpResponse
2
from django.http import HttpResponse
3
from entity.models import Entity
3
from entity.models import Entity
4
4
# Create your views here.
5
# Create your views here.
5
6
6
def entity_ui(request, entity_id):
7
def search_html(request, entity_id):
8
    """
9
    Moved it in the OSProject app
10
    """
7
    entity = Entity.objects.get(pk=entity_id) 
11
    entity = Entity.objects.get(pk=entity_id)
12
    exec("from " + entity.actual_entity_app + ".models import " + entity.actual_entity_class + ", " + entity.actual_entity_search_class)
13
    actual_entity_class = locals()[entity.actual_entity_class]
14
    ae = actual_entity_class()   
15
    actual_entity_search_class = locals()[entity.actual_entity_search_class]
8
    return HttpResponse(entity.search_ui)
16
    return HttpResponse(actual_entity_search_class.html_ui())
17