From 05da439c7b948d8d3087630b1f4883a01327cfe0 Mon Sep 17 00:00:00 2001 From: "Hartung, Michael" <michael.hartung@uni-hamburg.de> Date: Wed, 19 Oct 2022 00:33:15 +0200 Subject: [PATCH] Drugst.One django template --- README.md | 91 +++---------- drugstone_template/db.sqlite3 | Bin 0 -> 131072 bytes .../drugstone_template/__init__.py | 0 .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 188 bytes .../__pycache__/settings.cpython-39.pyc | Bin 0 -> 2364 bytes .../__pycache__/urls.cpython-39.pyc | Bin 0 -> 1223 bytes .../__pycache__/wsgi.cpython-39.pyc | Bin 0 -> 613 bytes drugstone_template/drugstone_template/asgi.py | 16 +++ .../drugstone_template/settings.py | 120 ++++++++++++++++++ drugstone_template/drugstone_template/urls.py | 27 ++++ drugstone_template/drugstone_template/wsgi.py | 16 +++ drugstone_template/manage.py | 22 ++++ drugstone_template/my_app/__init__.py | 0 .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 176 bytes .../my_app/__pycache__/admin.cpython-39.pyc | Bin 0 -> 217 bytes .../my_app/__pycache__/apps.cpython-39.pyc | Bin 0 -> 452 bytes .../my_app/__pycache__/models.cpython-39.pyc | Bin 0 -> 214 bytes .../my_app/__pycache__/urls.cpython-39.pyc | Bin 0 -> 352 bytes .../my_app/__pycache__/views.cpython-39.pyc | Bin 0 -> 1381 bytes drugstone_template/my_app/admin.py | 3 + drugstone_template/my_app/apps.py | 6 + .../__pycache__/main.cpython-39.pyc | Bin 0 -> 614 bytes .../my_app/demo_software/main.py | 10 ++ .../my_app/migrations/__init__.py | 0 .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 187 bytes drugstone_template/my_app/models.py | 3 + drugstone_template/my_app/templates/home.html | 74 +++++++++++ drugstone_template/my_app/tests.py | 3 + drugstone_template/my_app/urls.py | 9 ++ drugstone_template/my_app/views.py | 23 ++++ drugstone_template/requirements.txt | 3 + 31 files changed, 352 insertions(+), 74 deletions(-) create mode 100644 drugstone_template/db.sqlite3 create mode 100644 drugstone_template/drugstone_template/__init__.py create mode 100644 drugstone_template/drugstone_template/__pycache__/__init__.cpython-39.pyc create mode 100644 drugstone_template/drugstone_template/__pycache__/settings.cpython-39.pyc create mode 100644 drugstone_template/drugstone_template/__pycache__/urls.cpython-39.pyc create mode 100644 drugstone_template/drugstone_template/__pycache__/wsgi.cpython-39.pyc create mode 100644 drugstone_template/drugstone_template/asgi.py create mode 100644 drugstone_template/drugstone_template/settings.py create mode 100644 drugstone_template/drugstone_template/urls.py create mode 100644 drugstone_template/drugstone_template/wsgi.py create mode 100755 drugstone_template/manage.py create mode 100644 drugstone_template/my_app/__init__.py create mode 100644 drugstone_template/my_app/__pycache__/__init__.cpython-39.pyc create mode 100644 drugstone_template/my_app/__pycache__/admin.cpython-39.pyc create mode 100644 drugstone_template/my_app/__pycache__/apps.cpython-39.pyc create mode 100644 drugstone_template/my_app/__pycache__/models.cpython-39.pyc create mode 100644 drugstone_template/my_app/__pycache__/urls.cpython-39.pyc create mode 100644 drugstone_template/my_app/__pycache__/views.cpython-39.pyc create mode 100644 drugstone_template/my_app/admin.py create mode 100644 drugstone_template/my_app/apps.py create mode 100644 drugstone_template/my_app/demo_software/__pycache__/main.cpython-39.pyc create mode 100644 drugstone_template/my_app/demo_software/main.py create mode 100644 drugstone_template/my_app/migrations/__init__.py create mode 100644 drugstone_template/my_app/migrations/__pycache__/__init__.cpython-39.pyc create mode 100644 drugstone_template/my_app/models.py create mode 100644 drugstone_template/my_app/templates/home.html create mode 100644 drugstone_template/my_app/tests.py create mode 100644 drugstone_template/my_app/urls.py create mode 100644 drugstone_template/my_app/views.py create mode 100644 drugstone_template/requirements.txt diff --git a/README.md b/README.md index e3d9da8..096bfec 100644 --- a/README.md +++ b/README.md @@ -1,92 +1,35 @@ -# template-django +# Drugst.One template-django +This is a lightweight template for a django server running a python application that produces a list of genes and displays the result in a webpage. For the network visualization, the Drugst.One application is used. Feel free to adapt this project to your needs! +## Get started -## Getting started +### 1. Installation -To make it easy for you to get started with GitLab, here's a list of recommended next steps. +Create a python environment callend '.env': -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! +`python -m venv .env` -## Add your files -- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: +Enter the environment on Mac/Linux: -``` -cd existing_repo -git remote add origin https://gitlab.rrz.uni-hamburg.de/cosy-bio/drugst.one/template-django.git -git branch -M main -git push -uf origin main -``` +`source .env/bin/activate` -## Integrate with your tools +Enter the environment on Windows: -- [ ] [Set up project integrations](https://gitlab.rrz.uni-hamburg.de/cosy-bio/drugst.one/template-django/-/settings/integrations) +`.env/Scripts/activate` -## Collaborate with your team +Install all required python packages: -- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) +`pip install -r requirements.txt` -## Test and Deploy -Use the built-in continuous integration in GitLab. +### 2. Start the development server -- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) +Change port according to your needs -*** +`python manage.py runserver 0.0.0.0:8000` -# Editing this README +### 3. Finish development -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. - -## Suggestions for a good README -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. - -## Name -Choose a self-explaining name for your project. - -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. - -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. - -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. - -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. - -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. - -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. - -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. - -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. - -## License -For open source projects, say how it is licensed. - -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. +Read up more in the official django documentation on how to go from the development to the production server: https://docs.djangoproject.com/en/4.1/ \ No newline at end of file diff --git a/drugstone_template/db.sqlite3 b/drugstone_template/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..b86c07fb06d3df5f98b35737ee43e17aea894c95 GIT binary patch literal 131072 zcmWFz^vNtqRY=P(%1ta$FlG>7U}R))P*7lCV31>AU;xn!P+-Ntz`z1!gD6H2K>*7! z=*7#hGB7YO^8W@Y6^BqD<|rNwfzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z z5TH*8hzj#EFfa&l2Qcs-=by%(!mr48jjxB#iT5w>Zr*ZU6Q1Wh^LfH}1i8<1w{i#2 z$4#TQjE2By2#kinXb6mkz-S1JhQMeDjE2C_2?1jvRt8yB$KurD;>`TKVgmyM!}!d+ z%#zH+93ulGBV9uST|)~6LnA9wb1M@QJwszN17k}MK~@IQaL2^bk_-a_L!<b_oRZX{ z_|oFkqWHATqT-VHyu{qp_}s*b_?*<d^pXthCK;QW7&-{BGKjjvOfrlwEl5c$NsTWk z%CD%5FGwxQ&4joMs|iNthDOHD{HzS3zAzIEpl(So$}cS-${9vRW(Jn-e5?$jp-@8% zETM*gJ(QD3q<;*}jm(VPcv%@lgJA|)AR7cSjhJvTG&C_X_vT?`5RHYIV-7W^EHNiD zC9x#Gs5m|`B_%$!s3^ZEJ~y?vI59o77;6w27+Y9aI&!lzh<d^dGm9@uEiBC}N{vs> z&nrpID=DcgNG*;xFfcH}W`u#IrG=4^6BjFks5i_AQ>c4DUWx|?P)>e&W?p<=X%5y@ zV_<1vU|{UP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<brh6P+^wY9C@jJ*9;nOMXo}`>aMQmSvEszi z+|<<4)WihgScnQSsFyGj8blh?0Ce|4)Pd3ym<3Ksqx1iSdRU|KqaiRF0;3@?8Umvs zFd71*Aut*OqaiRF0;3@?8UmvsF!aG_|9|Mm;iwNrLtr!nMnhmU1V%$(Gz3ONU^E0q zLtr!nMnhmU1V%%EPza3n{|SZAsQhRMjE2By2#kinXb6mkz-S1JhQMeDjE2By2#kin zXb24b5E$+M5B)eC^}%QejE2By2#kinXb6mkz-S1JhQMeDjE2By2#kinXb2Drfzkdy zp%5CC9}R)g5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fuSD)ybKHsZ2Vme{BQYh z@}J`0!#|(DYv}uG)CZ#>Fd71*Aut*OqaiRF0;3@?8UmvsFd71*Aut*OqaiR@LqM2~ zg+W#tdJ|hQl$K^?VNg|u-pm2I7pfSE&BMaNASw#FCIEE30xvTQgQz%&2R_|jh>3+k zR1w5Q+(RJ9$ig5l3%<rACqF$kucW9F)c<D?7_4D3>aNic7!85Z5Eu=C(GVC7fzc2c z4S~@R7!85Z5Eu=C(GVC70cwQ6==y(ZgyN_fqaiRF0;3@?8UmvsFd71*Aut*OqaiRF z0;3@?8UmvsFt|ftwEsW2<7d=$qaiRF0;3@?8UmvsFd71*Aut*OqaiRF0;3@?8Umvs IK#dRp0BQ~PRsaA1 literal 0 HcmV?d00001 diff --git a/drugstone_template/drugstone_template/__init__.py b/drugstone_template/drugstone_template/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/drugstone_template/drugstone_template/__pycache__/__init__.cpython-39.pyc b/drugstone_template/drugstone_template/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b1afc7562abc25b1fb98eb390aaab361f0f8981 GIT binary patch literal 188 zcmYe~<>g{vU|@JK(=QoBKL!!Vn2~{j!GVE+p_qk%fgyz<m_d`#ZzV$!NEku<O4JW6 zPAw|d&&^EE$kY!g%FjwoE-BVeDJo4bF3HbJ)h|iSEyzhMN!3lsO3X{oN65s(WUvXv e$7kkcmc+;F6;$5hu*uC&Da}c>16lnU<U{~~i!;># literal 0 HcmV?d00001 diff --git a/drugstone_template/drugstone_template/__pycache__/settings.cpython-39.pyc b/drugstone_template/drugstone_template/__pycache__/settings.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..13a82d586b30bb4332be685e868ca9df16fe1140 GIT binary patch literal 2364 zcmYe~<>g{vU|{H6=9j#mhk@ZSh=YvT7#J8F7#J9eS1>Rzq%cG=q%fv1<uK+lMKLil zq%x&4H#06^S;&yZn#CH$mcksxp28Bvk<Jjsna+^Hx`;7~E1e;QZ4qM>cM5wHPYOp0 zXF6jFOA1Jodl6$MV+zk4mUPA_-W1*_z7)O`{#3RU0cnO5!8uHsj8Xh4LMg(Tj447X zB4AP!Op0YPrn5u|q=-ierbt8yrLaT^r?5ncq)0}IrbtDJrAP-eXv!p-Gcqu6xnw2g zrROUYr<Rmt=A{=aq~#YWq!g8=7nkJcrN)<}<`(26mZT~a6y;~7CYR`Oak;1Fr4}WY zq^2k&RVt{bfVJx;rsQVkDHN9^7L`C%sw<QhXXd3VK+QMNGt@KE<KlA5FH*?OFG^L& z%uCBJ%1tcE%+FKE&r>ML$ShV!%gjmDQ7BGL<;o~2DJZtm*H6h$F4lwC0X0`IIX_oF zHBa9}&rrW4zaTTYSRdwgeTeZT8L0|sr8zkYIhn;J3i)XWza{3SD3oNRW)>-wCFYc- z7L#IEQED2JMK3||ugQ3eB_OdRqsj^5Lfy=~;?(5QqEy{1bA!sPqzWx#6;n;)93%5I zEu+LLQ>`McVvEcwU9-wU+g#0DZ58uW+oIH*RKqgE(hyDdDiMe=ddc~DB}JJ@df-5< z5=Iv-Ey<{oMiT^SNzE%MsVqn>t`bL+EKV&h&dkrll*mmjE>28OEv}M6*HMyKl9>#O zj^Ze`+{*aGf&xwUDqX0m+{~1eoYeBfqEtPwe=|!e^@2ej&n&6*h09f$K$U~s2J#Nf z8G1<igCR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^7vjKNB+(6UTq1Uo8Jwgjm>_ g7?~K^{;~XL;br;H#LULX#>n=Ig_ng14B1#%0ep=zm;e9( literal 0 HcmV?d00001 diff --git a/drugstone_template/drugstone_template/__pycache__/urls.cpython-39.pyc b/drugstone_template/drugstone_template/__pycache__/urls.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e1012583a90dfe908c15a74b011074a258de0ddf GIT binary patch literal 1223 zcmYe~<>g{vU|<km?U%fbnStRkh=Yt-85kHG7#J9eV;C41QW&BbQW#U1au{=&qL>&# zY~~#1T$U)7T-GR7FrOudEtfrtosl7hHHEE(A&MiFC51heHHD*@v6(5AC51DUDT_0U z3(V$9<!EL~XO7}d;SOfd<Vmb%Vqi!qDormg$<IrTFG<ZU$Vn_oRR|68QE<-BOUq0z zElMoO%+KTE3du-SNGL7JDM&0SNiE7NPEg3nEG|(f$}cTREe2^QRw&6=D9cPOFV<6V z%P&&M%`Zw-$jnR2FUkcQp-_;Mnpm8wP@I}-#igL2ppa2gQc!HAub+~iT&$Opm6(^F zUr>~vm6}|lmz<xgpPHv{qGzaIl3$RST&xdLtY2D`Q>@SBT9KGrkds<$#pPC-mke?p z#9FYShI$H)DJcqxc?y}i1^GoKRtgGfMftf3xs~yW1qDz+B=ts6^&lUBJb>gwD+Psu z#F7jRb#)zx2EB~@+*BQfyu{p8TXhgyU6ac>C$YF#Hz~0=H3gywuPgFPGE$2`4$%V# z6wEmu`MIfJeMGtjq+TzvI38q(h9;VeJoA!sN>eiP(iIZ(!1jT>mYkoL2DZUaPr(x$ zFbX9Zpy&aqP1Vp;NP`BY6(qPI(V+(laF`=A!RDswfCB|=7BQ|(%E?dHSJzR1>ef&P z34qO2*VN>C2}<{xjJH@5Q*tx&G?{L(fI|EhJ5=>b##<aksVSL7smUeDj3Bj83}Q1e zFfcfSvIz$R149Wz3S%>4FoPzOUlor&B(n8EQB(xVO`43i*o#sNOH+$WRx%WU)c=ar z4=qkDD%Q`<OwP#E4}he*VtsgC(1+y(T}V(MWZ=03n-D0#^a?6(@xq)PUzDF;A_8(I z$h{1VMWDQ2#SV306*q(d4v;D~a46{CV(`=Cxy2qIpOT*(A0NdBae!WOeqKpYW>OKz zoLk&bL6Ch#%nS?+MJx;q3{e75;o^+^qLSp&lHwvZkQ~U)TP($yC8@VqKss)5BPDZi tcpwp+3=9mnIBatBQ%ZAE?LZ-2EWp6Pz{1bND8R_W#KFSD$iv9-7XU(7ZfpPm literal 0 HcmV?d00001 diff --git a/drugstone_template/drugstone_template/__pycache__/wsgi.cpython-39.pyc b/drugstone_template/drugstone_template/__pycache__/wsgi.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b869b1edaacc0d6630843cccc0d6bc6aa23224f3 GIT binary patch literal 613 zcmYe~<>g{vU|@JK(=T~0BLl-@5C<8vFfcGUFfcF_8!#|1q%cG=q%fv1<uFDurZA>3 z=P>0mM=>)pq%vl)EMQGxNnu^c#K@4!+{_TgmckUwpvhMCh$}qU-BTesKQApaT_G*M zNFk-DG`+YaKQA@DBsI4nC$S_|p`a)~D>b=9kBiH*L?N}JAip@ZSfL~%RRN+mF()T6 zDJNASu~;EdAvZszG$&OzC$%g!N1-gSC=)D|mzbNHqL7e~SWu9YnVeXXnV*-CpvT4K zmS3chn_rZwkeQd3Uz7`$P{_|yD9OkyR!GatN!3v(PEF;?C@Co@w$j&6$xklUOUX*i zOV5Y7DLFq^KQ&L^M9)w^Bfq>PUq2<aASb^vH#M(Bzq~j-Q=jW4D7^eM8E=WCr<TNn z#Nv^haZAj_%hAu>KR(zsB*fFtJviRi-zC(?wMrT@AoPk;OG+~H(u+0OZ?VV6r{pKc z$KPVgFTN!Jag$zheo?9($c7>&1_p*(?5TNWnML_|x44Q^OHxwP5=(PRZgC@7zLKE` z6un^LSFC<$acWVqer{%RMy7rMB+QHT;m**9#fL7$HiQg3rmzWtoTFDzd5gma5;b;= Tpya~Az`(%5$-%_K#K!~x`%%VV literal 0 HcmV?d00001 diff --git a/drugstone_template/drugstone_template/asgi.py b/drugstone_template/drugstone_template/asgi.py new file mode 100644 index 0000000..d79f9f0 --- /dev/null +++ b/drugstone_template/drugstone_template/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for drugstone_template project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "drugstone_template.settings") + +application = get_asgi_application() diff --git a/drugstone_template/drugstone_template/settings.py b/drugstone_template/drugstone_template/settings.py new file mode 100644 index 0000000..848d504 --- /dev/null +++ b/drugstone_template/drugstone_template/settings.py @@ -0,0 +1,120 @@ +""" +Django settings for drugstone_template project. + +Generated by 'django-admin startproject' using Django 4.1.2. + +For more information on this file, see +https://docs.djangoproject.com/en/4.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/4.1/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = "django-insecure-j70yjbx*3$5)3l27f*2az5*r*s8iz-6yq=m)m+$7e=rele1v1u" + +# 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", + 'my_app', +] + +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 = "drugstone_template.urls" + +TEMPLATES = [ + { + "BACKEND": "django.template.backends.django.DjangoTemplates", + "DIRS": [ + 'templates', + ], + "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 = "drugstone_template.wsgi.application" + + +# Database +# https://docs.djangoproject.com/en/4.1/ref/settings/#databases + +DATABASES = { + "default": { + "ENGINE": "django.db.backends.sqlite3", + "NAME": BASE_DIR / "db.sqlite3", + } +} + + +# Password validation +# https://docs.djangoproject.com/en/4.1/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/4.1/topics/i18n/ + +LANGUAGE_CODE = "en-us" + +TIME_ZONE = "UTC" + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/4.1/howto/static-files/ + +STATIC_URL = "static/" + +# Default primary key field type +# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" diff --git a/drugstone_template/drugstone_template/urls.py b/drugstone_template/drugstone_template/urls.py new file mode 100644 index 0000000..923153c --- /dev/null +++ b/drugstone_template/drugstone_template/urls.py @@ -0,0 +1,27 @@ +"""drugstone_template URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/4.1/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path, include +from django.shortcuts import redirect + +def redirect_root(request): + return redirect('/my_app/home') + +urlpatterns = [ + path('my_app/', include('my_app.urls')), + path('admin/', admin.site.urls), + path('', redirect_root), +] diff --git a/drugstone_template/drugstone_template/wsgi.py b/drugstone_template/drugstone_template/wsgi.py new file mode 100644 index 0000000..3f0f1d7 --- /dev/null +++ b/drugstone_template/drugstone_template/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for drugstone_template 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/4.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "drugstone_template.settings") + +application = get_wsgi_application() diff --git a/drugstone_template/manage.py b/drugstone_template/manage.py new file mode 100755 index 0000000..56ab276 --- /dev/null +++ b/drugstone_template/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "drugstone_template.settings") + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + 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?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == "__main__": + main() diff --git a/drugstone_template/my_app/__init__.py b/drugstone_template/my_app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/drugstone_template/my_app/__pycache__/__init__.cpython-39.pyc b/drugstone_template/my_app/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98994b378e77beade4ed10eba3e823b08b29e4b2 GIT binary patch literal 176 zcmYe~<>g{vU|@)w<(CYiAA<;F%*epN;K0DZP|U)>z>vZa%%I8Wx00a<B#a<_h3bbE zrxq3K=Vm5nWa<YL<!7ZPmlW%#6qTkIm*nTA>X)SE7UU$Br0S+*CFZ5)BV^)XGWxld k@reZm`tk9Zd6^~g@p=W7w>WHa^HWN5Qtd$2eFixT0H(GsH~;_u literal 0 HcmV?d00001 diff --git a/drugstone_template/my_app/__pycache__/admin.cpython-39.pyc b/drugstone_template/my_app/__pycache__/admin.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..879d223d60e0b702d4d0516c987e11dcffba9b73 GIT binary patch literal 217 zcmYe~<>g{vU|@)w<(F*Fz`*br#6iYP3=9ko3=9m#0t^fcDGVu$ISjdsQH+cXDNMl( zn#?ajYBd>eu_mVEX6E^6GDY#FWF_XM=j$cs=am#?CKZ7USjkYt%)kI4eg)}=7N-^! z>*r=BXJqOJ6y;~7CYKcJrxcZ@7nkJcrRtZY<`(26mZa)JOhU-S!({YxE8`Oj3iQF2 Z>J?Pp;;_lhPbtkwwPR#pVE7Dj69B*IIf4KH literal 0 HcmV?d00001 diff --git a/drugstone_template/my_app/__pycache__/apps.cpython-39.pyc b/drugstone_template/my_app/__pycache__/apps.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ce27f5b8b5f6605052e8fdd01b4e8b8464cf1059 GIT binary patch literal 452 zcmYe~<>g{vU|@)!<(J&gz`*br#6iX^3=9ko3=9m#3JeSkDGVu$ISjdsQH+cX?hGkR zDa<VlDa@&i&CF3uDJ;PZnyfEDdNmnuaXJ<hIOpf3Wu_;CM36Bf%tR3e28L9ID8>|q zD5ey~DCQKVD3%oFU<OT=Tim{ta09AjQ?e5C()0CFlJs)(Q&Mw^^_()(9ZO5{-7-^i zQf{&3R>mh56!>Yf-r|Ul&r8frjgP;@6(66QpHi9wV)Mku7nUaGKxKqdQqvMkb4ub9 zOH1<O)4)csfaF#(6oG;QO#BMe4=qkDD%Q`<OwP#E4=BpdN=+^))=w!aO)oCV&r8)W zNzE<DNi0d#g*Xl&6AzQohqy~Wv7n$>ub{GsnSp@;6q>~#f`gHT5iH`T$$X0&Vul__ iWf2nt0|QtF><}b^n}LDh7KaVQTXvvOEC#9NVFmy;DRcAy literal 0 HcmV?d00001 diff --git a/drugstone_template/my_app/__pycache__/models.cpython-39.pyc b/drugstone_template/my_app/__pycache__/models.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ea5300edc3a2b494fc378ea1bf2aee6a7285ee5 GIT binary patch literal 214 zcmYe~<>g{vU|@)w<(F*9z`*br#6iYP3=9ko3=9m#0t^fcDGVu$ISjdsQH+cXDNMl( zn#?ajYBd>evE}Bcq~;X+X)@j7Ovy^jOV8I!Nh$(qUdd3z!oUC_eg*4?7N-^!>*r=B zXJqOJ6y;~7CYKcJrxcZ@7nkJcrRtZY<`(26mZa)J3_-}m!({YxE8`Oj3iKfs>J?Pp V;;_lhPbtkwwPR#pVE7Dj5CATkIK}_~ literal 0 HcmV?d00001 diff --git a/drugstone_template/my_app/__pycache__/urls.cpython-39.pyc b/drugstone_template/my_app/__pycache__/urls.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..af3f0e4c44b75b3235779169eef1a30c2a65d745 GIT binary patch literal 352 zcmYe~<>g{vU|`s^(=Yir0|Ucj5C<8vF)%PVFfcF_yD%^?q%fo~<}l<kMlmunq%fs0 z=P>0mM=>)pq%x+kq%tpHS;)}Ll**XGio|AvvD2BOSX0=888kUwg3Q-syv0(GSd#IQ zk%56hlkpaZM}BT<SY~Q@l|V**ZmPabL1Iy2ZfZ$tkzExlSmYLipC;Qa?v$*=y!3p% z(xRN=A|?g~hFh#<nW^Q)MJymTdtz}sh<l5>v?!+_v7{umD6e=WLlMZ2VB%MxerR!O zQL%n*W^zWRen3%vR%&udv3^QXX?k%<eqO46NosCEPGU)_F2o{)Ogv0RKesYIv7kU7 j<OIEf%3B;Zx%nxjIjMFauM~r<;$h-p=3(Sv<oOE#6U$-* literal 0 HcmV?d00001 diff --git a/drugstone_template/my_app/__pycache__/views.cpython-39.pyc b/drugstone_template/my_app/__pycache__/views.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..efe7b84f5ee0815aa022debd7cb08446d3247856 GIT binary patch literal 1381 zcmYe~<>g{vU|@(l<(GVvnStRkh=Ytd85kHG7#J9ea~K#HQW#Pga~N_NqZk=MY^EHh zTxKQ)MuuFLC|0NlTNGO=+XD6!<`k9`mK4?$wiNahjyWuujG2rJ8No7~DO@SsDLiwS z7c!<Zr0~vRj^c1<Na0K2Z(&H`Pi1Uoj^a#V3TDt0cnNZcCgUxhkks6QoWzpUu*}qQ zzbLM}{FGGpqWsc=;#(~4sd=eY?8=s45XB1O7DutC=Hz4+6sKyk++r!IEJ(e@nw+1L zUlhfe4$|e9n45ZwwKyZOAoUhoab<2&eomE`OHpZhafzOPUaCS$R$^XyzCucBZhnX+ z^DVB-l+?VE%(TqZqFbybnI$=?QM`$zCHZNYIXSK=>8Zt<%(vLU1{dFAOU}<r%S^w; zo|jruo?n!m4DtaoW`=T#6&M&8QW>HcQy8L{QW&F{+ZoarQ<zeiTR5Uv+8J0FqF93& zG+AzOc;x4Ty<Nqbk)NBYmr;_NlgtP;1VphhFfgz%Ffed~qNs*}fuV$<nIVfYjUkhv zhH(jFA7d?34MP^w0_GIP6sCntwag_fH4Is-&5Vo;U=|aIRl{6VQNp%>y@aENxtVbx zV=YS!OAS*Bvke0%3R@UzSX>yI8EaWfI2UlGu+^}FqOycLh24gshG_v$3HL%qMur+t zlyUgo;w(rkO3Y0yNiA}V;!ID?OO4OTEG|KDGZO;?11kdqLomqAVhjun=?patv3#|R zHH@GHHiu~<Qz1(*gC<iED7ZA4ZZT!1++qa>@k#~|SI;1d1!Q!QAOiyfnD`Z>A6lGR zRIHzynVgZSA5fH^m6}{qte*mo*8IFw{Ss&z(uG7XLM9$2qn}$DpIA_!UzV9#UaVJ8 zd5g;i?DYKH0y~f^KZC-%N*5L*dg-Yp@yYplC8-r9@hOQViF!6U`N@en#ddlKeYaRa ziM6<hhk=1XllK;DacMzn(JcXVt+&{+%M**zi*GTfr<UAeEhx&&E4jr27GVLU!&}Tn zrFplQ!J=8k`FXckQ%Z9Sif;+Q{TE-HT2hjkmtK5}t+XH|u_RTK?G{UMYED{_Bm)D( zEq16wi})BA7@}A~fmd7v^3+PkTb%Ln$vKI|#qsgrpezyw1*!xC0|Q8HF-Q>uqYxt> zBNrnVBMT!RBL^cNqYxt(W0fS%pwMKy#StH$mzbLxAAgH0K0Y@;r8Eb`=82ClEKSUT z%J9O19;~zoWalkjsB4l_b8=uV0!OnN$XQ^w@xszODB*K3vM?2aL^QdgL?Cgi2Z=$D zCyO$Zi$KXON)i&edZ5sZFV0UZDNig))yqxH%!}eh5xd0#5-gGh*#^p_MT#Jn5{LlV o0tq6pgTMsHLAN+;ARe>><;-GGu<<YoF>)|VF$yp;{bgeV04n@={{R30 literal 0 HcmV?d00001 diff --git a/drugstone_template/my_app/admin.py b/drugstone_template/my_app/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/drugstone_template/my_app/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/drugstone_template/my_app/apps.py b/drugstone_template/my_app/apps.py new file mode 100644 index 0000000..ba2709a --- /dev/null +++ b/drugstone_template/my_app/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class MyAppConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "my_app" diff --git a/drugstone_template/my_app/demo_software/__pycache__/main.cpython-39.pyc b/drugstone_template/my_app/demo_software/__pycache__/main.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c12a7ad713abab4e10cd8f0514f1af3a93c0ede6 GIT binary patch literal 614 zcmYe~<>g{vU|_hR=AWF+$iVOz#6iZ)3=9ko3=9m#N(>APDGVu$ISjdsQH+cXDNHHM zEeugiDI6)RDQqo_QOqgq!3>(5FG0FB8E>%`r52}_Br}4zPz+*&%yR~rC&0kKkj{|8 zxQH=@p@yNANs=L$L6gZ(QzVMnH_|zZEg;0*HP|?c)x+7%*)WRLDahH;FpAkDBm}}X zieh$kb%|mQ4>62l2@3ErjbiZ&atw}Qaq|f=j$-k2@i2;F3kh{{G<1w&2?%lZi((0K zbT^7(^L2E0bvBM-a}IKKaterI@r!UXjA9E3^7J(_jbe2Sj_@&D$)L%2i!r+h<W?~8 zD_%deIJKx)KQ}WuBU3-1C_gJTxujS>rKmK$xFkO>Rlg)Pw;(66Bvm&hD={xUA0ZPD zlhMzuj87~m&`(Lt&5tk6Pb(=;EK1eSP0Y;GE2zB1mzk29SCW}l8K0h-ms-pM3Lz#? zurU>}F)%Q^WMyDrKnY8bBnX4Ul81qTp@gA^p_#Fkv4%02L6gx>lM$>@lj#;`L1Iy2 zZfZ$t(Ji*3)Z)^d60n~j1jyW5%tfVn93UG()-o`1FcyK*1jq<>1_lOAmMGTb^vsf^ lB9MJxQ^E2O1K?p)1U8DpCO1E&G$+*#6xU#H@Gx_*0084NgUJ8@ literal 0 HcmV?d00001 diff --git a/drugstone_template/my_app/demo_software/main.py b/drugstone_template/my_app/demo_software/main.py new file mode 100644 index 0000000..5416f7b --- /dev/null +++ b/drugstone_template/my_app/demo_software/main.py @@ -0,0 +1,10 @@ +from cgitb import reset + + +def identify_genes(k): + # replace this function with your algorithm + return ['MYC', 'PTGES3', 'HCFC1', 'BRCA1', 'HTT', 'BRCA2', 'EED', 'WT1', 'RPL5', 'NRAS', 'FLT3', 'IDH2', 'TUBA1A', 'PTEN', 'RAG2', 'MAGEC3', 'CREBBP', 'NXF1', 'TRIM25', 'ASXL1'][:k] + +def run(parameter=5): + result = identify_genes(parameter) + return result \ No newline at end of file diff --git a/drugstone_template/my_app/migrations/__init__.py b/drugstone_template/my_app/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/drugstone_template/my_app/migrations/__pycache__/__init__.cpython-39.pyc b/drugstone_template/my_app/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..faebf778eb3469da42f5341532f7fdbcc73a82d5 GIT binary patch literal 187 zcmYe~<>g{vU|@)w<(CYiAA<;F%*epN;K0DZP|U)>z>vZa%%I8Wx00a<B#a<_CFqA1 zrxq3K=Vm5nWa<YL<!7ZPmlW%#6qTkIm*nTA>X)SE7UU$Br0S+*CFZ5)BV^)XGWxld v@reZm`nj3uMTsSu`FX|q@$s2?nI-Y@dIgoYIBatBQ%ZAE?Lanv2DuOb<RCJy literal 0 HcmV?d00001 diff --git a/drugstone_template/my_app/models.py b/drugstone_template/my_app/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/drugstone_template/my_app/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/drugstone_template/my_app/templates/home.html b/drugstone_template/my_app/templates/home.html new file mode 100644 index 0000000..7343ca7 --- /dev/null +++ b/drugstone_template/my_app/templates/home.html @@ -0,0 +1,74 @@ +<!DOCTYPE html> +<html> + <head> + <script src="https://cdn.drugst.one/latest/drugstone.js"></script> + <link rel="stylesheet" href="https://cdn.drugst.one/latest/styles.css" /> + </head> + <style> + .container { + max-width: 1000px; + margin: 0 auto; + } + .drugstone-container { + max-width: 1000px; + margin: 0 auto; + } + </style> + <body> + <div class="container"> + <h1>My new app</h1> + <div> + <p> + With Drugst.One, any list of resulting genes from your program can be + visualized as a network. Additional functionalities like network based + drug repurposing and loading related diseases are also included! + </p> + <p> + This is a simple demo app including the django project structure and a + demo program that produces a list of genes. This result is then + visualized using Drugst.One with the default configuration. Feel free + to extend it to your needs. + </p> + </div> + + <form method="GET" id="run" action="/my_app/home/5"> + <label>Number of genes (max 20):</label> + <input type="number" id="k" value="5" onchange="updateAction()" /> + <button type="submit">Run program</button> + </form> + + <form method="GET" action="/my_app/home/"> + <button type="submit">Reset</button> + </form> + + {% if network %} + <div class="drugstone-container"> + <drugst-one + id="drugstone-component-id" + groups="{{ groups }}" + config="{{ config }}" + network="{{ network }}" + > + </drugst-one> + </div> + {% endif %} + + <h2>Gene list</h2> + <ul> + {% for gene in gene_list %} + <li>{{ gene }}</li> + {% empty %} + <li>Run the program to view the result</li> + {% endfor %} + </ul> + </div> + + <script> + function updateAction() { + const k = document.getElementById("k").value; + const action = `/my_app/home/${k}`; + document.getElementById("run").action = action; + } + </script> + </body> +</html> diff --git a/drugstone_template/my_app/tests.py b/drugstone_template/my_app/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/drugstone_template/my_app/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/drugstone_template/my_app/urls.py b/drugstone_template/my_app/urls.py new file mode 100644 index 0000000..4413b79 --- /dev/null +++ b/drugstone_template/my_app/urls.py @@ -0,0 +1,9 @@ +from django.urls import path + +from .views import HomeView + +urlpatterns = [ + path('home/<parameter>', HomeView.as_view()), + path('home/', HomeView.as_view()), + path('', HomeView.as_view()), +] \ No newline at end of file diff --git a/drugstone_template/my_app/views.py b/drugstone_template/my_app/views.py new file mode 100644 index 0000000..c7ba2e5 --- /dev/null +++ b/drugstone_template/my_app/views.py @@ -0,0 +1,23 @@ +from django.views.generic import TemplateView +import my_app.demo_software.main as demo +import json + +drugstone_settings = { + 'groups': json.dumps({'nodeGroups': {'Gene': {'type':'Gene','color':'#999999','groupName':'Genes','shape':'ellipse'}}}), + 'config': json.dumps({'identifier': 'symbol', 'title': 'Drugst.One django demo', 'autofillEdges': True}), + 'network': [] +} + +class HomeView(TemplateView): + template_name = 'home.html' + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + parameter = self.kwargs.get('parameter', False) + if parameter: + genes = demo.run(int(parameter)) + context['gene_list'] = genes + nodes = [{'id':gene, 'group': 'Gene'} for gene in genes] + drugstone_settings['network'] = json.dumps({'nodes': nodes}) + context.update(drugstone_settings) + return context diff --git a/drugstone_template/requirements.txt b/drugstone_template/requirements.txt new file mode 100644 index 0000000..609ce47 --- /dev/null +++ b/drugstone_template/requirements.txt @@ -0,0 +1,3 @@ +asgiref==3.5.2 +Django==4.1.2 +sqlparse==0.4.3 -- GitLab