From 241d383b97f84161a047dff61b422761eca79ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr> Date: Tue, 14 Feb 2017 13:57:07 +0100 Subject: [PATCH] first project commit --- ippisite/db.sqlite3 | Bin 0 -> 233472 bytes ippisite/ippidb/__init__.py | 0 ippisite/ippidb/admin.py | 5 + ippisite/ippidb/apps.py | 5 + ippisite/ippidb/migrations/0001_initial.py | 125 +++++ ippisite/ippidb/migrations/__init__.py | 0 ippisite/ippidb/models.py | 469 ++++++++++++++++++ ippisite/ippidb/templates/base.html | 36 ++ .../templates/ippidb/bibliography_detail.html | 19 + .../templates/ippidb/bibliography_form.html | 10 + .../templates/ippidb/bibliography_list.html | 11 + ippisite/ippidb/tests.py | 3 + ippisite/ippidb/urls.py | 11 + ippisite/ippidb/views.py | 26 + ippisite/ippidb/ws.py | 15 + ippisite/ippisite/__init__.py | 0 ippisite/ippisite/settings.py | 122 +++++ ippisite/ippisite/urls.py | 22 + ippisite/ippisite/wsgi.py | 16 + ippisite/manage.py | 22 + 20 files changed, 917 insertions(+) create mode 100644 ippisite/db.sqlite3 create mode 100644 ippisite/ippidb/__init__.py create mode 100644 ippisite/ippidb/admin.py create mode 100644 ippisite/ippidb/apps.py create mode 100644 ippisite/ippidb/migrations/0001_initial.py create mode 100644 ippisite/ippidb/migrations/__init__.py create mode 100644 ippisite/ippidb/models.py create mode 100644 ippisite/ippidb/templates/base.html create mode 100644 ippisite/ippidb/templates/ippidb/bibliography_detail.html create mode 100644 ippisite/ippidb/templates/ippidb/bibliography_form.html create mode 100644 ippisite/ippidb/templates/ippidb/bibliography_list.html create mode 100644 ippisite/ippidb/tests.py create mode 100644 ippisite/ippidb/urls.py create mode 100644 ippisite/ippidb/views.py create mode 100644 ippisite/ippidb/ws.py create mode 100644 ippisite/ippisite/__init__.py create mode 100644 ippisite/ippisite/settings.py create mode 100644 ippisite/ippisite/urls.py create mode 100644 ippisite/ippisite/wsgi.py create mode 100755 ippisite/manage.py diff --git a/ippisite/db.sqlite3 b/ippisite/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..d7af3c51bb79c322ce6fc7f3abdf063b5e007092 GIT binary patch literal 233472 zcmeI*X>1$WVFz%INQ$CF^4XTPT-laQNtPw9EQ`ZKl&reDTAB9Bw&?Y3IbCpv<VYHs zmw9-lMbd<FE;I>JG)0kqNrNIt(|l=Kq(xgKD6l}<q(P6g0g41Enx@Fnpa<Fy8x&2D zzBluRGrS~QP2|<;Pk3iJ?|#2GGn_Xwq;6chqLgLda=w_A%D#~0fJG22FZg^GizQ6| zo1y>duUF_Bo4!K-FPPr9dmFY){N#b1#&(c5S(-ECf3-L5G9VlR5P$##AOHafKmY;| zfB*y_0D+&OK>sW)%sc3&OOI>QLjHpM21%1a&p&uR;(5u_>3+lgZg<f2L)RbDNW35b z0SG_<0uX=z1Rwwb2>eV0M33FlKQgBj3Q9T|2n580l2gixlnDmJ=tLkmA%=aTcvcLa z4Ta7GrluoeFyyvd21e#ea;c=`bEPdZiDyI8XF{RyOf+=CWw-R*n3F2yRhnTsA!W*P zF;OY;MNZ1fiLA7q$jG^s@@hlnS~&qRB!(~d&~jeU%Zc)G9!eP{EtT`dQbJ0n6LPVb zFDA0IfzpaxYE@WpDm)`b=elWO3wmKwiK6_Vq7>ysDxWLMxpH}<AeR!fxxto2gv3B3 z`l6E-aak`SV(wQ)DwPwN{ECuG<SLm)P_<7%F&d6eztBa?xTu#AHkZMGRGWOE+_EF$ zbRa5*<{h+zMZJWOxdb^YDVc3(DQqwpeyNidaz`&D$O|dR#jK)^bmB1vDKI@1j)q>c z+bts(=gf>uk@{xy4{N*$=BpOkiZ>9UV-%XR*)3j5lg=tRwFv4-N2a);mqj<IJR9?t zMFb+EC<d&wh>=<m?KW^a9?>&1Q(-YOGuc5QXbx>#-8w^142a>VK>It=*xxNPPDjJy zOwdi9w{(#)3pr1|Kyu`F$ZwK=C+{F*Gzc#UKmY;|fB*y_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K+?C@+q^;g|5YYhsuYfw5l6HdvZ{;_Q?ZrcXwdFxIk%q7qUrSn<Im=kQe zt~$J;C_I`sA4pAE_<_?DGSl)vX-cr817lsYnm<ok9L}^H`Z0_i8SAMZs|=n+FT{`g z|GTqaq812100Izz00bZa0SG_<0uX?}(-gq>|DUEl>V^OWAOHafKmY;|fB*y_009W> zjsWie?~XHSfdB*`009U<00Izz00bZa0SG)z0o?z8n);|40uX=z1Rwwb2tWV=5P$## zAh0_EnE&sNGireV1Rwwb2tWV=5P$##AOHafJWT=2|DUEl>V^OWAOHafKmY;|fB*y_ z009W>jsWKWyW@;nAOHafKmY;|fB*y_009U<00K`_0Q3K+sgJrL009U<00Izz00bZa z0SG_<0=pxC-~ZnoXVd}#2tWV=5P$##AOHafKmY;|c$xyZ|Nk`gQ8xr2009U<00Izz q00bZa0SG`~cLZ?%e|MZw3j`nl0SG_<0uX=z1Rwwb2teRz3j7~m{q-dP literal 0 HcmV?d00001 diff --git a/ippisite/ippidb/__init__.py b/ippisite/ippidb/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ippisite/ippidb/admin.py b/ippisite/ippidb/admin.py new file mode 100644 index 00000000..c4cbdb92 --- /dev/null +++ b/ippisite/ippidb/admin.py @@ -0,0 +1,5 @@ +from django.contrib import admin + +from .models import Bibliography + +admin.site.register(Bibliography) diff --git a/ippisite/ippidb/apps.py b/ippisite/ippidb/apps.py new file mode 100644 index 00000000..14866c28 --- /dev/null +++ b/ippisite/ippidb/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class IppidbConfig(AppConfig): + name = 'ippidb' diff --git a/ippisite/ippidb/migrations/0001_initial.py b/ippisite/ippidb/migrations/0001_initial.py new file mode 100644 index 00000000..fa2e4ae0 --- /dev/null +++ b/ippisite/ippidb/migrations/0001_initial.py @@ -0,0 +1,125 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-02-14 11:12 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Bibliography', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('source', models.CharField(choices=[('PM', 'PubMed article'), ('PT', 'Patent')], max_length=2, verbose_name='Bibliographic type')), + ('id_source', models.CharField(max_length=25, verbose_name='Bibliographic ID')), + ('title', models.CharField(max_length=300, verbose_name='Title')), + ('journal_name', models.CharField(max_length=50, verbose_name='Journal name')), + ('authors_list', models.CharField(max_length=500, verbose_name='Authors list')), + ('biblio_year', models.PositiveSmallIntegerField(verbose_name='Year')), + ('cytotox', models.BooleanField(verbose_name='Cytotoxicity data')), + ('in_silico', models.BooleanField(verbose_name='in silico study performed')), + ('in_vitro', models.BooleanField(verbose_name='in vitro study performed')), + ('in_vivo', models.BooleanField(verbose_name='in vivo study performed')), + ('in_cellulo', models.BooleanField(verbose_name='in cellulo study performed')), + ('pharmacokinetic', models.BooleanField(verbose_name='pharmacokinetic study performed')), + ('xray', models.BooleanField(verbose_name='contains xray data')), + ], + ), + migrations.CreateModel( + name='BindingSite', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + ), + migrations.CreateModel( + name='Complex', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('copy_nb', models.IntegerField(verbose_name='Number of copies')), + ], + ), + migrations.CreateModel( + name='Domain', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('pfam_acc', models.CharField(max_length=10, unique=True, verbose_name='Pfam Accession')), + ('pfam_id', models.CharField(max_length=20, verbose_name='Pfam Family Identifier')), + ('pfam_description', models.CharField(max_length=100, verbose_name='Pfam Description')), + ('domainfamily', models.CharField(max_length=25, verbose_name='')), + ], + ), + migrations.CreateModel( + name='MolecularFunction', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('go_id', models.CharField(max_length=10, unique=True, verbose_name='Gene Ontology ID')), + ('description', models.CharField(max_length=500, verbose_name='description')), + ], + ), + migrations.CreateModel( + name='Ppi', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('binding_site_id_1', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='binding_site_id_1', to='ippidb.BindingSite')), + ('binding_site_id_2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='binding_site_id_2', to='ippidb.BindingSite')), + ('complex_id_1', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cplx_id_1', to='ippidb.Complex')), + ('complex_id_2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cplx_id_2', to='ippidb.Complex')), + ], + ), + migrations.CreateModel( + name='PpiArchitecture', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('pdb_id', models.CharField(max_length=4, verbose_name='PDB ID')), + ('ppi_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ippidb.Ppi')), + ], + ), + migrations.CreateModel( + name='Protein', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uniprot_id', models.CharField(max_length=10, unique=True, verbose_name='Uniprot ID')), + ('recommended_name_long', models.CharField(max_length=75, verbose_name='Uniprot Recommended Name (long)')), + ('short_name', models.CharField(max_length=50, verbose_name='Short name')), + ('gene_name', models.CharField(max_length=30, unique=True, verbose_name='Gene name')), + ('entry_name', models.CharField(max_length=30, verbose_name='Entry name')), + ('molecular_functions', models.ManyToManyField(to='ippidb.MolecularFunction')), + ], + ), + migrations.CreateModel( + name='Taxonomy', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('taxonomy_id', models.DecimalField(decimal_places=0, max_digits=4, unique=True, verbose_name='NCBI TaxID')), + ('name', models.CharField(max_length=200, verbose_name='Organism name')), + ], + ), + migrations.AddField( + model_name='protein', + name='organism', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ippidb.Taxonomy'), + ), + migrations.AddField( + model_name='complex', + name='protein_id', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ippidb.Protein'), + ), + migrations.AddField( + model_name='bindingsite', + name='domain_id', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ippidb.Domain'), + ), + migrations.AddField( + model_name='bindingsite', + name='protein_id', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ippidb.Protein'), + ), + ] diff --git a/ippisite/ippidb/migrations/__init__.py b/ippisite/ippidb/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ippisite/ippidb/models.py b/ippisite/ippidb/models.py new file mode 100644 index 00000000..661967d8 --- /dev/null +++ b/ippisite/ippidb/models.py @@ -0,0 +1,469 @@ +from __future__ import unicode_literals + +from django.db import models +from django.forms import ModelForm + +class Bibliography(models.Model): + """ + Bibliography data table + """ + SOURCES = ( + ('PM', 'PubMed article'), + ('PT', 'Patent') + ) + source = models.CharField('Bibliographic type', max_length=2, choices=SOURCES) + id_source = models.CharField('Bibliographic ID', max_length=25) + title = models.CharField('Title', max_length=300) + journal_name = models.CharField('Journal name', max_length=50) + authors_list = models.CharField('Authors list', max_length=500) + biblio_year = models.PositiveSmallIntegerField('Year') + cytotox = models.BooleanField('Cytotoxicity data') + in_silico = models.BooleanField('in silico study performed') + in_vitro = models.BooleanField('in vitro study performed') + in_vivo = models.BooleanField('in vivo study performed') + in_cellulo = models.BooleanField('in cellulo study performed') + pharmacokinetic = models.BooleanField('pharmacokinetic study performed') + xray = models.BooleanField('contains xray data') + + def get_absolute_url(self): + return reverse('bibliography-detail', args=[str(self.id)]) + + def save(self, *args, **kwargs): + pubmed_info = get_pubmed_info(self.id_source) + self.title = pubmed_info['title'] + self.journal_name = pubmed_info['journal_name'] + self.authors_list = pubmed_info['authors_list'] + self.biblio_year = pubmed_info['biblio_year'] + super(Bibliography, self).save(*args, **kwargs) + +class BibliographyForm(ModelForm): + class Meta: + model = Bibliography + fields = '__all__' + +class Taxonomy(models.Model): + taxonomy_id = models.DecimalField('NCBI TaxID', unique=True, max_digits=4, decimal_places=0) + name = models.CharField('Organism name', max_length=200) + +class MolecularFunction(models.Model): + go_id = models.CharField('Gene Ontology ID', unique=True, max_length=10) # GO term id format: 'GO:0000000' + description = models.CharField('description', max_length=500) + +class Protein(models.Model): + uniprot_id = models.CharField('Uniprot ID', unique=True, max_length=10) + recommended_name_long = models.CharField('Uniprot Recommended Name (long)', max_length=75) + short_name = models.CharField('Short name', max_length=50) + gene_name = models.CharField('Gene name', unique=True, max_length=30) + entry_name = models.CharField('Entry name', max_length=30) + organism = models.ForeignKey('Taxonomy') + molecular_functions = models.ManyToManyField(MolecularFunction) + +class Domain(models.Model): + pfam_acc = models.CharField('Pfam Accession', max_length=10, unique=True) + pfam_id = models.CharField('Pfam Family Identifier', max_length=20) + pfam_description = models.CharField('Pfam Description', max_length=100) + domainfamily = models.CharField('', max_length=25) #TODO: what is this field? check database contents + +class BindingSite(models.Model): + protein_id = models.ForeignKey('Protein') + domain_id = models.ForeignKey('Domain') + +class Complex(models.Model): + protein_id = models.ForeignKey('Protein') + copy_nb = models.IntegerField('Number of copies') + +class Ppi(models.Model): + complex_id_1 = models.ForeignKey(Complex, related_name='cplx_id_1') + complex_id_2 = models.ForeignKey(Complex, related_name='cplx_id_2') + binding_site_id_1 = models.ForeignKey(BindingSite, related_name='binding_site_id_1') + binding_site_id_2 = models.ForeignKey(BindingSite, related_name='binding_site_id_2') + +class PpiArchitecture(models.Model): + ppi_id = models.ForeignKey(Ppi) + pdb_id = models.CharField('PDB ID', max_length=4) + +""" + + + + + +class Actionevidencetest(models.Model): + idcmpdaction = models.ForeignKey('Cmpdaction', models.DO_NOTHING, db_column='IDCmpdAction') # Field name made lowercase. + idtestactivity = models.ForeignKey('Testactivitydescription', models.DO_NOTHING, db_column='IDTestActivity') # Field name made lowercase. + nbcopycompound = models.IntegerField(db_column='NbCopyCompound', blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'actionEvidenceTest' + unique_together = (('idcmpdaction', 'idtestactivity'),) + + +class Actionevidencexray(models.Model): + idcmpdaction = models.ForeignKey('Cmpdaction', models.DO_NOTHING, db_column='IDCmpdAction') # Field name made lowercase. + codepdb = models.CharField(db_column='CodePDB', max_length=4) # Field name made lowercase. + nbcopycompound = models.IntegerField(db_column='NbCopyCompound') # Field name made lowercase. + idbindingsite = models.ForeignKey('Bindingsite', models.DO_NOTHING, db_column='IDBindingSite') # Field name made lowercase. + idbiblio = models.ForeignKey('Biblio', models.DO_NOTHING, db_column='IDBiblio', blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'actionEvidenceXRay' + unique_together = (('idcmpdaction', 'codepdb'),) + + +class Biblio(models.Model): + idbiblio = models.AutoField(db_column='IDBiblio', primary_key=True) # Field name made lowercase. + source = models.CharField(db_column='Source', max_length=7) # Field name made lowercase. + idsource = models.CharField(db_column='IDSource', max_length=25) # Field name made lowercase. + title = models.CharField(db_column='Title', max_length=300) # Field name made lowercase. + listauthor = models.CharField(db_column='ListAuthor', max_length=500) # Field name made lowercase. + yearbiblio = models.IntegerField(db_column='YearBiblio') # Field name made lowercase. + cytotox = models.CharField(db_column='Cytotox', max_length=1) # Field name made lowercase. + insilico = models.CharField(db_column='InSilico', max_length=1) # Field name made lowercase. + invitro = models.CharField(db_column='InVitro', max_length=1) # Field name made lowercase. + invivo = models.CharField(db_column='InVivo', max_length=1) # Field name made lowercase. + incellulo = models.CharField(db_column='InCellulo', max_length=1) # Field name made lowercase. + pharmacokinetic = models.CharField(db_column='Pharmacokinetic', max_length=1) # Field name made lowercase. + xray = models.CharField(db_column='XRay', max_length=1) # Field name made lowercase. + journalname = models.CharField(db_column='JournalName', max_length=50, blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'biblio' + unique_together = (('source', 'idsource'),) + + +class Bindingsite(models.Model): + idbindingsite = models.IntegerField(db_column='IDBindingSite') # Field name made lowercase. + idprotein = models.ForeignKey('Protein', models.DO_NOTHING, db_column='IDProtein') # Field name made lowercase. + iddomain = models.ForeignKey('Domain', models.DO_NOTHING, db_column='IDDomain') # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'bindingSite' + unique_together = (('idbindingsite', 'idprotein', 'iddomain'),) + + +class Bindingsiteevidence(models.Model): + idppi = models.ForeignKey('Ppi', models.DO_NOTHING, db_column='IDPPI') # Field name made lowercase. + idbindingsite = models.ForeignKey(Bindingsite, models.DO_NOTHING, db_column='IDBindingSite') # Field name made lowercase. + codepdb = models.CharField(db_column='CodePDB', max_length=4) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'bindingSiteEvidence' + unique_together = (('idppi', 'idbindingsite'),) + + +class Cmpdaction(models.Model): + idcmpdaction = models.AutoField(db_column='IDCmpdAction', primary_key=True) # Field name made lowercase. + idcomplexebound = models.ForeignKey('Complexe', models.DO_NOTHING, db_column='IDComplexeBound') # Field name made lowercase. + idcompound = models.ForeignKey('Compound', models.DO_NOTHING, db_column='IDCompound') # Field name made lowercase. + activationmode = models.CharField(db_column='ActivationMode', max_length=11) # Field name made lowercase. + modulationtype = models.CharField(db_column='ModulationType', max_length=10) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'cmpdAction' + + +class Cmpdactiveresult(models.Model): + idcompound = models.ForeignKey('Compound', models.DO_NOTHING, db_column='IDCompound') # Field name made lowercase. + idtestactivity = models.ForeignKey('Testactivitydescription', models.DO_NOTHING, db_column='IDTestActivity') # Field name made lowercase. + activitytype = models.CharField(db_column='ActivityType', max_length=5) # Field name made lowercase. + activity = models.DecimalField(db_column='Activity', max_digits=4, decimal_places=2) # Field name made lowercase. + pourcentinhib = models.IntegerField(db_column='PourcentInhib', blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'cmpdActiveResult' + unique_together = (('idcompound', 'idtestactivity', 'activitytype'),) + + +class Cmpdcytotoxresult(models.Model): + idcompound = models.ForeignKey('Compound', models.DO_NOTHING, db_column='IDCompound') # Field name made lowercase. + idtestcytotox = models.ForeignKey('Testcytotoxdescription', models.DO_NOTHING, db_column='IDTestCytotox') # Field name made lowercase. + toxicity = models.CharField(db_column='Toxicity', max_length=1) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'cmpdCytotoxResult' + unique_together = (('idcompound', 'idtestcytotox'),) + + +class Cmpdinactiveresult(models.Model): + idtestactivity = models.ForeignKey('Testactivitydescription', models.DO_NOTHING, db_column='IDTestActivity') # Field name made lowercase. + idcompound = models.ForeignKey('Compound', models.DO_NOTHING, db_column='IDCompound') # Field name made lowercase. + pourcentinhib = models.IntegerField(db_column='PourcentInhib', blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'cmpdInactiveResult' + unique_together = (('idtestactivity', 'idcompound'),) + + +class Cmpdpkresult(models.Model): + idcompound = models.ForeignKey('Compound', models.DO_NOTHING, db_column='IDCompound') # Field name made lowercase. + idtestpk = models.ForeignKey('Testpkdescription', models.DO_NOTHING, db_column='IDTestPK') # Field name made lowercase. + tolerated = models.CharField(db_column='Tolerated', max_length=1) # Field name made lowercase. + auc = models.IntegerField(db_column='AUC', blank=True, null=True) # Field name made lowercase. + clearance = models.DecimalField(db_column='Clearance', max_digits=7, decimal_places=3, blank=True, null=True) # Field name made lowercase. + cmax = models.DecimalField(db_column='Cmax', max_digits=7, decimal_places=3, blank=True, null=True) # Field name made lowercase. + oralbioavailability = models.IntegerField(db_column='OralBioavailability', blank=True, null=True) # Field name made lowercase. + tdemi = models.IntegerField(db_column='Tdemi', blank=True, null=True) # Field name made lowercase. + tmax = models.IntegerField(db_column='Tmax', blank=True, null=True) # Field name made lowercase. + voldistribution = models.DecimalField(db_column='VolDistribution', max_digits=5, decimal_places=2, blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'cmpdPKResult' + unique_together = (('idcompound', 'idtestpk'),) + + +class Complexe(models.Model): + idcomplexe = models.AutoField(db_column='IDComplexe', primary_key=True) # Field name made lowercase. + idprotein = models.ForeignKey('Protein', models.DO_NOTHING, db_column='IDProtein') # Field name made lowercase. + nbcopy = models.IntegerField(db_column='NbCopy') # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'complexe' + + +class Compound(models.Model): + idcompound = models.AutoField(db_column='IDCompound', primary_key=True) # Field name made lowercase. + canonicalsmile = models.CharField(db_column='CanonicalSmile', unique=True, max_length=250) # Field name made lowercase. + physchemfilter = models.CharField(db_column='PhysChemFilter', max_length=2) # Field name made lowercase. + htsfilter = models.CharField(db_column='HTSFilter', max_length=1) # Field name made lowercase. + ismacrocycle = models.CharField(db_column='IsMacrocycle', max_length=1) # Field name made lowercase. + aromaticratio = models.DecimalField(db_column='AromaticRatio', max_digits=3, decimal_places=2) # Field name made lowercase. + balabanindex = models.DecimalField(db_column='BalabanIndex', max_digits=3, decimal_places=2) # Field name made lowercase. + csp3ratio = models.DecimalField(db_column='Csp3Ratio', max_digits=3, decimal_places=2) # Field name made lowercase. + dhpetitjean = models.DecimalField(db_column='DhPetitjean', max_digits=4, decimal_places=2) # Field name made lowercase. + diamgraphnonhpetitjean = models.IntegerField(db_column='DiamGraphNonHPetitjean') # Field name made lowercase. + gcmolarrefractivity = models.DecimalField(db_column='GCMolarRefractivity', max_digits=5, decimal_places=2) # Field name made lowercase. + gpetitjean = models.DecimalField(db_column='GPetitjean', max_digits=3, decimal_places=2) # Field name made lowercase. + igpetitjean = models.DecimalField(db_column='IgPetitjean', max_digits=3, decimal_places=2) # Field name made lowercase. + logd = models.DecimalField(db_column='LogD', max_digits=4, decimal_places=2) # Field name made lowercase. + alogp = models.DecimalField(db_column='ALogP', max_digits=4, decimal_places=2) # Field name made lowercase. + meanatomvolvdw = models.DecimalField(db_column='MeanAtomVolVdW', max_digits=4, decimal_places=2) # Field name made lowercase. + molecularweight = models.DecimalField(db_column='MolecularWeight', max_digits=6, decimal_places=2) # Field name made lowercase. + nbacceptorh = models.IntegerField(db_column='NbAcceptorH') # Field name made lowercase. + nbaliphaticsamines = models.IntegerField(db_column='NbAliphaticsAmines') # Field name made lowercase. + nbaromaticbonds = models.IntegerField(db_column='NbAromaticBonds') # Field name made lowercase. + nbaromaticsether = models.IntegerField(db_column='NbAromaticsEther') # Field name made lowercase. + nbaromaticssssr = models.IntegerField(db_column='NbAromaticsSSSR') # Field name made lowercase. + nbatom = models.IntegerField(db_column='NbAtom') # Field name made lowercase. + nbatomnonh = models.IntegerField(db_column='NbAtomNonH') # Field name made lowercase. + nbbenzlikerings = models.IntegerField(db_column='NbBenzLikeRings') # Field name made lowercase. + nbbonds = models.IntegerField(db_column='NbBonds') # Field name made lowercase. + nbbondsnonh = models.IntegerField(db_column='NbBondsNonH') # Field name made lowercase. + nbbr = models.IntegerField(db_column='NbBr') # Field name made lowercase. + nbc = models.IntegerField(db_column='NbC') # Field name made lowercase. + nbchiralcenters = models.IntegerField(db_column='NbChiralCenters') # Field name made lowercase. + nbcircuits = models.IntegerField(db_column='NbCircuits') # Field name made lowercase. + nbcl = models.IntegerField(db_column='NbCl') # Field name made lowercase. + nbcsp2 = models.IntegerField(db_column='NbCsp2') # Field name made lowercase. + nbcsp3 = models.IntegerField(db_column='NbCsp3') # Field name made lowercase. + nbdonorh = models.IntegerField(db_column='NbDonorH') # Field name made lowercase. + nbdoublebonds = models.IntegerField(db_column='NbDoubleBonds') # Field name made lowercase. + nbf = models.IntegerField(db_column='NbF') # Field name made lowercase. + nbi = models.IntegerField(db_column='NbI') # Field name made lowercase. + nbmultbonds = models.IntegerField(db_column='NbMultBonds') # Field name made lowercase. + nbn = models.IntegerField(db_column='NbN') # Field name made lowercase. + nbo = models.IntegerField(db_column='NbO') # Field name made lowercase. + nbrings = models.IntegerField(db_column='NbRings') # Field name made lowercase. + nbrotatablebonds = models.IntegerField(db_column='NbRotatableBonds') # Field name made lowercase. + radiusgraphnonhpetitjean = models.IntegerField(db_column='RadiusGraphNonHPetitjean') # Field name made lowercase. + randicindex = models.DecimalField(db_column='RandicIndex', max_digits=4, decimal_places=2) # Field name made lowercase. + rdf070m = models.DecimalField(db_column='RDF070m', max_digits=5, decimal_places=2) # Field name made lowercase. + rotatablebondfraction = models.DecimalField(db_column='RotatableBondFraction', max_digits=3, decimal_places=2) # Field name made lowercase. + sumatompolar = models.DecimalField(db_column='SumAtomPolar', max_digits=5, decimal_places=2) # Field name made lowercase. + sumatomvolvdw = models.DecimalField(db_column='SumAtomVolVdW', max_digits=6, decimal_places=2) # Field name made lowercase. + surfacevdwpetitjean = models.DecimalField(db_column='SurfaceVDWPetitjean', max_digits=6, decimal_places=2) # Field name made lowercase. + thicknesspetitjean = models.DecimalField(db_column='ThicknessPetitjean', max_digits=4, decimal_places=2) # Field name made lowercase. + tpsa = models.DecimalField(db_column='TPSA', max_digits=5, decimal_places=2) # Field name made lowercase. + ui = models.DecimalField(db_column='Ui', max_digits=4, decimal_places=2) # Field name made lowercase. + volvdwpetitjean = models.DecimalField(db_column='VolVDWPetitjean', max_digits=7, decimal_places=2) # Field name made lowercase. + wienerindex = models.IntegerField(db_column='WienerIndex') # Field name made lowercase. + cmpdnamesh = models.CharField(db_column='CmpdNameSh', max_length=20, blank=True, null=True) # Field name made lowercase. + idpubchem = models.CharField(db_column='IdPubchem', max_length=10, blank=True, null=True) # Field name made lowercase. + idchemspider = models.CharField(db_column='IdChemspider', max_length=10, blank=True, null=True) # Field name made lowercase. + idchembl = models.CharField(db_column='IDChembl', max_length=30, blank=True, null=True) # Field name made lowercase. + cmpdiupacname = models.CharField(db_column='CmpdIUPACName', max_length=255, blank=True, null=True) # Field name made lowercase. + idmddrcompound = models.ForeignKey('Mddrcompound', models.DO_NOTHING, db_column='IDMDDRCompound', blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'compound' + + +class Disease(models.Model): + idppi = models.ForeignKey('Ppi', models.DO_NOTHING, db_column='IDPPI') # Field name made lowercase. + disease = models.CharField(db_column='Disease', max_length=30) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'disease' + unique_together = (('idppi', 'disease'),) + + +class DjangoMigrations(models.Model): + app = models.CharField(max_length=255) + name = models.CharField(max_length=255) + applied = models.DateTimeField() + + class Meta: +# managed = False + db_table = 'django_migrations' + + +class Domain(models.Model): + iddomain = models.AutoField(db_column='IDDomain', primary_key=True) # Field name made lowercase. + pfamid = models.CharField(db_column='PfamID', max_length=20) # Field name made lowercase. + pfamnumaccession = models.CharField(db_column='PfamNumAccession', unique=True, max_length=10) # Field name made lowercase. + domaindescription = models.CharField(db_column='DomainDescription', max_length=100) # Field name made lowercase. + domainfamily = models.CharField(db_column='DomainFamily', max_length=25) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'domain' + + +class Mddrcmpdactclass(models.Model): + idmddrcompound = models.ForeignKey('Mddrcompound', models.DO_NOTHING, db_column='IDMDDRCompound') # Field name made lowercase. + activityclass = models.CharField(db_column='ActivityClass', max_length=60) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'mDDRCmpdActClass' + unique_together = (('idmddrcompound', 'activityclass'),) + + +class Mddrcompound(models.Model): + idmddrcompound = models.IntegerField(db_column='IDMDDRCompound') # Field name made lowercase. + mddrcmpdname = models.CharField(db_column='MDDRCmpdName', max_length=40) # Field name made lowercase. + phasedvpmt = models.CharField(db_column='PhaseDvpmt', max_length=20) # Field name made lowercase. + canonicalsmile = models.CharField(db_column='CanonicalSmile', max_length=500, blank=True, null=True) # Field name made lowercase. + versionmddr = models.CharField(db_column='VersionMDDR', max_length=7) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'mDDRCompound' + unique_together = (('idmddrcompound', 'mddrcmpdname', 'phasedvpmt'),) + + +class Mddrsimilarity(models.Model): + idcompound = models.ForeignKey(Compound, models.DO_NOTHING, db_column='IDCompound') # Field name made lowercase. + idmddrcompound = models.ForeignKey(Mddrcompound, models.DO_NOTHING, db_column='IDMDDRCompound') # Field name made lowercase. + versionmddr = models.CharField(db_column='VersionMDDR', max_length=7) # Field name made lowercase. + tanimoto = models.DecimalField(db_column='Tanimoto', max_digits=6, decimal_places=5) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'mDDRSimilarity' + unique_together = (('idcompound', 'idmddrcompound', 'versionmddr'),) + + +class Ppi(models.Model): + idppi = models.AutoField(db_column='IDPPI', primary_key=True) # Field name made lowercase. + idcomplexe1 = models.ForeignKey(Complexe, models.DO_NOTHING, db_column='IDComplexe1', related_name='cplx_id_1') # Field name made lowercase. + idcomplexe2 = models.ForeignKey(Complexe, models.DO_NOTHING, db_column='IDComplexe2', related_name='cplx_id_2') # Field name made lowercase. + idbindingsite1 = models.ForeignKey(Bindingsite, models.DO_NOTHING, db_column='IDBindingSite1', related_name='bs_id_1') # Field name made lowercase. + idbindingsite2 = models.ForeignKey(Bindingsite, models.DO_NOTHING, db_column='IDBindingSite2', related_name='bs_id_2') # Field name made lowercase. + family = models.CharField(db_column='Family', max_length=25) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'ppi' + unique_together = (('idcomplexe1', 'idcomplexe2', 'idbindingsite1', 'idbindingsite2'),) + + +class Protein(models.Model): + idprotein = models.AutoField(db_column='IDProtein', primary_key=True) # Field name made lowercase. + numuniprot = models.CharField(db_column='NumUniprot', unique=True, max_length=10) # Field name made lowercase. + protnamelg = models.CharField(db_column='ProtNameLg', max_length=75) # Field name made lowercase. + protnamesh = models.CharField(db_column='ProtNameSh', max_length=50) # Field name made lowercase. + protalias = models.CharField(db_column='ProtAlias', unique=True, max_length=30) # Field name made lowercase. + protnamesp = models.CharField(db_column='ProtNameSp', max_length=30) # Field name made lowercase. + organism = models.CharField(db_column='Organism', max_length=80) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'protein' + + +class Refcmpdbiblio(models.Model): + idcompound = models.ForeignKey(Compound, models.DO_NOTHING, db_column='IDCompound') # Field name made lowercase. + idbiblio = models.ForeignKey(Biblio, models.DO_NOTHING, db_column='IDBiblio') # Field name made lowercase. + cmpdnameinbiblio = models.CharField(db_column='CmpdNameInBiblio', max_length=20, blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'refCmpdBiblio' + unique_together = (('idcompound', 'idbiblio'),) + + +class Refproteinfonction(models.Model): + idprotein = models.ForeignKey(Protein, models.DO_NOTHING, db_column='IDProtein') # Field name made lowercase. + protfonctionsp = models.CharField(db_column='ProtFonctionSP', max_length=200) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'refProteinFonction' + unique_together = (('protfonctionsp', 'idprotein'),) + + +class Testactivitydescription(models.Model): + idtestactivity = models.AutoField(db_column='IDTestActivity', primary_key=True) # Field name made lowercase. + idcomplexebound = models.ForeignKey(Complexe, models.DO_NOTHING, db_column='IDComplexeBound') # Field name made lowercase. + idbiblio = models.ForeignKey(Biblio, models.DO_NOTHING, db_column='IDBiblio') # Field name made lowercase. + idppi = models.ForeignKey(Ppi, models.DO_NOTHING, db_column='IDPPI', blank=True, null=True) # Field name made lowercase. + testnameactivity = models.CharField(db_column='TestNameActivity', max_length=40) # Field name made lowercase. + isprimary = models.CharField(db_column='IsPrimary', max_length=1) # Field name made lowercase. + protboundconstruct = models.CharField(db_column='ProtBoundConstruct', max_length=11) # Field name made lowercase. + testtype = models.CharField(db_column='TestType', max_length=5) # Field name made lowercase. + testmodulationtype = models.CharField(db_column='TestModulationType', max_length=13) # Field name made lowercase. + nbactivescmpdstot = models.IntegerField(db_column='NbActivesCmpdsTot') # Field name made lowercase. + conccmpds = models.DecimalField(db_column='ConcCmpds', max_digits=7, decimal_places=3, blank=True, null=True) # Field name made lowercase. + protocol = models.TextField(db_column='Protocol', blank=True, null=True) # Field name made lowercase. + concproteinbound = models.DecimalField(db_column='ConcProteinBound', max_digits=7, decimal_places=3, blank=True, null=True) # Field name made lowercase. + concprotein2 = models.DecimalField(db_column='ConcProtein2', max_digits=7, decimal_places=3, blank=True, null=True) # Field name made lowercase. + controlepos = models.CharField(db_column='ControlePos', max_length=50, blank=True, null=True) # Field name made lowercase. + controleneg = models.CharField(db_column='ControleNeg', max_length=50, blank=True, null=True) # Field name made lowercase. + cellline = models.CharField(db_column='CellLine', max_length=50, blank=True, null=True) # Field name made lowercase. + pepseq = models.CharField(db_column='PepSeq', max_length=100, blank=True, null=True) # Field name made lowercase. + marker = models.CharField(db_column='Marker', max_length=35, blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'testActivityDescription' + + +class Testcytotoxdescription(models.Model): + idtestcytotox = models.AutoField(db_column='IDTestCytotox', primary_key=True) # Field name made lowercase. + idbiblio = models.ForeignKey(Biblio, models.DO_NOTHING, db_column='IDBiblio') # Field name made lowercase. + testnamecytotox = models.CharField(db_column='TestNameCytotox', max_length=40) # Field name made lowercase. + cellline = models.CharField(db_column='CellLine', max_length=50) # Field name made lowercase. + conccmpd = models.DecimalField(db_column='ConcCmpd', max_digits=7, decimal_places=3, blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'testCytotoxDescription' + + +class Testpkdescription(models.Model): + idtestpk = models.AutoField(db_column='IDTestPK', primary_key=True) # Field name made lowercase. + idbiblio = models.ForeignKey(Biblio, models.DO_NOTHING, db_column='IDBiblio') # Field name made lowercase. + testnamepk = models.CharField(db_column='TestNamePK', max_length=40) # Field name made lowercase. + animal = models.CharField(db_column='Animal', max_length=100) # Field name made lowercase. + administrationmode = models.CharField(db_column='AdministrationMode', max_length=2, blank=True, null=True) # Field name made lowercase. + concentration = models.DecimalField(db_column='Concentration', max_digits=7, decimal_places=3, blank=True, null=True) # Field name made lowercase. + dose = models.DecimalField(db_column='Dose', max_digits=7, decimal_places=2, blank=True, null=True) # Field name made lowercase. + doseinterval = models.IntegerField(db_column='DoseInterval', blank=True, null=True) # Field name made lowercase. + + class Meta: +# managed = False + db_table = 'testPKDescription' +""" diff --git a/ippisite/ippidb/templates/base.html b/ippisite/ippidb/templates/base.html new file mode 100644 index 00000000..14a3dd00 --- /dev/null +++ b/ippisite/ippidb/templates/base.html @@ -0,0 +1,36 @@ +{% load bootstrap3 %} +<!DOCTYPE html> +<html lang="en"> +<head> + <link rel="stylesheet" href="{% bootstrap_css_url %}" /> + <title>IPPI-DB Maintenance {% block title %}{% endblock %}</title> +</head> + +<body> + <nav class="navbar navbar-default"> + <div class="container-fluid"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="#">IPPI-DB</a> + </div> + + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li class="active"><a href="/ippidb/biblio/">Bibliographic references list<span class="sr-only">(current)</span></a></li> + <li><a href="/ippidb/biblio/add/">Add a new bibliographic reference<span class="sr-only">(current)</span></a></li> + </ul> + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> + </nav> + <div id="content"> + {% block content %}{% endblock %} + </div> +</body> +</html> diff --git a/ippisite/ippidb/templates/ippidb/bibliography_detail.html b/ippisite/ippidb/templates/ippidb/bibliography_detail.html new file mode 100644 index 00000000..16ae53bf --- /dev/null +++ b/ippisite/ippidb/templates/ippidb/bibliography_detail.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block title %}- biblio detail for {{object.title}} by {{object.authors_list}}{% endblock %} + +{% block content %} + <p>{{ object.get_source_display }}</p> + <p>{{ object.id_source}}</p> + <p>{{ object.title }}</p> + <p>{{ object.journal_name }}</p> + <p>{{ object.authors_list }}</p> + <p>{{ object.biblio_year }}</p> + <p>{{ object.cytotox }}</p> + <p>{{ object.in_silico }}</p> + <p>{{ object.in_vitro }}</p> + <p>{{ object.in_vivo }}</p> + <p>{{ object.in_cellulo }}</p> + <p>{{ object.pharmacokinetic }}</p> + <p>{{ object.xray }}</p> +{% endblock %} diff --git a/ippisite/ippidb/templates/ippidb/bibliography_form.html b/ippisite/ippidb/templates/ippidb/bibliography_form.html new file mode 100644 index 00000000..a398e6ae --- /dev/null +++ b/ippisite/ippidb/templates/ippidb/bibliography_form.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% load bootstrap3 %} + +{% block title %}- biblio edition{% endblock %} + +{% block content %} + {% csrf_token %} + {% bootstrap_form form %} + <input type="submit" name="submit" value="Save" /> +{% endblock %} diff --git a/ippisite/ippidb/templates/ippidb/bibliography_list.html b/ippisite/ippidb/templates/ippidb/bibliography_list.html new file mode 100644 index 00000000..c19d5653 --- /dev/null +++ b/ippisite/ippidb/templates/ippidb/bibliography_list.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block title %}- biblios list{% endblock %} + +{% block content %} + {% for biblio in object_list %} + <li><a href="{{biblio.get_absolute_url}}">{{ biblio.get_source_display }} {{ biblio.id_source}} - {{ biblio.title }}</a></li> + {% empty %} + <li>No articles yet.</li> + {% endfor %} +{% endblock %} diff --git a/ippisite/ippidb/tests.py b/ippisite/ippidb/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/ippisite/ippidb/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/ippisite/ippidb/urls.py b/ippisite/ippidb/urls.py new file mode 100644 index 00000000..06e4b130 --- /dev/null +++ b/ippisite/ippidb/urls.py @@ -0,0 +1,11 @@ +from django.conf.urls import url + +from .views import BibliographyCreate, BibliographyUpdate, BibliographyDelete, BibliographyDetail, BibliographyList + +urlpatterns = [ + url(r'biblio/$', BibliographyList.as_view(), name='list'), + url(r'biblio/add/$', BibliographyCreate.as_view(), name='biblio-add'), + url(r'biblio/(?P<pk>[0-9]+)/$', BibliographyDetail.as_view(), name='biblio-detail'), + url(r'biblio/(?P<pk>[0-9]+)/edit/$', BibliographyUpdate.as_view(), name='biblio-update'), + url(r'biblio/(?P<pk>[0-9]+)/delete/$', BibliographyDelete.as_view(), name='biblio-delete'), +] diff --git a/ippisite/ippidb/views.py b/ippisite/ippidb/views.py new file mode 100644 index 00000000..83804259 --- /dev/null +++ b/ippisite/ippidb/views.py @@ -0,0 +1,26 @@ +from django.http import HttpResponse +from django.views.generic.edit import CreateView, UpdateView, DeleteView +from django.views.generic.detail import DetailView +from django.views.generic import ListView +from django.urls import reverse_lazy +from .models import Bibliography + +class BibliographyCreate(CreateView): + model = Bibliography + fields = '__all__' + +class BibliographyUpdate(UpdateView): + model = Bibliography + fields = '__all__' + +class BibliographyDelete(DeleteView): + model = Bibliography + success_url = reverse_lazy('biblio-list') + +class BibliographyDetail(DetailView): + model = Bibliography + fields = '__all__' + +class BibliographyList(ListView): + model = Bibliography + diff --git a/ippisite/ippidb/ws.py b/ippisite/ippidb/ws.py new file mode 100644 index 00000000..cc4807da --- /dev/null +++ b/ippisite/ippidb/ws.py @@ -0,0 +1,15 @@ +from bioservices.eutils import EUtils + +def get_pubmed_info(pmid): + eu = EUtils() + r = eu.EFetch('pubmed', pmid, retmode='dict', rettype='abstract') + article = r['PubmedArticleSet']['PubmedArticle']['MedlineCitation']['Article'] + title = article['ArticleTitle'] + authors_list = [a['LastName']+ ' ' + a['Initials'] for a in article['AuthorList']['Author']] + authors = ', '.join(authors_list) + journal_name = article['Journal']['Title'] + biblio_year = article['Journal']['JournalIssue']['PubDate']['Year'] + return {'title':title, + 'journal_name':journal_name, + 'biblio_year':biblio_year, + 'authors_list': authors} diff --git a/ippisite/ippisite/__init__.py b/ippisite/ippisite/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ippisite/ippisite/settings.py b/ippisite/ippisite/settings.py new file mode 100644 index 00000000..b7cf2bc6 --- /dev/null +++ b/ippisite/ippisite/settings.py @@ -0,0 +1,122 @@ +""" +Django settings for ippisite project. + +Generated by 'django-admin startproject' using Django 1.10.5. + +For more information on this file, see +https://docs.djangoproject.com/en/1.10/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.10/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '&qc$2x5p&!qwvu2r=)sjp*jgg8a7ss97g8lwpennmu(q9ty4o$' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'bootstrap3', + 'ippidb' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'ippisite.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'ippisite.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.10/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.10/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.10/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/ippisite/ippisite/urls.py b/ippisite/ippisite/urls.py new file mode 100644 index 00000000..1cacf0ad --- /dev/null +++ b/ippisite/ippisite/urls.py @@ -0,0 +1,22 @@ +"""ippisite URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.10/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import include, url +from django.contrib import admin + +urlpatterns = [ + url(r'^', include('ippidb.urls')), + url(r'^admin/', admin.site.urls), +] diff --git a/ippisite/ippisite/wsgi.py b/ippisite/ippisite/wsgi.py new file mode 100644 index 00000000..125cc998 --- /dev/null +++ b/ippisite/ippisite/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for ippisite project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ippisite.settings") + +application = get_wsgi_application() diff --git a/ippisite/manage.py b/ippisite/manage.py new file mode 100755 index 00000000..cbc3b8b3 --- /dev/null +++ b/ippisite/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ippisite.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) -- GitLab