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
97254af8
Commit
97254af8
authored
Feb 06, 2017
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Django upgrade render context deprecated.
parent
98a7089e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
views.py
annotations/views.py
+6
-7
No files found.
annotations/views.py
View file @
97254af8
...
...
@@ -2,7 +2,7 @@ from urllib.parse import urljoin
import
json
import
datetime
from
django.shortcuts
import
render
_to_response
from
django.shortcuts
import
render
from
django.template
import
RequestContext
from
django.contrib.auth.decorators
import
login_required
...
...
@@ -25,12 +25,11 @@ def main(request, project_id, corpus_id, document_id, optional_focus_ngram):
NB: url params are NOT used here (angular has its own url regex in app.js)
"""
return
render_to_response
(
'annotations/main.html'
,
{
# TODO use reverse()
'api_url'
:
urljoin
(
request
.
get_host
(),
'/annotations/'
),
'garg_url'
:
request
.
get_host
(),
'nodes_api_url'
:
urljoin
(
request
.
get_host
(),
'/api/'
),
},
context_instance
=
RequestContext
(
request
))
context
=
{
'api_url'
:
urljoin
(
request
.
get_host
(),
'/annotations/'
)
,
'garg_url'
:
request
.
get_host
()
,
'nodes_api_url'
:
urljoin
(
request
.
get_host
(),
'/api/'
)
}
return
render
(
request
,
'annotations/main.html'
,
context
)
class
NgramList
(
APIView
):
"""Read the lists of ngrams (terms) that will become annotations"""
...
...
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