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

Update URLs, models, codebase, and admin pages to use "service" instead of "office" #1582

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

lucasmarchd01
Copy link
Contributor

This PR addresses the need for consistency in our URL paths, models, and properties by changing all references from 'office/offices' to 'service/services'.

Changes

  1. URL Paths:

    • Updated all URL paths to use 'service/services' instead of 'office/offices'.
    • Created redirects to ensure backwards compatibility with old 'office/offices' URLs.
  2. Query Parameters:

    • Modified query parameters to replace 'office' with 'service'. For example:
      https://cantusdatabase.org/chant-search/?op=contains&keyword=&service=4166&genre=&cantus_id=&mode=&feast=&position=&melodies=
  3. Models and Properties:

    • Renamed the Office model to Service.
    • Renamed the .office property of BaseChant to .service.
  4. Django Admin:

    • Changed all references to 'office' to 'service' on the Django admin pages.

Note: the genre list page https://cantusdatabase.org/genres/ has been left as is until we decide whether to change "Mass / Office" to "Mass / Service"

Resolves #1401, Resolves #1402, Resolves #1581

… use 'service' instead of 'office'.

- change all URL paths to use 'service/services'. DDMAL#1401
- create redirects to ensure backwards compatibility with old 'office/offices' URLs. DDMAL#1401
- update query parameters to use 'service' instead of 'office'. DDMAL#1401
- rename the Office model to Service. DDMAL#1402
- rename .office property of BaseChant to .service. DDMAL#1402
- change all instances of 'office' to 'service' in the codebase. DDMAL#1402
- update all references to 'office' to 'service' on the Django admin pages. DDMAL#1581
Copy link
Contributor

@dchiller dchiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! This is amazing :)

One small comment on the redirects, but otherwise looks good.

django/cantusdb_project/main_app/views/redirect.py Outdated Show resolved Hide resolved
- fix corresponding tests from status code 302 to 301
@lucasmarchd01 lucasmarchd01 merged commit 9349505 into DDMAL:develop Aug 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants