Commit c82b46db authored by delanoe's avatar delanoe

[FIX] Intermediate page after adding a new corpus (prevent unwanted reloadings).

parent c8e3d924
......@@ -98,6 +98,16 @@ def project(request, project_id):
# parse_extract: fileparsing -> ngram extraction -> lists
scheduled(parse_extract_indexhyperdata)(corpus.id)
return render(
template_name = 'pages/projects/wait.html',
request = request,
context = {
'user' : request.user,
'project': project,
},
)
# corpora within this project
corpora = project.children('CORPUS').all()
sourcename2corpora = defaultdict(list)
......@@ -161,3 +171,17 @@ def project(request, project_id):
'query_size': QUERY_SIZE_N_DEFAULT,
},
)
def wait(request, project_id):
'''Gargantext out of service
'''
return render(
template_name = 'pages/projects/wait.html',
request = request,
context = {
'user' : request.user,
'project': project,
},
)
......@@ -16,8 +16,9 @@ urlpatterns = [
url(r'^auth/logout/?$', auth.logout),
# projects
url(r'^projects/?$', projects.overview),
url(r'^projects/(\d+)/?$', projects.project),
url(r'^projects/?$' , projects.overview),
url(r'^projects/(\d+)/wait$', projects.wait),
url(r'^projects/(\d+)/?$' , projects.project),
# corpora
url(r'^projects/(\d+)/corpora/(\d+)/?$', corpora.docs_by_titles),
......@@ -28,5 +29,5 @@ urlpatterns = [
# terms table for the corpus
url(r'^projects/(\d+)/corpora/(\d+)/terms/?$', terms.ngramtable),
]
......@@ -288,7 +288,7 @@
$("#submit_thing").prop('onclick',null);
var theType = $("#id_type option:selected").html();
console.log("consoling the typeeee: ")
console.log("consoling the type: ")
console.log(theType)
if(theType=="Pubmed (XML format)") doTheQuery();
if(theType=="ISTex") {
......
{% extends "pages/menu.html" %}
{% block css %}
{% load staticfiles %}
<link rel="stylesheet" href="{% static "css/bootstrap.css" %}">
<script src="{% static "js/jquery/jquery.min.js" %}" type="text/javascript"></script>
{% endblock %}
{% block content %}
<div class="container theme-showcase" role="main">
<div class="jumbotron">
<h2>Your file has been uploaded ! <br>
Gargantext need some time to eat it and deliver its.
</h2>
<h2>Thanks for your comprehension</h2>
<a class="btn btn-primary btn-lg" href="/projects/{{ project.id }}" title="Click and test by yourself">Continue on Gargantext</a>
</div>
</div>
{% endblock %}
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