|
a/OSSEval/entity/views.py |
|
b/OSSEval/entity/views.py |
1 |
from django.shortcuts import render
|
|
|
2 |
from django.http import HttpResponse
|
|
|
3 |
from entity.models import Entity
|
|
|
4 |
|
|
|
5 |
# Create your views here.
|
1 |
# Create your views here.
|
6 |
|
|
|
7 |
def search_html(request, entity_id):
|
|
|
8 |
"""
|
|
|
9 |
Moved it in the OSProject app
|
|
|
10 |
"""
|
|
|
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]
|
|
|
16 |
return HttpResponse(actual_entity_search_class.html_ui())
|
|
|
17 |
|
|
|