Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize URL match patterns #801

Open
jsjiang opened this issue Nov 21, 2024 · 0 comments
Open

Reorganize URL match patterns #801

jsjiang opened this issue Nov 21, 2024 · 0 comments

Comments

@jsjiang
Copy link
Contributor

jsjiang commented Nov 21, 2024

Reorganize the URL match patterns defined in the urls.py file.

Organizing rules:

  1. Put URL match patterns in following categories
  • UI - RENDERED FROM TEMPLATES IN INFO REPOSITORY
  • UI - OTHER
  • SHARED BETWEEN UI AND API
  • API
  • OAI
  • ADMIN
  • Monitoring
  1. In each category, organize match patterns in alphabetic order
  2. For patterns with the same prefix, put more specific patterns before more general patterns

For example, change what we have now:

    django.urls.re_path("^create/?$",                      impl.ui_create.index,               name="ui_create.index"),
    django.urls.re_path("^create/simple$",                 impl.ui_create.simple,              name="ui_create.simple"),
    django.urls.re_path("^create/advanced$",               impl.ui_create.advanced,            name="ui_create.advanced"),

    django.urls.re_path("^dashboard/?$",                   impl.ui_admin.dashboard,            name="ui_admin.dashboard"),
    django.urls.re_path("^dashboard/ajax_table",           impl.ui_admin.ajax_dashboard_table, name="ui_admin.ajax_dashboard_table",),
    django.urls.re_path("^dashboard/csv_stats$", 

To:


    django.urls.re_path("^create/simple$",                 impl.ui_create.simple,              name="ui_create.simple"),
    django.urls.re_path("^create/advanced$",               impl.ui_create.advanced,            name="ui_create.advanced"),
    django.urls.re_path("^create/?$",                      impl.ui_create.index,               name="ui_create.index"),

    django.urls.re_path("^dashboard/ajax_table",           impl.ui_admin.ajax_dashboard_table, name="ui_admin.ajax_dashboard_table",),
   django.urls.re_path("^dashboard/csv_stats$",           impl.ui_admin.csvStats,             name="ui_admin.csvStats"),
 
    django.urls.re_path("^dashboard/?$",                   impl.ui_admin.dashboard,            name="ui_admin.dashboard"),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant