|
a/OSSEval/OpenSourceProject/views.py |
|
b/OSSEval/OpenSourceProject/views.py |
|
... |
|
... |
20 |
from django.shortcuts import render, get_object_or_404
|
20 |
from django.shortcuts import render, get_object_or_404
|
21 |
|
21 |
|
22 |
from analysis.models import Analysis, Instance
|
22 |
from analysis.models import Analysis, Instance
|
23 |
from forms import SearchForm
|
23 |
from forms import SearchForm
|
24 |
from flossmole import FSF, FC, GC, GH
|
24 |
from flossmole import FSF, FC, GC, GH
|
|
|
25 |
from doap import Apache, Eclipse
|
25 |
from OpenSourceProject.models import OSProjectForge, OSProject, Forge
|
26 |
from OpenSourceProject.models import OSProjectForge, OSProject, Forge
|
26 |
from ohloh import OhlohProxy
|
27 |
from ohloh import OhlohProxy
|
27 |
from utils import Forges
|
28 |
from utils import Forges
|
28 |
import OpenSourceProject
|
29 |
import OpenSourceProject
|
29 |
|
30 |
|
|
... |
|
... |
63 |
projects += GC.search(name)
|
64 |
projects += GC.search(name)
|
64 |
if target == Forges.GH or target == Forges.ALL:
|
65 |
if target == Forges.GH or target == Forges.ALL:
|
65 |
projects += GH.search(name)
|
66 |
projects += GH.search(name)
|
66 |
if target == Forges.OHLOH or target == Forges.ALL:
|
67 |
if target == Forges.OHLOH or target == Forges.ALL:
|
67 |
projects += OhlohProxy.search(name)
|
68 |
projects += OhlohProxy.search(name)
|
|
|
69 |
if target == Forges.APACHE or target == Forges.ALL:
|
|
|
70 |
projects += Apache.search(name)
|
|
|
71 |
if target == Forges.ECLIPSE or target == Forges.ALL:
|
|
|
72 |
projects += Eclipse.search(name)
|
68 |
|
73 |
|
69 |
return render(request, 'OSProject/search_results.html', {'projects': projects, 'analysis_id': analysis_id})
|
74 |
return render(request, 'OSProject/search_results.html', {'projects': projects, 'analysis_id': analysis_id})
|
70 |
|
75 |
|
71 |
def OSProjectForge_delete(request, osprojectforge_id, analysis_id):
|
76 |
def OSProjectForge_delete(request, osprojectforge_id, analysis_id):
|
72 |
pf = get_object_or_404(OSProjectForge, pk=osprojectforge_id)
|
77 |
pf = get_object_or_404(OSProjectForge, pk=osprojectforge_id)
|