Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Carlos Ribas
rnacentral-webcode
Commits
a48743e5
Commit
a48743e5
authored
Jun 18, 2021
by
carlosribas
Browse files
Remove r2dt view
parent
ec5fba6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
23 deletions
+1
-23
rnacentral/portal/tests/test_views.py
rnacentral/portal/tests/test_views.py
+1
-5
rnacentral/portal/views.py
rnacentral/portal/views.py
+0
-18
No files found.
rnacentral/portal/tests/test_views.py
View file @
a48743e5
...
...
@@ -2,7 +2,7 @@ import json
from
django.test
import
TestCase
from
django.urls
import
resolve
,
reverse
from
portal.views
import
homepage
,
rna_view
,
rna_view_redirect
,
expert_database_view
,
proxy
,
r2dt
,
get_sequence_lineage
from
portal.views
import
homepage
,
rna_view
,
rna_view_redirect
,
expert_database_view
,
proxy
,
get_sequence_lineage
class
PortalTest
(
TestCase
):
...
...
@@ -259,10 +259,6 @@ class PortalTest(TestCase):
########################
# r2dt
########################
def
test_r2dt_view_url
(
self
):
view
=
resolve
(
'/r2dt'
)
self
.
assertEqual
(
view
.
func
,
r2dt
)
def
test_r2dt_status_code
(
self
):
response
=
self
.
client
.
get
(
reverse
(
'r2dt'
))
self
.
assertEqual
(
response
.
status_code
,
200
)
...
...
rnacentral/portal/views.py
View file @
a48743e5
...
...
@@ -266,24 +266,6 @@ def external_link(request, expert_db, external_id):
return
redirect
(
'/search?q=expert_db:"{}" "{}"'
.
format
(
expert_db
,
external_id
))
def
r2dt
(
request
):
"""R2DT page"""
path
=
os
.
path
.
join
(
settings
.
PROJECT_PATH
,
'rnacentral'
,
'portal'
,
'static'
,
'r2dt-web'
,
'dist'
,
'r2dt-web.js'
)
# Check if the R2DT is installed
plugin_installed
=
True
if
os
.
path
.
isfile
(
path
)
else
False
context
=
{
'plugin_installed'
:
plugin_installed
}
return
render
(
request
,
'portal/r2dt.html'
,
{
'context'
:
context
})
#####################
# Class-based views #
#####################
...
...
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