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
66fa8837
Commit
66fa8837
authored
Dec 08, 2014
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CLEAN] Resources in project view (bug with descendants and CTE_node?).
parent
1f76d481
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
views.py
gargantext_web/views.py
+6
-6
project.html
templates/project.html
+4
-4
No files found.
gargantext_web/views.py
View file @
66fa8837
...
...
@@ -143,6 +143,7 @@ def project(request, project_id):
type_corpus
=
NodeType
.
objects
.
get
(
name
=
'Corpus'
)
type_document
=
NodeType
.
objects
.
get
(
name
=
'Document'
)
type_whitelist
=
NodeType
.
objects
.
get
(
name
=
'WhiteList'
)
type_blacklist
=
NodeType
.
objects
.
get
(
name
=
'BlackList'
)
type_cooclist
=
NodeType
.
objects
.
get
(
name
=
'Cooccurrence'
)
...
...
@@ -158,17 +159,17 @@ def project(request, project_id):
# List of resources
# filter for each project here
whitelists
=
Node
.
objects
.
filter
(
type
=
type_whitelist
)
blacklists
=
Node
.
objects
.
filter
(
type
=
type_blacklist
)
cooclists
=
Node
.
objects
.
filter
(
type
=
type_cooclist
)
whitelists
=
""
#.children.filter(
type=type_whitelist)
blacklists
=
""
#.children.filter(
type=type_blacklist)
cooclists
=
""
#.children.filter(
type=type_cooclist)
for
corpus
in
corpora
:
docs_count
=
corpus
.
children
.
count
()
docs_total
+=
docs_count
corpus_view
=
dict
()
corpus_view
[
'id'
]
=
corpus
.
pk
corpus_view
[
'name'
]
=
corpus
.
name
corpus_view
[
'id'
]
=
corpus
.
pk
corpus_view
[
'name'
]
=
corpus
.
name
corpus_view
[
'count'
]
=
corpus
.
children
.
count
()
for
node_resource
in
Node_Resource
.
objects
.
filter
(
node
=
corpus
):
...
...
@@ -471,7 +472,6 @@ def send_csv(request, corpus_id):
return
response
# To get the data
from
gargantext_web.api
import
JsonHttpResponse
from
analysis.functions
import
get_cooc
...
...
templates/project.html
View file @
66fa8837
...
...
@@ -105,9 +105,9 @@
</div>
{% endif %}
<h2>Lists of Ngrams</h2>
{% if whitelists %}
<h3>White Lists</h2>
<h2>Lists of Ngrams</h2>
<h3>White Lists</h2>
{% for list in whitelists %}
<ul>
<li> {{list.name }}
...
...
@@ -126,8 +126,8 @@
<h2>Results (graphs)</h2>
{% if cooclists %}
{% if cooclists %}
<h2>Results (graphs)</h2>
<h3>Cooccurrences Lists</h2>
{% for list in cooclists %}
<ul>
...
...
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