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
d4bb2189
Commit
d4bb2189
authored
Nov 18, 2014
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mat_FEATURE_graph'
intégration de mat avec les diff
parents
d63afe27
f422c7cd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
2 deletions
+37
-2
api.py
gargantext_web/api.py
+1
-1
urls.py
gargantext_web/urls.py
+1
-1
views.py
gargantext_web/views.py
+11
-0
cte_tree.models.diff
init/cte_tree.models.diff
+24
-0
No files found.
gargantext_web/api.py
View file @
d4bb2189
...
@@ -66,7 +66,7 @@ class CorpusController:
...
@@ -66,7 +66,7 @@ class CorpusController:
corpus
=
corpusQuery
.
first
()
corpus
=
corpusQuery
.
first
()
if
corpus
.
type
.
name
!=
'Corpus'
:
if
corpus
.
type
.
name
!=
'Corpus'
:
raise
Http404
(
"No such corpus:
%
d"
%
(
corpus_id
,
))
raise
Http404
(
"No such corpus:
%
d"
%
(
corpus_id
,
))
# if corpus.user !=
{currentUser}
:
# if corpus.user !=
request.user
:
# raise Http403("Unauthorized access.")
# raise Http403("Unauthorized access.")
return
corpus
return
corpus
...
...
gargantext_web/urls.py
View file @
d4bb2189
...
@@ -41,7 +41,7 @@ urlpatterns = patterns('',
...
@@ -41,7 +41,7 @@ urlpatterns = patterns('',
url
(
r'^api/corpus/(\d+)/metadata$'
,
gargantext_web
.
api
.
CorpusController
.
metadata
),
url
(
r'^api/corpus/(\d+)/metadata$'
,
gargantext_web
.
api
.
CorpusController
.
metadata
),
url
(
r'^api/corpus/(\d+)/data$'
,
gargantext_web
.
api
.
CorpusController
.
data
),
url
(
r'^api/corpus/(\d+)/data$'
,
gargantext_web
.
api
.
CorpusController
.
data
),
# url(r'^graph-it$', gargantext_web.api.CorpusController.data
),
url
(
r'^graph-it$'
,
views
.
graph_it
),
)
)
from
django.conf
import
settings
from
django.conf
import
settings
...
...
gargantext_web/views.py
View file @
d4bb2189
...
@@ -428,3 +428,14 @@ def send_graph(request):
...
@@ -428,3 +428,14 @@ def send_graph(request):
return
response
return
response
def
graph_it
(
request
):
'''The new multimodal graph.'''
t
=
get_template
(
'graph-it.html'
)
user
=
request
.
user
date
=
datetime
.
datetime
.
now
()
html
=
t
.
render
(
Context
({
'user'
:
user
,
'date'
:
date
,
}))
return
HttpResponse
(
html
)
\ No newline at end of file
init/cte_tree.models.diff
0 → 100644
View file @
d4bb2189
--- models.old.py 2014-11-18 12:12:12.289169335 +0100
+++ models.py 2014-11-18 12:11:31.157171030 +0100
@@ -118,7 +118,7 @@
**kwargs)
def maybe_alias(table):
- if self.query.table_map.has_key(table):
+ if table in self.query.table_map:
return self.query.table_map[table][0]
return table
@@ -153,11 +153,7 @@
name = field[0]
else:
name = field
- if self.query.model._meta.get_field_by_name(name)[
- 0].db_type().startswith('varchar'):
- return 'CAST (T."%s" AS TEXT)' % name
- else:
- return 'T."%s"' % name
+ return 'T."%s"' % name
# The primary key is used in the path; in case it is of a
# custom type, ensure appropriate casting is performed. This
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