Commit e1fed489 authored by delanoe's avatar delanoe

[FIX] stashes changes.

parent 68b1707b
......@@ -2,26 +2,26 @@ from django.conf.urls import url
from . import nodes
from . import ngramlists
from . import scraping
urlpatterns = [ url(r'^nodes$' , nodes.NodeListResource.as_view())
, url(r'^nodes/(\d+)$' , nodes.NodeResource.as_view() )
, url(r'^nodes/(\d+)/facets$' , nodes.CorpusFacet.as_view() )
, url(r'^nodes/(\d+)/having$' , nodes.NodeListHaving.as_view() )
urlpatterns = [
url(r'^nodes$' , nodes.NodeListResource.as_view()),
url(r'^nodes/(\d+)$' , nodes.NodeResource.as_view()),
# get a list of ngram_ids or ngram_infos by list_id
# url(r'^ngramlists/(\d+)$', ngramlists.List.as_view()),
url(r'^nodes/(\d+)/facets$' , nodes.CorpusFacet.as_view()),
url(r'^nodes/(\d+)/having$' , nodes.NodeListHaving.as_view()),
, url(r'^ngramlists/family$' , ngramlists.ListFamily.as_view())
# entire combination of lists from a corpus
# (or any combination of lists that go together :
# - a mainlist
# - an optional stoplist
# - an optional maplist
# - an optional grouplist
# aka lexical model
# add or remove ngram from a list
# ex: add <=> PUT ngramlists/change?list=42&ngrams=1,2
# rm <=> DEL ngramlists/change?list=42&ngrams=1,2
url(r'^ngramlists/change$', ngramlists.ListChange.as_view()),
# get entire combination of lists from a corpus
# (or any combination of lists that go together :
# - a mainlist
# - an optional stoplist
# - an optional maplist
# - an optional grouplist)
url(r'^ngramlists/family$', ngramlists.ListFamily.as_view()),
]
, url(r'^scraping$' , scraping.Target.as_view() )
# Scraping : getting data from external database
# Available databases : Pubmed, IsTex, (next: CERN)
]
......@@ -316,7 +316,9 @@
}
}
// //
// Scraping functions //
// //
function getGlobalResults(value){
console.log("in getGlobalResults()")
// AJAX to django
......@@ -330,10 +332,10 @@
var theType = $("#id_type option:selected").html();
if( theType=="Pubmed (xml format)") {
if ( theType == "Pubmed (xml format)" ) {
$.ajax({
// contentType: "application/json",
url: window.location.origin+"/scrappers/pubmed/query",
url: window.location.origin+"/api/scraping?source=pubmed",
data: formData,
type: 'POST',
beforeSend: function(xhr) {
......@@ -371,10 +373,10 @@
}
if(theType=="ISTex") {
console.log(window.location.origin+"tests/istextquery")
console.log(window.location.origin+"api/scraping?source=istex")
$.ajax({
// contentType: "application/json",
url: window.location.origin+"/tests/istextquery",
url: window.location.origin+"/api/scraping?source=istex",
data: formData,
type: 'POST',
beforeSend: function(xhr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment