Commit 167baf84 authored by delanoe's avatar delanoe

[FIX] urls -> tests/urls. TODO: remove functions from gargantext_web.views to...

[FIX] urls -> tests/urls. TODO: remove functions from gargantext_web.views to tests.views if still tests.
parent 857de3ea
...@@ -99,6 +99,7 @@ INSTALLED_APPS = ( ...@@ -99,6 +99,7 @@ INSTALLED_APPS = (
'aldjemy', 'aldjemy',
'rest_v1_0', 'rest_v1_0',
'rest_framework', 'rest_framework',
'tests',
) )
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
......
...@@ -9,8 +9,6 @@ import gargantext_web.corpus_views as corpus_views ...@@ -9,8 +9,6 @@ import gargantext_web.corpus_views as corpus_views
from annotations import urls as annotations_urls from annotations import urls as annotations_urls
from annotations.views import main as annotations_main_view from annotations.views import main as annotations_main_view
import scrappers.scrap_pubmed.views as pubmedscrapper
import tests.ngramstable.views as samtest
admin.autodiscover() admin.autodiscover()
...@@ -31,27 +29,6 @@ urlpatterns = patterns('', ...@@ -31,27 +29,6 @@ urlpatterns = patterns('',
url(r'^img/logo.svg$', views.logo), url(r'^img/logo.svg$', views.logo),
url(r'^css/bootstrap.css$', views.css), url(r'^css/bootstrap.css$', views.css),
# REST
url(r'^api/', include('rest_v1_0.urls')),
url(r'^v1.0/', include('rest_v1_0.urls')),
# TODO below to put in the rest
url(r'^project/(\d+)/corpus/(\d+)/corpus.csv$', views.corpus_csv),
url(r'^project/(\d+)/corpus/(tests_mvc_listdocuments+)/corpus.tests_mvc_listdocuments$', views.corpus_csv),
url(r'^delete/(\d+)$', views.delete_node), # => api.node('id' = id, children = 'True', copies = False)
# Visualizations
url(r'^project/(\d+)/corpus/(\d+)/chart$', views.chart),
url(r'^project/(\d+)/corpus/(\d+)/explorer$', views.graph),
url(r'^project/(\d+)/corpus/(\d+)/matrix$', views.matrix),
url(r'^chart/corpus/(\d+)/data.csv$', views.send_csv), # => api.node.children('type' : 'data', 'format' : 'csv')
url(r'^corpus/(\d+)/node_link.json$', views.node_link), # => api.analysis('type': 'node_link', 'format' : 'json')
url(r'^corpus/(\d+)/adjacency.json$', views.adjacency), # => api.analysis('type': 'adjacency', 'format' : 'json')
url(r'^ngrams$', views.ngrams), # to be removed
url(r'^nodeinfo/(\d+)$', views.nodeinfo), # to be removed ?
# TODO above put in the rest
############################################################################ ############################################################################
# User Home view # User Home view
url(r'^$', views.home_view), url(r'^$', views.home_view),
...@@ -73,28 +50,40 @@ urlpatterns = patterns('', ...@@ -73,28 +50,40 @@ urlpatterns = patterns('',
url(r'^project/(\d+)/corpus/(\d+)/journals/journals.json$', samtest.get_journals_json), url(r'^project/(\d+)/corpus/(\d+)/journals/journals.json$', samtest.get_journals_json),
url(r'^project/(\d+)/corpus/(\d+)/journals$', samtest.get_journals), url(r'^project/(\d+)/corpus/(\d+)/journals$', samtest.get_journals),
# TODO rest to update corpus and information for progress bar
url(r'^project/(\d+)/corpus/(\d+)/(\w+)/update$', views.update_nodes),
############################################################################ ############################################################################
# annotations App # annotations App
url(r'^project/(\d+)/corpus/(\d+)/document/(\d+)/$', annotations_main_view), url(r'^project/(\d+)/corpus/(\d+)/document/(\d+)/$', annotations_main_view),
url(r'^annotations/', include(annotations_urls)), url(r'^annotations/', include(annotations_urls)),
# #
############################################################################ ############################################################################
# REST
url(r'^api/', include('rest_v1_0.urls')),
url(r'^v1.0/', include('rest_v1_0.urls')),
# TODO below to put in the rest
url(r'^project/(\d+)/corpus/(\d+)/corpus.csv$', views.corpus_csv),
url(r'^project/(\d+)/corpus/(tests_mvc_listdocuments+)/corpus.tests_mvc_listdocuments$', views.corpus_csv),
url(r'^delete/(\d+)$', views.delete_node), # => api.node('id' = id, children = 'True', copies = False)
# Visualizations
url(r'^project/(\d+)/corpus/(\d+)/chart$', views.chart),
url(r'^project/(\d+)/corpus/(\d+)/explorer$', views.graph),
url(r'^project/(\d+)/corpus/(\d+)/matrix$', views.matrix),
url(r'^chart/corpus/(\d+)/data.csv$', views.send_csv), # => api.node.children('type' : 'data', 'format' : 'csv')
url(r'^corpus/(\d+)/node_link.json$', views.node_link), # => api.analysis('type': 'node_link', 'format' : 'json')
url(r'^corpus/(\d+)/adjacency.json$', views.adjacency), # => api.analysis('type': 'adjacency', 'format' : 'json')
url(r'^ngrams$', views.ngrams), # to be removed
url(r'^nodeinfo/(\d+)$', views.nodeinfo), # to be removed ?
url(r'^project/(\d+)/corpus/(\d+)/(\w+)/update$', views.update_nodes),
# TODO rest to update corpus and information for progress bar
############################################################################ ############################################################################
############################################################################ url(r'^tests/', include('tests.urls')),
# TODO put in test folder Provisory tests # TODO Samuel, lines below were on your tests, are they still used ?
url(r'^tests/mvc$', views.tests_mvc), # can we delete them ?
url(r'^tests/mvc-listdocuments$', views.tests_mvc_listdocuments),
url(r'^tests/istextquery$', pubmedscrapper.getGlobalStatsISTEXT), # api/query?type=istext ?
url(r'^tests/pubmedquery$', pubmedscrapper.getGlobalStats),
url(r'^tests/project/(\d+)/pubmedquery/go$', pubmedscrapper.doTheQuery),
url(r'^tests/project/(\d+)/ISTEXquery/go$', pubmedscrapper.testISTEX),
url(r'^tests/paginator/corpus/(\d+)/$', views.newpaginatorJSON),
url(r'^tests/move2trash/$' , views.move_to_trash_multiple ),
url(r'^project/(\d+)/corpus/(\d+)/terms/ngrams.json$', samtest.get_ngrams_json), url(r'^project/(\d+)/corpus/(\d+)/terms/ngrams.json$', samtest.get_ngrams_json),
url(r'^project/(\d+)/corpus/(\d+)/terms$', samtest.get_ngrams), url(r'^project/(\d+)/corpus/(\d+)/terms$', samtest.get_ngrams),
url(r'^project/(\d+)/corpus/(\d+)/stop_list.json$', samtest.get_stoplist) url(r'^project/(\d+)/corpus/(\d+)/stop_list.json$', samtest.get_stoplist)
......
from django.conf.urls import patterns, url
from rest_v1_0 import api, ngrams
import scrappers.scrap_pubmed.views as pubmedscrapper
import tests.ngramstable.views as samtest
import gargantext_web.views as views
urlpatterns = patterns('',
############################################################################
# TODO remove function from gargantext_web.view into tests.views
url(r'mvc$', views.tests_mvc),
url(r'mvc-listdocuments$', views.tests_mvc_listdocuments),
url(r'paginator/corpus/(\d+)/$', views.newpaginatorJSON),
url(r'move2trash/$' , views.move_to_trash_multiple ),
url(r'istextquery$', pubmedscrapper.getGlobalStatsISTEXT), # api/query?type=istext ?
url(r'pubmedquery$', pubmedscrapper.getGlobalStats),
url(r'project/(\d+)/pubmedquery/go$', pubmedscrapper.doTheQuery),
url(r'project/(\d+)/ISTEXquery/go$', pubmedscrapper.testISTEX),
)
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