forked from enviPath/enviPy
Bump Python Version to 3.12 Make use of "epauth" optional Cache `srs` property of rules to speed up apply Adjust view names for use of `reverse()` Fix Views for Scenario Attachments Added Simply Compare View/Template to identify differences between rdkit and ambit Make migrations consistent with tests + compare Fixes #76 Set default year for Scenario Modal Fix html tags for package description Added Tests for Pathway / Rule Added remove stereo for apply Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#132
100 lines
5.6 KiB
Python
100 lines
5.6 KiB
Python
from django.urls import path, re_path
|
|
from django.contrib.auth import views as auth_views
|
|
|
|
from . import views as v
|
|
|
|
UUID = '[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}'
|
|
|
|
urlpatterns = [
|
|
# Home
|
|
re_path(r'^$', v.index, name='index'),
|
|
|
|
# Login
|
|
re_path(r'^login', v.login, name='login'),
|
|
re_path(r'^logout', v.logout, name='logout'),
|
|
re_path(r'^register', v.register, name='register'),
|
|
|
|
# Built In views
|
|
path('password_reset/', auth_views.PasswordResetView.as_view(
|
|
template_name='static/password_reset_form.html'
|
|
), name='password_reset'),
|
|
|
|
path('password_reset/done/', auth_views.PasswordResetDoneView.as_view(
|
|
template_name='static/password_reset_done.html'
|
|
), name='password_reset_done'),
|
|
|
|
path('reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(
|
|
template_name='static/password_reset_confirm.html'
|
|
), name='password_reset_confirm'),
|
|
|
|
path('reset/done/', auth_views.PasswordResetCompleteView.as_view(
|
|
template_name='static/password_reset_complete.html'
|
|
), name='password_reset_complete'),
|
|
|
|
|
|
# Top level urls
|
|
re_path(r'^package$', v.packages, name='packages'),
|
|
re_path(r'^compound$', v.compounds, name='compounds'),
|
|
re_path(r'^rule$', v.rules, name='rules'),
|
|
re_path(r'^reaction$', v.reactions, name='reactions'),
|
|
re_path(r'^pathway$', v.pathways, name='pathways'),
|
|
re_path(r'^scenario$', v.scenarios, name='scenarios'),
|
|
re_path(r'^model$', v.models, name='model'),
|
|
re_path(r'^user$', v.users, name='users'),
|
|
re_path(r'^group$', v.groups, name='groups'),
|
|
re_path(r'^search$', v.search, name='search'),
|
|
|
|
|
|
# User Detail
|
|
re_path(rf'^user/(?P<user_uuid>{UUID})', v.user, name='user'),
|
|
# Group Detail
|
|
re_path(rf'^group/(?P<group_uuid>{UUID})$', v.group, name='group detail'),
|
|
|
|
# "in package" urls
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})$', v.package, name='package detail'),
|
|
# Compound
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/compound$', v.package_compounds, name='package compound list'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/compound/(?P<compound_uuid>{UUID})$', v.package_compound, name='package compound detail'),
|
|
# Compound Structure
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/compound/(?P<compound_uuid>{UUID})/structure$', v.package_compound_structures, name='package compound structure list'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/compound/(?P<compound_uuid>{UUID})/structure/(?P<structure_uuid>{UUID})$', v.package_compound_structure, name='package compound structure detail'),
|
|
# Rule
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/rule$', v.package_rules, name='package rule list'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/rule/(?P<rule_uuid>{UUID})$', v.package_rule, name='package rule detail'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/simple-ambit-rule/(?P<rule_uuid>{UUID})$', v.package_rule, name='package rule detail'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/simple-rdkit-rule/(?P<rule_uuid>{UUID})$', v.package_rule, name='package rule detail'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/parallel-rule/(?P<rule_uuid>{UUID})$', v.package_rule, name='package rule detail'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/sequential-rule/(?P<rule_uuid>{UUID})$', v.package_rule, name='package rule detail'),
|
|
# Reaction
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/reaction$', v.package_reactions, name='package reaction list'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/reaction/(?P<reaction_uuid>{UUID})$', v.package_reaction, name='package reaction detail'),
|
|
# # Pathway
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/pathway$', v.package_pathways, name='package pathway list'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/pathway/(?P<pathway_uuid>{UUID})$', v.package_pathway, name='package pathway detail'),
|
|
# Pathway Nodes
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/pathway/(?P<pathway_uuid>{UUID})/node$', v.package_pathway_nodes, name='package pathway node list'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/pathway/(?P<pathway_uuid>{UUID})/node/(?P<node_uuid>{UUID})$', v.package_pathway_node, name='package pathway node detail'),
|
|
# Pathway Edges
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/pathway/(?P<pathway_uuid>{UUID})/edge$', v.package_pathway_edges, name='package pathway edge list'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/pathway/(?P<pathway_uuid>{UUID})/edge/(?P<edge_uuid>{UUID})$', v.package_pathway_edge, name='package pathway edge detail'),
|
|
# Scenario
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/scenario$', v.package_scenarios, name='package scenario list'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/scenario/(?P<scenario_uuid>{UUID})$', v.package_scenario, name='package scenario detail'),
|
|
# Model
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/model$', v.package_models, name='package model list'),
|
|
re_path(rf'^package/(?P<package_uuid>{UUID})/model/(?P<model_uuid>{UUID})$', v.package_model,name='package model detail'),
|
|
|
|
re_path(r'^setting$', v.settings, name='settings'),
|
|
re_path(rf'^setting/(?P<setting_uuid>{UUID})', v.setting, name='setting'),
|
|
|
|
re_path(r'^indigo/info$', v.indigo, name='indigo_info'),
|
|
re_path(r'^indigo/aromatize$', v.aromatize, name='indigo_aromatize'),
|
|
re_path(r'^indigo/dearomatize$', v.dearomatize, name='indigo_dearomatize'),
|
|
re_path(r'^indigo/layout$', v.layout, name='indigo_layout'),
|
|
|
|
re_path(r'^depict$', v.depict, name='depict'),
|
|
|
|
# OAuth Stuff
|
|
path("o/userinfo/", v.userinfo, name="oauth_userinfo"),
|
|
]
|