Commit 7d535cf4 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

spring cleaning!

removed many obsolete templates and views/urls that mapped to them
also fix #68 (access directly "query compounds" from the top menu
and remove "query pockets")


Former-commit-id: be7ecd58a5294a2717b51e57050053537d4b01de
parent 5e0f4aee
......@@ -9,7 +9,7 @@
<div class="inner-wrap">
<ul>
<li>
<a href="/compound/">View Content</a>
<a href="/compounds/">View Content</a>
</li>
<li>
<a href="/admin-session/add/IdForm">Add New Content</a>
......
......@@ -154,7 +154,7 @@
var datasetIndex = activePoints[0]._datasetIndex;
var selectedIndex = activePoints[0]._index;
var id = scatterChart.data.datasets[datasetIndex].data[selectedIndex].id;
window.location = '/compound/' + id + '#' + tabHash;
window.location = '/compounds/' + id + '#' + tabHash;
};
};
</script>
......@@ -182,7 +182,7 @@
<a href="/about">About</a>
</li>
<li>
<a href="/queries">Queries</a>
<a href="/compounds">Query compounds</a>
</li>
<li>
<a href="/tutorials">Tutorials</a>
......
......@@ -5,6 +5,15 @@
{% block content %}
{% include "kekule_display.html" %}
<div class="inner-wrap">
<nav class="breadcrumb breadNav" role="navigation">
<div class="breadNav-label">You are here</div>
<div aria-labelledby="breadcrumb-label">
{% block breadcrumb %} <a href="/compounds/" class="breadNav-link"> > Query compounds</a> <a href="/compounds/{{ compound.id }}" class="breadNav-link"> > Compound {{ compound.id }}</a>{% endblock %}
</div>
</nav>
</div>
<div class="container-fluid">
<div class="row flex-xl-nowrap">
......
<div class="row m-2 border border-info bg-light">
<div class="col-sm-3 border-info d-flex justify-content-center align-content-center">
<a href="/compound/{{ compound.id }}">{% include "pubchem_img.html" %}</a>
<a href="/compounds/{{ compound.id }}">{% include "pubchem_img.html" %}</a>
</div>
<div class="col-sm-9">
<span class="badge badge-dark"><a href="/compound/{{ compound.id }}">{{ compound.id }}</a></span>{%if compound.common_name %}<span>Common name: {{ compound.common_name }}</span>{% endif %}
<span class="badge badge-dark"><a href="/compounds/{{ compound.id }}">{{ compound.id }}</a></span>{%if compound.common_name %}<span>Common name: {{ compound.common_name }}</span>{% endif %}
<ul class="list-group">
{% if compound.canonical_smile %}
<li class="list-group-item">Canonical SMILES: {{ compound.canonical_smile }}</li>
......
{% extends "queries.html" %}
{% extends "base.html" %}
{% load customtags %}
{% block title %}compounds list{% endblock %}
{% block content %}
<div id="mainnav">
<nav class="secondary-nav">
<div class="inner-wrap">
<ul>
<li>
<a href="/compound">By Compounds</a>
</li>
<li>
<a href="/queries/pockets">By Pockets</a>
</li>
</ul>
</div>
</nav>
</div>
<div class="inner-wrap">
<nav class="breadcrumb breadNav" role="navigation">
<div class="breadNav-label">You are here</div>
<div aria-labelledby="breadcrumb-label">
{% block breadcrumb %} <a href="/compound/" class="breadNav-link">{{block.super}}</a> > By compounds</a>{% endblock %}
{% block breadcrumb %} <a href="/compounds/" class="breadNav-link"> > Query compounds</a>{% endblock %}
</div>
</nav>
</div>
......
......@@ -22,7 +22,7 @@
<tbody>
{% for compound in compounds %}
<tr>
<th scope="col"><span class="badge badge-dark"><a href="/compound/{{ compound.id }}">{{ compound.id }}</a></span></th>
<th scope="col"><span class="badge badge-dark"><a href="/compounds/{{ compound.id }}">{{ compound.id }}</a></span></th>
{% if "common_name" in fields %}
<th scope="col">{{ compound.common_name|default_if_none:"-" }}</th>
{% endif %}
......
<div class="card m-2 border border-info" style="width: 300px">
<a href="/compound/{{ compound.id }}">{% include "pubchem_img.html" %}</a>
<a href="/compounds/{{ compound.id }}">{% include "pubchem_img.html" %}</a>
<div class="card-body" style="overflow:hidden; word-wrap:break-word;">
<span class="badge badge-dark"><a href="/compound/{{ compound.id }}">{{ compound.id }}</a></span>
<span class="badge badge-dark"><a href="/compounds/{{ compound.id }}">{{ compound.id }}</a></span>
<p>{{ compound.best_pXC50_activity_ppi_family }}</p>
<p>Molecular Weight: {{ compound.molecular_weight }} g/mol</p>
</div>
......
{% extends "about.html" %}
{% block title %}inhibitors of Protein-Protein Interaction Database{% endblock %}
{% block content %}
<div id="mainnav">
<nav class="secondary-nav">
<div class="inner-wrap">
<ul>
<li>
<a href="/about/general">General informations</a>
</li>
<li>
<a href="/about/pharmacology">Pharmacology</a>
</li>
<li>
<a href="/about/physicochemistry">Physicochemistry</a>
</li>
<li>
<a href="/about/drug-candidate">Drug candidate</a>
</li>
</ul>
</div>
</nav>
</div>
<div class="inner-wrap">
<nav class="breadcrumb breadNav" role="navigation">
<div class="breadNav-label">You are here</div>
<div aria-labelledby="breadcrumb-label">
{% block breadcrumb %} <a href="/compound/" class="breadNav-link">{{block.super}}</a> > Drug candidate {% endblock %}
</div>
</nav>
<div id="main-wrapper" class="page">
<div id="main">
<div id="content" class="main-content">
<div class="section">
<main role="main">
<h1 class="page-title"> DRUG CANDIDATE </h1>
<div class="tabs"></div>
<div class="main__inner">
<div class="region region-content">
<div class="page-intro">
</div>
<div class="color-wrap">
<div class="region region-content">
<div class="block block-system block-system-main">
<div class="content">
<div class="view-content">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main><!-- .site-main -->
</div>
</div>
</div><!-- div main -->
</div>
</div>
{% endblock %}
{% extends "base.html" %}
{% block title %}inhibitors of Protein-Protein Interaction Database{% endblock %}
{% block content %}
<div id="mainnav">
<nav class="secondary-nav">
<div class="inner-wrap">
<ul>
<li>
<a href="/compound">By Compounds</a>
</li>
<li>
<a href="/query/pockets">By Pockets</a>
</li>
</ul>
</div>
</nav>
</div>
<div class="inner-wrap">
<nav class="breadcrumb breadNav" role="navigation">
<div class="breadNav-label">You are here</div>
<div aria-labelledby="breadcrumb-label">
Fonction Fil d'Arianne
</div>
</nav>
<div id="main-wrapper" class="page">
<div id="main">
<div id="content" class="main-content">
<div class="section">
<main role="main">
<h1 class="page-title"> BY PHARMACOLOGICAL CRITERIA </h1>
<div class="tabs"></div>
<div class="main__inner">
<div class="region region-content">
<div class="page-intro">
</div>
<div class="color-wrap">
<div class="region region-content">
<div class="block block-system block-system-main">
<div class="content">
<div class="view-content">
{% block form %}{% endblock %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main><!-- .site-main -->
</div>
</div>
</div><!-- div main -->
</div>
</div>
{% endblock %}
{% extends "about.html" %}
{% block title %}inhibitors of Protein-Protein Interaction Database{% endblock %}
{% block content %}
<div id="mainnav">
<nav class="secondary-nav">
<div class="inner-wrap">
<ul>
<li>
<a href="/about/general">General informations</a>
</li>
<li>
<a href="/about/pharmacology">Pharmacology</a>
</li>
<li>
<a href="/about/physicochemistry">Physicochemistry</a>
</li>
<li>
<a href="/about/drug-candidate">Drug candidate</a>
</li>
</ul>
</div>
</nav>
</div>
<div class="inner-wrap">
<nav class="breadcrumb breadNav" role="navigation">
<div class="breadNav-label">You are here</div>
<div aria-labelledby="breadcrumb-label">
{% block breadcrumb %} <a href="/about/" class="breadNav-link">{{block.super}}</a> > Pharmacology {% endblock %}
</div>
</nav>
<div id="main-wrapper" class="page">
<div id="main">
<div id="content" class="main-content">
<div class="section">
<main role="main">
<h1 class="page-title"> PHARMACOLOGY </h1>
<div class="tabs"></div>
<div class="main__inner">
<div class="region region-content">
<div class="page-intro">
</div>
<div class="color-wrap">
<div class="region region-content">
<div class="block block-system block-system-main">
<div class="content">
<div class="view-content">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main><!-- .site-main -->
</div>
</div>
</div><!-- div main -->
</div>
</div>
{% endblock %}
{% extends "queries.html" %}
{% block title %}inhibitors of Protein-Protein Interaction Database{% endblock %}
{% block content %}
<div id="mainnav">
<nav class="secondary-nav">
<div class="inner-wrap">
<ul>
<li>
<a href="/compound">By Compounds</a>
</li>
<li>
<a href="/queries/pockets">By Pockets</a>
</li>
</ul>
</div>
</nav>
</div>
<div class="inner-wrap">
<nav class="breadcrumb breadNav" role="navigation">
<div class="breadNav-label">You are here</div>
<div aria-labelledby="breadcrumb-label">
{% block breadcrumb %} <a href="/compound/" class="breadNav-link">{{block.super}}</a> > By Pockets{% endblock %}
</div>
</nav>
<div id="main-wrapper" class="page">
<div id="main">
<div id="content" class="main-content">
<div class="section">
<main role="main">
<h1 class="page-title"> BY POCKETS </h1>
<div class="tabs"></div>
<div class="main__inner">
<div class="region region-content">
<div class="page-intro">
</div>
<div class="color-wrap">
<div class="region region-content">
<div class="block block-system block-system-main">
<div class="content">
<div class="view-content">
{% block form %}{% endblock %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main><!-- .site-main -->
</div>
</div>
</div><!-- div main -->
</div>
</div>
{% endblock %}
......@@ -11,17 +11,8 @@ urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^about$', views.about, name='about'),
url(r'^about/general/$', views.general, name='general'),
url(r'^about/pharmacology/$', views.pharmacology, name='pharmacology'),
url(r'^about/physicochemistry/$',
views.physicochemistry, name='physicochemistry'),
url(r'^about/drug-candidate/$',
views.drugCandidate, name='drug-candidate'),
url(r'^queries$', views.queries, name='queries'),
url(r'^queries/pockets/$', views.pockets, name='pockets'),
url(r'^biblio/(?P<source>\w{2})(?P<id_source>\w+)$', views.biblio_card, name='biblio_card'),
url(r'^biblio/$', views.biblio_list, name='biblio_list'),
url(r'^compound/$', views.compound_list, name='compound_list'),
url(r'^compound/(?P<compound_id>\w+)$', views.compound_card, name='compound_card'),
url(r'^compounds/$', views.compound_list, name='compound_list'),
url(r'^compounds/(?P<compound_id>\w+)$', views.compound_card, name='compound_card'),
url(r'^tutorials$', views.tutorials, name='tutorials'),
url(r'^admin-session$', views.adminSession, name='admin-session'),
url(r'^admin-session/add/(?P<step>.+)/$',
......
......@@ -24,29 +24,6 @@ def about(request):
def general(request):
return render(request, 'general.html')
def pharmacology(request):
return render(request, 'pharmacology.html')
def physicochemistry(request):
return render(request, 'physicochemistry.html')
def drugCandidate(request):
return render(request, 'drug-candidate.html')
def queries(request):
return render(request, 'queries.html')
def compounds(request):
return render(request, 'compound.html')
def pockets(request):
return render(request, 'pockets.html')
def tutorials(request):
return render(request, 'tutorials.html')
......@@ -160,21 +137,6 @@ class IppiWizard(NamedUrlSessionWizardView):
})
def biblio_list(request):
bibliographies = Bibliography.objects.all()
return render(request, 'biblio_list.html', {'bibliographies':bibliographies})
def biblio_card(request, source, id_source):
try:
bibliography = Bibliography.objects.get(source=source, id_source=id_source)
except Bibliography.DoesNotExist:
raise Http404("No bibliography data for %s:%s" % (source, id_source))
refs = RefCompoundBiblio.objects.filter(bibliography_id = bibliography.id)
tad_ppis = TestActivityDescription.objects.filter(biblio__source=source,biblio__id_source=id_source).select_related()
return render(request, 'biblio_card.html', {'bibliography': bibliography,
'compound_biblios': refs,
'tad_ppis': tad_ppis})
def process_cutoff_value(name, context, request):
context[name+'_max'] = str(int(math.ceil(float(Compound.objects.all().aggregate(Max(name))[name + '__max']))))
context[name+'_min'] = str(int(math.floor(float(Compound.objects.all().aggregate(Min(name))[name + '__min']))))
......
Supports Markdown
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