Skip to content
Snippets Groups Projects
Commit 8a93ac1c authored by Hélène  BORGES's avatar Hélène BORGES
Browse files

Merge branch 'master' of gitlab.pasteur.fr:odoppelt/iPPIDB

parents 2be7ef2d 90db9d31
No related branches found
No related tags found
No related merge requests found
......@@ -595,11 +595,12 @@ display:block;
/* FORMS */
#Form{
width: 70%;
width: 80%;
border: 1px solid;
padding: 10px;
padding: 15px;
min-height: 150px;
text-align: center;
min-height: 350px;
}
form {
......@@ -627,6 +628,21 @@ button, input, select, textarea {
width: inherit;
}
.step {
width: 20%;
background-color: rgb(0, 0, 0);
color: rgb(255, 255, 255);
padding-left: 15px;
font-family: "PlayfairDisplayReg";
font-size: 24px;
display: block;
}
.step_desc {
padding: 15px;
margin-bottom: 15px;
}
/* CONTENT */
#content{
......
{% extends "add.html" %}
{% load i18n %}
{% block form %}
<div class="step">{{ wizard.steps.step1 }}. Bibliography </div>
<div id="Form">
<div class="step_desc">
<p>Based on the ID you have provided, we have iden2fied the following informa2on concerning your bibliographic source.
Please check that the information below is correct (Title, authors etc. ) and answer the few questions about the content of your bibliographic source.</p>
</div>
<form action="" method="post">
{% csrf_token %}
<table>
{{ wizard.management_form }}
{{ wizard.form.errors}}
{{ wizard.form.non_field_errors}}
{% block custom_form %}{% endblock %}
</form>
{% if wizard.form.forms %}
{{ wizard.form.management_form }}
{% for form in wizard.form.forms %}
{{ form }}
{% endfor %}
{% else %}
{{ wizard.form }}
{% endif %}
</table>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button>
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button>
{% endif %}
<input type="submit" value="{% trans "submit" %}"/>
</div>
{% endblock %}
\ No newline at end of file
{% extends "add.html" %}
{% load i18n %}
{% block form %}
<div class="step">{{ wizard.steps.step1 }}. Id </div>
<div id="Form">
<div class="step_desc">
<p> Please provide a valid ID for your bibliographic source, either a PubMed ID or WIPO ID. This ID should correspond to a bibliographic source in its final format. Therefore, PubMed articles in « Just Accepted » format should not be used as a source of data as they are not considered the official version of record. </p>
</div>
<form action="" method="post">
{% csrf_token %}
<table>
{{ wizard.management_form }}
{{ wizard.form.errors}}
{{ wizard.form.non_field_errors}}
{% block custom_form %}{% endblock %}
</form>
{% if wizard.form.forms %}
{{ wizard.form.management_form }}
{% for form in wizard.form.forms %}
{{ form }}
{% endfor %}
{% else %}
{{ wizard.form }}
{% endif %}
</table>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button>
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button>
{% endif %}
<input type="submit" value="{% trans "submit" %}"/>
</div>
{% endblock %}
\ No newline at end of file
{% extends "add.html" %}
{% load i18n %}
{% block form %}
<div class="step">{{ wizard.steps.step1 }}. PDB id </div>
<div id="Form">
<div class="step_desc">
<p>Please provide a valid PDB code that contains the structure of the full PPI complex for which you have data. If you have several PDB codes please list them all as they may contain information about homologous protein partners. The information within the PDB file will be used to prefill information of the corresponding proteins and domains participating to the PPI.</p>
</div>
<form action="" method="post">
{% csrf_token %}
<table>
{{ wizard.management_form }}
{{ wizard.form.errors}}
{{ wizard.form.non_field_errors}}
{% block custom_form %}{% endblock %}
</form>
{% if wizard.form.forms %}
{{ wizard.form.management_form }}
{% for form in wizard.form.forms %}
{{ form }}
{% endfor %}
{% else %}
{{ wizard.form }}
{% endif %}
</table>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button>
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button>
{% endif %}
<input type="submit" value="{% trans "submit" %}"/>
</div>
{% endblock %}
\ No newline at end of file
{% extends "add.html" %}
{% load i18n %}
{% block form %}
<div class="step">{{ wizard.steps.step1 }}. PPI </div>
<div id="Form">
<div class="step_desc">
<p>Now that you have created ALL complexes that participate to the formation of the PPI, you need to constuct your PPI by selecting your complex bound and if necessary you partner complex along with their stoichiometry in the PPI.</p>
</div>
<form action="" method="post">
{% csrf_token %}
<table>
{{ wizard.management_form }}
{{ wizard.form.errors}}
{{ wizard.form.non_field_errors}}
{% block custom_form %}{% endblock %}
</form>
{% if wizard.form.forms %}
{{ wizard.form.management_form }}
{% for form in wizard.form.forms %}
{{ form }}
{% endfor %}
{% else %}
{{ wizard.form }}
{% endif %}
</table>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button>
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button>
{% endif %}
<input type="submit" value="{% trans "submit" %}"/>
</div>
{% endblock %}
\ No newline at end of file
{% extends "add.html" %}
{% load i18n %}
{% block form %}
<div class="step">{{ wizard.steps.step1 }}. Proteins </div>
<div id="Form">
<div class="step_desc">
<p>Based on the PDB code(s) you have provided, we have identified a list of proteins and PFAM domains that may participate to the PPI. Please select ALL the proteins and PFAM domains that do participate to the formation of the full PPI complex.</p>
</div>
<form action="" method="post">
{% csrf_token %}
<table>
{{ wizard.management_form }}
{{ wizard.form.errors}}
{{ wizard.form.non_field_errors}}
{% block custom_form %}{% endblock %}
</form>
{% if wizard.form.forms %}
{{ wizard.form.management_form }}
{% for form in wizard.form.forms %}
{{ form }}
{% endfor %}
{% else %}
{{ wizard.form }}
{% endif %}
</table>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button>
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button>
{% endif %}
<input type="submit" value="{% trans "submit" %}"/>
</div>
{% endblock %}
\ No newline at end of file
......@@ -3,7 +3,7 @@
{% block title %}inhibitors of Protein-Protein Interaction Database{% endblock %}
{% block content %}
{% block content%}
<div id="mainnav">
<nav class="secondary-nav">
<div class="inner-wrap">
......@@ -55,13 +55,8 @@
<div class="block block-system block-system-main">
<div class="content">
<div class="view-content">
<div id="Form">
<form action="/admin-session/add" method="post">
{% csrf_token %}
{{ ID.as_p}}
<input type="submit" value="Next" />
</form>
</div>
{% block form %}{% endblock %}
</div>
</div>
......
{% extends "base.html" %}
{% load i18n %}
{% block head %}
{{ wizard.form.media }}
{% endblock %}
{% block content %}
<p>Step {{ wizard.steps.step1 }} of {{ wizard.steps.count }}</p>
<form action="" method="post">{% csrf_token %}
<table>
{{ wizard.management_form }}
{% if wizard.form.forms %}
{{ wizard.form.management_form }}
{% for form in wizard.form.forms %}
{{ form }}
{% endfor %}
{% else %}
{{ wizard.form }}
{% endif %}
</table>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button>
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "prev step" %}</button>
{% endif %}
<input type="submit" value="{% trans "submit" %}"/>
</form>
{% endblock %}
\ No newline at end of file
from django.conf.urls import url
from django.conf.urls import include,url
from . import views
from ippidb.forms import IdForm, BibliographyForm,PDBForm,ProteinDomainComplexForm,PpiForm
from ippidb.views import IppiWizard,FORMS
urlpatterns = [
url(r'^$', views.index, name='index'),
......@@ -8,5 +9,13 @@ urlpatterns = [
url(r'^query$', views.query, name='query'),
url(r'^tutorials$', views.tutorials, name='tutorials'),
url(r'^admin-session$', views.adminSession, name='admin-session'),
url(r'^admin-session/add$', views.add, name='add'),
url(r'^admin-session/add/$', IppiWizard.as_view(FORMS)),
]
from django.conf import settings
if settings.DEBUG:
import debug_toolbar
urlpatterns = [
url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
import ippidb
from django.shortcuts import render
from formtools.wizard.views import SessionWizardView
from django.http import HttpResponseRedirect
from formtools.wizard.views import SessionWizardView
from .forms import IdForm, BibliographyForm, PDBForm, ProteinForm, ProteinDomainComplexForm, PpiForm
def index(request):
......@@ -37,6 +38,27 @@ def add(request):
return render(request, 'add.html', {'ID': form})
FORMS = [("IdForm", ippidb.forms.IdForm),
("BibliographyForm", ippidb.forms.BibliographyForm),
("PDBForm", ippidb.forms.PDBForm),
("ProteinDomainComplexForm", ippidb.forms.ProteinDomainComplexForm),
("PpiForm", ippidb.forms.PpiForm)]
TEMPLATES = {"IdForm": "IdForm.html",
"BibliographyForm": "BibliographyForm.html",
"PDBForm": "PDBForm.html",
"ProteinDomainComplexForm": "ProteinDomainComplexForm.html",
"PpiForm": "PpiForm.html"}
class IppiWizard(SessionWizardView):
def get_template_names(self):
return [TEMPLATES[self.steps.current]]
def done(self, form_list, **kwargs):
return render(self.request, '/admin-session/add.html', {
'form_data': [form.cleaned_data for form in form_list],
})
# def add(request):
# # if this is a POST request we need to process the form data
# if request.method == 'POST':
......
......@@ -25,8 +25,10 @@ SECRET_KEY = '&qc$2x5p&!qwvu2r=)sjp*jgg8a7ss97g8lwpennmu(q9ty4o$'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
SHOW_TOOLBAR_CALLBACK = True
ALLOWED_HOSTS = ["127.0.0.1","localhost",]
INTERNAL_IPS= ["127.0.0.1","localhost",]
# Application definition
......@@ -41,6 +43,7 @@ INSTALLED_APPS = [
'bootstrap3',
'ippidb',
'formtools',
'debug_toolbar',
]
MIDDLEWARE = [
......@@ -51,6 +54,7 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
ROOT_URLCONF = 'ippisite.urls'
......
......@@ -5,4 +5,5 @@ django-extensions
pygraphviz
pydot
pyparsing
django-formtools
\ No newline at end of file
django-formtools
django-debug-toolbar
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment