Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
f66d6cbf
Commit
f66d6cbf
authored
Apr 05, 2016
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] stashes changes.
parent
3832070e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
24 deletions
+26
-24
urls.py
gargantext/views/api/urls.py
+19
-19
project.html
templates/pages/projects/project.html
+7
-5
No files found.
gargantext/views/api/urls.py
View file @
f66d6cbf
...
@@ -2,26 +2,26 @@ from django.conf.urls import url
...
@@ -2,26 +2,26 @@ from django.conf.urls import url
from
.
import
nodes
from
.
import
nodes
from
.
import
ngramlists
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
=
[
# get a list of ngram_ids or ngram_infos by list_id
url
(
r'^nodes$'
,
nodes
.
NodeListResource
.
as_view
()),
# url(r'^ngramlists/(\d+)$', ngramlists.List.as_view()),
url
(
r'^nodes/(\d+)$'
,
nodes
.
NodeResource
.
as_view
()),
url
(
r'^nodes/(\d+)/facets$'
,
nodes
.
CorpusFacet
.
as_view
()),
,
url
(
r'^ngramlists/family$'
,
ngramlists
.
ListFamily
.
as_view
())
url
(
r'^nodes/(\d+)/having$'
,
nodes
.
NodeListHaving
.
as_view
()),
# entire combination of lists from a corpus
# 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 :
# (or any combination of lists that go together :
# - a mainlist
# - a mainlist
# - an optional stoplist
# - an optional stoplist
# - an optional maplist
# - an optional maplist
# - an optional grouplist)
# - an optional grouplist
url
(
r'^ngramlists/family$'
,
ngramlists
.
ListFamily
.
as_view
()),
# aka lexical model
]
,
url
(
r'^scraping$'
,
scraping
.
Target
.
as_view
()
)
# Scraping : getting data from external database
# Available databases : Pubmed, IsTex, (next: CERN)
]
templates/pages/projects/project.html
View file @
f66d6cbf
...
@@ -316,7 +316,9 @@
...
@@ -316,7 +316,9 @@
}
}
}
}
// //
// Scraping functions //
// //
function
getGlobalResults
(
value
){
function
getGlobalResults
(
value
){
console
.
log
(
"in getGlobalResults()"
)
console
.
log
(
"in getGlobalResults()"
)
// AJAX to django
// AJAX to django
...
@@ -330,10 +332,10 @@
...
@@ -330,10 +332,10 @@
var
theType
=
$
(
"#id_type option:selected"
).
html
();
var
theType
=
$
(
"#id_type option:selected"
).
html
();
if
(
theType
==
"Pubmed (xml format)"
)
{
if
(
theType
==
"Pubmed (xml format)"
)
{
$
.
ajax
({
$
.
ajax
({
// contentType: "application/json",
// contentType: "application/json",
url
:
window
.
location
.
origin
+
"/
scrappers/pubmed/query
"
,
url
:
window
.
location
.
origin
+
"/
api/scraping?source=pubmed
"
,
data
:
formData
,
data
:
formData
,
type
:
'POST'
,
type
:
'POST'
,
beforeSend
:
function
(
xhr
)
{
beforeSend
:
function
(
xhr
)
{
...
@@ -371,10 +373,10 @@
...
@@ -371,10 +373,10 @@
}
}
if
(
theType
==
"ISTex"
)
{
if
(
theType
==
"ISTex"
)
{
console
.
log
(
window
.
location
.
origin
+
"
tests/istextquery
"
)
console
.
log
(
window
.
location
.
origin
+
"
api/scraping?source=istex
"
)
$
.
ajax
({
$
.
ajax
({
// contentType: "application/json",
// contentType: "application/json",
url
:
window
.
location
.
origin
+
"/
tests/istextquery
"
,
url
:
window
.
location
.
origin
+
"/
api/scraping?source=istex
"
,
data
:
formData
,
data
:
formData
,
type
:
'POST'
,
type
:
'POST'
,
beforeSend
:
function
(
xhr
)
{
beforeSend
:
function
(
xhr
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment