Page MenuHomeSoftware Heritage

auth: Move related templates, views and urls into application folder
ClosedPublic

Authored by anlambert on Aug 19 2022, 3:44 PM.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D8270 (id=29859)

Could not rebase; Attempt merge onto d72784ac65...

Updating d72784ac..0d4331ea
Fast-forward
 Makefile.local                                     |   2 +
 .../e2e/add-forge-now-requests-moderation.cy.js    |   2 +-
 cypress/e2e/admin.cy.js                            |   8 +-
 cypress/support/e2e.js                             |   2 +-
 .../admin_views.py}                                |  11 +--
 .../api_views.py}                                  |   0
 .../templates/add-forge-common.html}               |   2 +-
 .../templates/add-forge-creation-form.html}        |   2 +-
 .../templates/add-forge-help.html}                 |   2 +-
 .../templates/add-forge-list.html}                 |   2 +-
 .../templates/add-forge-request-dashboard.html}    |   2 +-
 .../templates/add-forge-requests-moderation.html}  |   2 +-
 swh/web/add_forge_now/urls.py                      |  47 +++++++++
 swh/web/add_forge_now/views.py                     |  30 ++----
 swh/web/admin/mailmap.py                           |  16 ---
 swh/web/admin/urls.py                              |   9 +-
 swh/web/api/apiresponse.py                         |   2 +-
 swh/web/api/apiurls.py                             |   2 +-
 .../templates/api-endpoints.html}                  |   0
 swh/web/{templates/api => api/templates}/api.html  |   0
 .../{templates/api => api/templates}/apidoc.html   |   0
 swh/web/api/urls.py                                |   5 +-
 swh/web/api/views/utils.py                         |   6 +-
 swh/web/auth/migrations/0007_mailmap_django_app.py |  29 ++++++
 swh/web/auth/models.py                             | 103 -------------------
 swh/web/{ => auth}/templates/login.html            |   0
 swh/web/{ => auth}/templates/logout.html           |   0
 .../auth => auth/templates}/profile.html           |   0
 swh/web/auth/urls.py                               |  52 ++++++++++
 swh/web/auth/views.py                              |  46 +--------
 swh/web/browse/browseurls.py                       |   2 +-
 swh/web/browse/urls.py                             |  14 +--
 swh/web/common/__init__.py                         |   6 --
 swh/web/common/swh_templatetags.py                 |   2 +-
 swh/web/common/utils.py                            |   4 +-
 swh/web/config.py                                  |  19 ++--
 swh/web/mailmap/__init__.py                        |   6 ++
 swh/web/{common => mailmap}/apps.py                |   8 +-
 swh/web/{auth => mailmap}/management/__init__.py   |   0
 .../management/commands/__init__.py                |   0
 .../management/commands/sync_mailmaps.py           |   2 +-
 swh/web/mailmap/migrations/0001_initial.py         |  88 +++++++++++++++++
 .../management => mailmap/migrations}/__init__.py  |   0
 swh/web/mailmap/models.py                          | 109 +++++++++++++++++++++
 swh/web/{ => mailmap}/templates/admin/mailmap.html |   0
 swh/web/mailmap/urls.py                            |  38 +++++++
 swh/web/{auth/mailmap.py => mailmap/views.py}      |  30 ++----
 swh/web/misc/metrics.py                            |   2 +-
 swh/web/misc/urls.py                               |   1 -
 swh/web/save_code_now/__init__.py                  |   6 ++
 .../admin_views.py}                                |  71 +++-----------
 .../origin_save.py => save_code_now/api_views.py}  |   2 +-
 swh/web/save_code_now/apps.py                      |  11 +++
 .../management}/__init__.py                        |   0
 .../management/commands}/__init__.py               |   0
 .../commands/refresh_savecodenow_statuses.py       |   4 +-
 .../migrations/0001_initial.py                     |   4 +-
 .../0002_saveoriginrequest_visit_date.py           |   2 +-
 .../0003_saveoriginrequest_loading_task_status.py  |   4 +-
 .../migrations/0004_auto_20190204_1324.py          |   2 +-
 .../0005_remove_duplicated_authorized_origins.py   |   4 +-
 .../migrations/0006_rename_origin_type.py          |   2 +-
 .../0007_save_request_task_status_fix_typo.py      |   4 +-
 .../0008_save-code-now_indexes_20210106_1327.py    |   2 +-
 .../0009_saveoriginrequest_visit_status.py         |   2 +-
 .../migrations/0010_saveoriginrequest_user_id.py   |   2 +-
 .../migrations/0011_saveoriginrequest_user_ids.py  |   2 +-
 .../migrations/0012_saveoriginrequest_note.py      |   2 +-
 swh/web/save_code_now/migrations/__init__.py       |   0
 swh/web/{common => save_code_now}/models.py        |   8 +-
 swh/web/{common => save_code_now}/origin_save.py   |  12 +--
 .../templates/admin/origin-save-common.html}       |   0
 .../templates/admin/origin-save-filters.html}      |   2 +-
 .../templates/admin/origin-save-requests.html}     |   2 +-
 .../templates}/origin-save-help.html               |   0
 .../templates}/origin-save-list.html               |   0
 .../templates}/origin-save.html                    |   2 +-
 swh/web/save_code_now/urls.py                      |  99 +++++++++++++++++++
 .../origin_save.py => save_code_now/views.py}      |  34 ++-----
 swh/web/settings/common.py                         |  44 +++++++--
 swh/web/templates/includes/top-navigation.html     |   4 +-
 swh/web/templates/layout.html                      |  22 +++--
 swh/web/tests/add_forge_now/__init__.py            |   0
 .../test_api_views.py}                             |   2 +-
 swh/web/tests/add_forge_now/test_app.py            |  33 +++++++
 swh/web/tests/add_forge_now/test_views.py          |   3 +-
 swh/web/tests/api/test_apidoc.py                   |  16 +--
 swh/web/tests/auth/test_migrations.py              |  16 +++
 swh/web/tests/auth/test_views.py                   |   2 +-
 swh/web/tests/conftest.py                          |  52 ++++++++--
 swh/web/tests/mailmap/__init__.py                  |   0
 swh/web/tests/mailmap/test_app.py                  |  32 ++++++
 swh/web/tests/{auth => mailmap}/test_mailmap.py    |   2 +-
 swh/web/tests/mailmap/test_migrations.py           |  15 +++
 swh/web/tests/misc/test_metrics.py                 |   6 +-
 swh/web/tests/save_code_now/__init__.py            |   0
 swh/web/tests/save_code_now/test_app.py            |  41 ++++++++
 .../test_django_command.py                         |   8 +-
 .../tests/{ => save_code_now}/test_migrations.py   |   2 +-
 .../{common => save_code_now}/test_origin_save.py  |  24 ++---
 .../test_origin_save_admin.py}                     |   6 +-
 .../test_origin_save_api.py}                       |  14 +--
 .../test_origin_save_views.py}                     |   6 +-
 swh/web/tests/test_config.py                       |  24 -----
 swh/web/tests/test_urls.py                         |  16 ++-
 swh/web/urls.py                                    |  19 ++--
 swh/web/utils/__init__.py                          |   0
 swh/web/utils/management/__init__.py               |   0
 swh/web/utils/management/commands/__init__.py      |   0
 swh/web/utils/management/commands/rename_app.py    |  64 ++++++++++++
 110 files changed, 971 insertions(+), 502 deletions(-)
 rename swh/web/{admin/add_forge_now.py => add_forge_now/admin_views.py} (80%)
 rename swh/web/{api/views/add_forge_now.py => add_forge_now/api_views.py} (100%)
 rename swh/web/{templates/add_forge_now/common.html => add_forge_now/templates/add-forge-common.html} (98%)
 rename swh/web/{templates/add_forge_now/creation_form.html => add_forge_now/templates/add-forge-creation-form.html} (99%)
 rename swh/web/{templates/add_forge_now/help.html => add_forge_now/templates/add-forge-help.html} (98%)
 rename swh/web/{templates/add_forge_now/list.html => add_forge_now/templates/add-forge-list.html} (94%)
 rename swh/web/{templates/add_forge_now/request-dashboard.html => add_forge_now/templates/add-forge-request-dashboard.html} (99%)
 rename swh/web/{templates/add_forge_now/requests-moderation.html => add_forge_now/templates/add-forge-requests-moderation.html} (97%)
 create mode 100644 swh/web/add_forge_now/urls.py
 delete mode 100644 swh/web/admin/mailmap.py
 rename swh/web/{templates/api/endpoints.html => api/templates/api-endpoints.html} (100%)
 rename swh/web/{templates/api => api/templates}/api.html (100%)
 rename swh/web/{templates/api => api/templates}/apidoc.html (100%)
 create mode 100644 swh/web/auth/migrations/0007_mailmap_django_app.py
 rename swh/web/{ => auth}/templates/login.html (100%)
 rename swh/web/{ => auth}/templates/logout.html (100%)
 rename swh/web/{templates/auth => auth/templates}/profile.html (100%)
 create mode 100644 swh/web/auth/urls.py
 create mode 100644 swh/web/mailmap/__init__.py
 rename swh/web/{common => mailmap}/apps.py (61%)
 rename swh/web/{auth => mailmap}/management/__init__.py (100%)
 rename swh/web/{auth => mailmap}/management/commands/__init__.py (100%)
 rename swh/web/{auth => mailmap}/management/commands/sync_mailmaps.py (98%)
 create mode 100644 swh/web/mailmap/migrations/0001_initial.py
 rename swh/web/{common/management => mailmap/migrations}/__init__.py (100%)
 create mode 100644 swh/web/mailmap/models.py
 rename swh/web/{ => mailmap}/templates/admin/mailmap.html (100%)
 create mode 100644 swh/web/mailmap/urls.py
 rename swh/web/{auth/mailmap.py => mailmap/views.py} (89%)
 create mode 100644 swh/web/save_code_now/__init__.py
 rename swh/web/{admin/origin_save.py => save_code_now/admin_views.py} (70%)
 rename swh/web/{api/views/origin_save.py => save_code_now/api_views.py} (99%)
 create mode 100644 swh/web/save_code_now/apps.py
 rename swh/web/{common/management/commands => save_code_now/management}/__init__.py (100%)
 rename swh/web/{common/migrations => save_code_now/management/commands}/__init__.py (100%)
 rename swh/web/{common => save_code_now}/management/commands/refresh_savecodenow_statuses.py (93%)
 rename swh/web/{common => save_code_now}/migrations/0001_initial.py (96%)
 rename swh/web/{common => save_code_now}/migrations/0002_saveoriginrequest_visit_date.py (92%)
 rename swh/web/{common => save_code_now}/migrations/0003_saveoriginrequest_loading_task_status.py (91%)
 rename swh/web/{common => save_code_now}/migrations/0004_auto_20190204_1324.py (92%)
 rename swh/web/{common => save_code_now}/migrations/0005_remove_duplicated_authorized_origins.py (85%)
 rename swh/web/{common => save_code_now}/migrations/0006_rename_origin_type.py (87%)
 rename swh/web/{common => save_code_now}/migrations/0007_save_request_task_status_fix_typo.py (90%)
 rename swh/web/{common => save_code_now}/migrations/0008_save-code-now_indexes_20210106_1327.py (91%)
 rename swh/web/{common => save_code_now}/migrations/0009_saveoriginrequest_visit_status.py (92%)
 rename swh/web/{common => save_code_now}/migrations/0010_saveoriginrequest_user_id.py (89%)
 rename swh/web/{common => save_code_now}/migrations/0011_saveoriginrequest_user_ids.py (90%)
 rename swh/web/{common => save_code_now}/migrations/0012_saveoriginrequest_note.py (88%)
 create mode 100644 swh/web/save_code_now/migrations/__init__.py
 rename swh/web/{common => save_code_now}/models.py (95%)
 rename swh/web/{common => save_code_now}/origin_save.py (99%)
 rename swh/web/{templates/admin/origin-save/common.html => save_code_now/templates/admin/origin-save-common.html} (100%)
 rename swh/web/{templates/admin/origin-save/filters.html => save_code_now/templates/admin/origin-save-filters.html} (98%)
 rename swh/web/{templates/admin/origin-save/requests.html => save_code_now/templates/admin/origin-save-requests.html} (99%)
 rename swh/web/{templates/misc => save_code_now/templates}/origin-save-help.html (100%)
 rename swh/web/{templates/misc => save_code_now/templates}/origin-save-list.html (100%)
 rename swh/web/{templates/misc => save_code_now/templates}/origin-save.html (99%)
 create mode 100644 swh/web/save_code_now/urls.py
 rename swh/web/{misc/origin_save.py => save_code_now/views.py} (78%)
 create mode 100644 swh/web/tests/add_forge_now/__init__.py
 rename swh/web/tests/{api/views/test_add_forge_now.py => add_forge_now/test_api_views.py} (99%)
 create mode 100644 swh/web/tests/add_forge_now/test_app.py
 create mode 100644 swh/web/tests/mailmap/__init__.py
 create mode 100644 swh/web/tests/mailmap/test_app.py
 rename swh/web/tests/{auth => mailmap}/test_mailmap.py (99%)
 create mode 100644 swh/web/tests/mailmap/test_migrations.py
 create mode 100644 swh/web/tests/save_code_now/__init__.py
 create mode 100644 swh/web/tests/save_code_now/test_app.py
 rename swh/web/tests/{common => save_code_now}/test_django_command.py (98%)
 rename swh/web/tests/{ => save_code_now}/test_migrations.py (98%)
 rename swh/web/tests/{common => save_code_now}/test_origin_save.py (98%)
 rename swh/web/tests/{admin/test_origin_save.py => save_code_now/test_origin_save_admin.py} (98%)
 rename swh/web/tests/{api/views/test_origin_save.py => save_code_now/test_origin_save_api.py} (98%)
 rename swh/web/tests/{misc/test_origin_save.py => save_code_now/test_origin_save_views.py} (96%)
 delete mode 100644 swh/web/tests/test_config.py
 create mode 100644 swh/web/utils/__init__.py
 create mode 100644 swh/web/utils/management/__init__.py
 create mode 100644 swh/web/utils/management/commands/__init__.py
 create mode 100644 swh/web/utils/management/commands/rename_app.py
Changes applied before test
commit 0d4331ea10286f6b90583dc643da723381677557
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jul 22 14:15:18 2022 +0200

    auth: Move related templates, views and urls into application folder
    
    Related to T4398

commit 84b044fe1269bf8fdc91493d63f4099f111b90a3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jul 22 13:44:25 2022 +0200

    api: Move templates into django application folder
    
    Related to T4398

commit 5ed3514caf5baeb03af4a28248776e61c95ba349
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Jul 21 14:59:09 2022 +0200

    add_forge_now: Move all features into a single django application
    
    Centralize all templates, views and urls related to add forge now into
    the add_forge_now django application.
    
    Related to T4398

commit dc2ecba5b6ef5c867fa313ffa4fbce11be0c319f
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Jul 19 11:43:40 2022 +0200

    save_code_now: Move feature into a dedicated django app
    
    Move all templates, views, urls and commands related to the save code now
    feature into its dedicated django application.
    
    Also introduce a new django command rename_app to easily rename a django
    application when developing or deploying.
    
    Previously the save code now models were located in the swh.web.common
    application that will be removed so that is why that application renaming
    to swh.web.save_code_now is mandatory to avoid errors when running migrations.
    
    Related to T4398

commit f58181edb8e859ae621921b002ff0c3b17bca016
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Jul 18 15:59:20 2022 +0200

    mailmap: Move feature into a dedicated django application
    
    Move all templates, views, urls and commands related to the mailmap
    feature into its dedicated django application.
    
    Please note that the initial migration will not perform any database
    operations as the tables have already been created by the swh.web.auth
    django application the mailmap feature was previously located at.
    
    Related to T4398

commit 0306c23d03783a1e5fdc898e76444dd2c534fbea
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Jul 18 15:17:38 2022 +0200

    Update swh-web django applications configuration and setup
    
    Towards reorganizing swh-web features into multiple django applications,
    introduce the following changes regarding their settings:
    
    - Declare a fixed set of base django apps and enable to add extra ones
      through configuration
    
    - Add application templates directory to django templates search paths
    
    - Automatically register URLs of selected django applications
    
    - Inject swh-web django app names in templates to check a feature is enabled
    
    Related to T4398

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1986/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1986/console

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 19 2022, 4:02 PM
Harbormaster failed remote builds in B30912: Diff 29859!

Build is green

Patch application report for D8270 (id=29867)

Could not rebase; Attempt merge onto d72784ac65...

Updating d72784ac..f135b35e
Fast-forward
 Makefile.local                                     |   2 +
 .../e2e/add-forge-now-requests-moderation.cy.js    |   2 +-
 cypress/e2e/admin.cy.js                            |   8 +-
 cypress/support/e2e.js                             |   2 +-
 .../admin_views.py}                                |  13 +--
 .../api_views.py}                                  |   0
 .../templates/add-forge-common.html}               |   2 +-
 .../templates/add-forge-creation-form.html}        |   2 +-
 .../templates/add-forge-help.html}                 |   2 +-
 .../templates/add-forge-list.html}                 |   2 +-
 .../templates/add-forge-request-dashboard.html}    |   2 +-
 .../templates/add-forge-requests-moderation.html}  |   2 +-
 swh/web/add_forge_now/urls.py                      |  47 +++++++++
 swh/web/add_forge_now/views.py                     |  30 ++----
 swh/web/admin/mailmap.py                           |  16 ---
 swh/web/admin/urls.py                              |   9 +-
 swh/web/api/apiresponse.py                         |   2 +-
 swh/web/api/apiurls.py                             |   2 +-
 .../templates/api-endpoints.html}                  |   0
 swh/web/{templates/api => api/templates}/api.html  |   0
 .../{templates/api => api/templates}/apidoc.html   |   0
 swh/web/api/urls.py                                |   5 +-
 swh/web/api/views/utils.py                         |   6 +-
 swh/web/auth/migrations/0007_mailmap_django_app.py |  29 ++++++
 swh/web/auth/models.py                             | 103 -------------------
 swh/web/{ => auth}/templates/login.html            |   0
 swh/web/{ => auth}/templates/logout.html           |   0
 .../auth => auth/templates}/profile.html           |   0
 swh/web/auth/urls.py                               |  52 ++++++++++
 swh/web/auth/views.py                              |  46 +--------
 swh/web/browse/browseurls.py                       |   2 +-
 swh/web/browse/urls.py                             |  14 +--
 swh/web/common/__init__.py                         |   6 --
 swh/web/common/swh_templatetags.py                 |   2 +-
 swh/web/common/utils.py                            |   4 +-
 swh/web/config.py                                  |  19 ++--
 swh/web/mailmap/__init__.py                        |   6 ++
 swh/web/{common => mailmap}/apps.py                |   8 +-
 swh/web/{auth => mailmap}/management/__init__.py   |   0
 .../management/commands/__init__.py                |   0
 .../management/commands/sync_mailmaps.py           |   2 +-
 swh/web/mailmap/migrations/0001_initial.py         |  88 +++++++++++++++++
 .../management => mailmap/migrations}/__init__.py  |   0
 swh/web/mailmap/models.py                          | 109 +++++++++++++++++++++
 swh/web/{ => mailmap}/templates/admin/mailmap.html |   0
 swh/web/mailmap/urls.py                            |  38 +++++++
 swh/web/{auth/mailmap.py => mailmap/views.py}      |  30 ++----
 swh/web/misc/metrics.py                            |   2 +-
 swh/web/misc/urls.py                               |   1 -
 swh/web/save_code_now/__init__.py                  |   6 ++
 .../admin_views.py}                                |  71 +++-----------
 .../origin_save.py => save_code_now/api_views.py}  |   2 +-
 swh/web/save_code_now/apps.py                      |  11 +++
 .../management}/__init__.py                        |   0
 .../management/commands}/__init__.py               |   0
 .../commands/refresh_savecodenow_statuses.py       |   4 +-
 .../migrations/0001_initial.py                     |   4 +-
 .../0002_saveoriginrequest_visit_date.py           |   2 +-
 .../0003_saveoriginrequest_loading_task_status.py  |   4 +-
 .../migrations/0004_auto_20190204_1324.py          |   2 +-
 .../0005_remove_duplicated_authorized_origins.py   |   4 +-
 .../migrations/0006_rename_origin_type.py          |   2 +-
 .../0007_save_request_task_status_fix_typo.py      |   4 +-
 .../0008_save-code-now_indexes_20210106_1327.py    |   2 +-
 .../0009_saveoriginrequest_visit_status.py         |   2 +-
 .../migrations/0010_saveoriginrequest_user_id.py   |   2 +-
 .../migrations/0011_saveoriginrequest_user_ids.py  |   2 +-
 .../migrations/0012_saveoriginrequest_note.py      |   2 +-
 swh/web/save_code_now/migrations/__init__.py       |   0
 swh/web/{common => save_code_now}/models.py        |   8 +-
 swh/web/{common => save_code_now}/origin_save.py   |  12 +--
 .../templates/admin/origin-save-common.html}       |   0
 .../templates/admin/origin-save-filters.html}      |   2 +-
 .../templates/admin/origin-save-requests.html}     |   2 +-
 .../templates}/origin-save-help.html               |   0
 .../templates}/origin-save-list.html               |   0
 .../templates}/origin-save.html                    |   2 +-
 swh/web/save_code_now/urls.py                      |  99 +++++++++++++++++++
 .../origin_save.py => save_code_now/views.py}      |  34 ++-----
 swh/web/settings/common.py                         |  44 +++++++--
 swh/web/templates/includes/top-navigation.html     |   4 +-
 swh/web/templates/layout.html                      |  22 +++--
 swh/web/tests/add_forge_now/__init__.py            |   0
 .../test_api_views.py}                             |   2 +-
 swh/web/tests/add_forge_now/test_app.py            |  33 +++++++
 swh/web/tests/add_forge_now/test_views.py          |   3 +-
 swh/web/tests/api/test_apidoc.py                   |  16 +--
 swh/web/tests/auth/test_migrations.py              |  16 +++
 swh/web/tests/auth/test_views.py                   |   2 +-
 swh/web/tests/conftest.py                          |  52 ++++++++--
 swh/web/tests/mailmap/__init__.py                  |   0
 swh/web/tests/mailmap/test_app.py                  |  32 ++++++
 swh/web/tests/{auth => mailmap}/test_mailmap.py    |   2 +-
 swh/web/tests/mailmap/test_migrations.py           |  15 +++
 swh/web/tests/misc/test_metrics.py                 |   6 +-
 swh/web/tests/save_code_now/__init__.py            |   0
 swh/web/tests/save_code_now/test_app.py            |  41 ++++++++
 .../test_django_command.py                         |   8 +-
 .../tests/{ => save_code_now}/test_migrations.py   |   2 +-
 .../{common => save_code_now}/test_origin_save.py  |  24 ++---
 .../test_origin_save_admin.py}                     |   6 +-
 .../test_origin_save_api.py}                       |  14 +--
 .../test_origin_save_views.py}                     |   6 +-
 swh/web/tests/test_config.py                       |  24 -----
 swh/web/tests/test_urls.py                         |  16 ++-
 swh/web/urls.py                                    |  19 ++--
 swh/web/utils/__init__.py                          |   0
 swh/web/utils/management/__init__.py               |   0
 swh/web/utils/management/commands/__init__.py      |   0
 swh/web/utils/management/commands/rename_app.py    |  64 ++++++++++++
 110 files changed, 972 insertions(+), 503 deletions(-)
 rename swh/web/{admin/add_forge_now.py => add_forge_now/admin_views.py} (77%)
 rename swh/web/{api/views/add_forge_now.py => add_forge_now/api_views.py} (100%)
 rename swh/web/{templates/add_forge_now/common.html => add_forge_now/templates/add-forge-common.html} (98%)
 rename swh/web/{templates/add_forge_now/creation_form.html => add_forge_now/templates/add-forge-creation-form.html} (99%)
 rename swh/web/{templates/add_forge_now/help.html => add_forge_now/templates/add-forge-help.html} (98%)
 rename swh/web/{templates/add_forge_now/list.html => add_forge_now/templates/add-forge-list.html} (94%)
 rename swh/web/{templates/add_forge_now/request-dashboard.html => add_forge_now/templates/add-forge-request-dashboard.html} (99%)
 rename swh/web/{templates/add_forge_now/requests-moderation.html => add_forge_now/templates/add-forge-requests-moderation.html} (97%)
 create mode 100644 swh/web/add_forge_now/urls.py
 delete mode 100644 swh/web/admin/mailmap.py
 rename swh/web/{templates/api/endpoints.html => api/templates/api-endpoints.html} (100%)
 rename swh/web/{templates/api => api/templates}/api.html (100%)
 rename swh/web/{templates/api => api/templates}/apidoc.html (100%)
 create mode 100644 swh/web/auth/migrations/0007_mailmap_django_app.py
 rename swh/web/{ => auth}/templates/login.html (100%)
 rename swh/web/{ => auth}/templates/logout.html (100%)
 rename swh/web/{templates/auth => auth/templates}/profile.html (100%)
 create mode 100644 swh/web/auth/urls.py
 create mode 100644 swh/web/mailmap/__init__.py
 rename swh/web/{common => mailmap}/apps.py (61%)
 rename swh/web/{auth => mailmap}/management/__init__.py (100%)
 rename swh/web/{auth => mailmap}/management/commands/__init__.py (100%)
 rename swh/web/{auth => mailmap}/management/commands/sync_mailmaps.py (98%)
 create mode 100644 swh/web/mailmap/migrations/0001_initial.py
 rename swh/web/{common/management => mailmap/migrations}/__init__.py (100%)
 create mode 100644 swh/web/mailmap/models.py
 rename swh/web/{ => mailmap}/templates/admin/mailmap.html (100%)
 create mode 100644 swh/web/mailmap/urls.py
 rename swh/web/{auth/mailmap.py => mailmap/views.py} (89%)
 create mode 100644 swh/web/save_code_now/__init__.py
 rename swh/web/{admin/origin_save.py => save_code_now/admin_views.py} (70%)
 rename swh/web/{api/views/origin_save.py => save_code_now/api_views.py} (99%)
 create mode 100644 swh/web/save_code_now/apps.py
 rename swh/web/{common/management/commands => save_code_now/management}/__init__.py (100%)
 rename swh/web/{common/migrations => save_code_now/management/commands}/__init__.py (100%)
 rename swh/web/{common => save_code_now}/management/commands/refresh_savecodenow_statuses.py (93%)
 rename swh/web/{common => save_code_now}/migrations/0001_initial.py (96%)
 rename swh/web/{common => save_code_now}/migrations/0002_saveoriginrequest_visit_date.py (92%)
 rename swh/web/{common => save_code_now}/migrations/0003_saveoriginrequest_loading_task_status.py (91%)
 rename swh/web/{common => save_code_now}/migrations/0004_auto_20190204_1324.py (92%)
 rename swh/web/{common => save_code_now}/migrations/0005_remove_duplicated_authorized_origins.py (85%)
 rename swh/web/{common => save_code_now}/migrations/0006_rename_origin_type.py (87%)
 rename swh/web/{common => save_code_now}/migrations/0007_save_request_task_status_fix_typo.py (90%)
 rename swh/web/{common => save_code_now}/migrations/0008_save-code-now_indexes_20210106_1327.py (91%)
 rename swh/web/{common => save_code_now}/migrations/0009_saveoriginrequest_visit_status.py (92%)
 rename swh/web/{common => save_code_now}/migrations/0010_saveoriginrequest_user_id.py (89%)
 rename swh/web/{common => save_code_now}/migrations/0011_saveoriginrequest_user_ids.py (90%)
 rename swh/web/{common => save_code_now}/migrations/0012_saveoriginrequest_note.py (88%)
 create mode 100644 swh/web/save_code_now/migrations/__init__.py
 rename swh/web/{common => save_code_now}/models.py (95%)
 rename swh/web/{common => save_code_now}/origin_save.py (99%)
 rename swh/web/{templates/admin/origin-save/common.html => save_code_now/templates/admin/origin-save-common.html} (100%)
 rename swh/web/{templates/admin/origin-save/filters.html => save_code_now/templates/admin/origin-save-filters.html} (98%)
 rename swh/web/{templates/admin/origin-save/requests.html => save_code_now/templates/admin/origin-save-requests.html} (99%)
 rename swh/web/{templates/misc => save_code_now/templates}/origin-save-help.html (100%)
 rename swh/web/{templates/misc => save_code_now/templates}/origin-save-list.html (100%)
 rename swh/web/{templates/misc => save_code_now/templates}/origin-save.html (99%)
 create mode 100644 swh/web/save_code_now/urls.py
 rename swh/web/{misc/origin_save.py => save_code_now/views.py} (78%)
 create mode 100644 swh/web/tests/add_forge_now/__init__.py
 rename swh/web/tests/{api/views/test_add_forge_now.py => add_forge_now/test_api_views.py} (99%)
 create mode 100644 swh/web/tests/add_forge_now/test_app.py
 create mode 100644 swh/web/tests/mailmap/__init__.py
 create mode 100644 swh/web/tests/mailmap/test_app.py
 rename swh/web/tests/{auth => mailmap}/test_mailmap.py (99%)
 create mode 100644 swh/web/tests/mailmap/test_migrations.py
 create mode 100644 swh/web/tests/save_code_now/__init__.py
 create mode 100644 swh/web/tests/save_code_now/test_app.py
 rename swh/web/tests/{common => save_code_now}/test_django_command.py (98%)
 rename swh/web/tests/{ => save_code_now}/test_migrations.py (98%)
 rename swh/web/tests/{common => save_code_now}/test_origin_save.py (98%)
 rename swh/web/tests/{admin/test_origin_save.py => save_code_now/test_origin_save_admin.py} (98%)
 rename swh/web/tests/{api/views/test_origin_save.py => save_code_now/test_origin_save_api.py} (98%)
 rename swh/web/tests/{misc/test_origin_save.py => save_code_now/test_origin_save_views.py} (96%)
 delete mode 100644 swh/web/tests/test_config.py
 create mode 100644 swh/web/utils/__init__.py
 create mode 100644 swh/web/utils/management/__init__.py
 create mode 100644 swh/web/utils/management/commands/__init__.py
 create mode 100644 swh/web/utils/management/commands/rename_app.py
Changes applied before test
commit f135b35ee5693105a316a6a9ecb0b0e1ad6bf5d1
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jul 22 14:15:18 2022 +0200

    auth: Move related templates, views and urls into application folder
    
    Related to T4398

commit d1cb35483689284c8799678af11d3e1c04acc7d5
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jul 22 13:44:25 2022 +0200

    api: Move templates into django application folder
    
    Related to T4398

commit 9808e3eb262b0d064dc18d97f2ab1c16e4b8e2a9
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Jul 21 14:59:09 2022 +0200

    add_forge_now: Move all features into a single django application
    
    Centralize all templates, views and urls related to add forge now into
    the add_forge_now django application.
    
    Related to T4398

commit dc2ecba5b6ef5c867fa313ffa4fbce11be0c319f
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Jul 19 11:43:40 2022 +0200

    save_code_now: Move feature into a dedicated django app
    
    Move all templates, views, urls and commands related to the save code now
    feature into its dedicated django application.
    
    Also introduce a new django command rename_app to easily rename a django
    application when developing or deploying.
    
    Previously the save code now models were located in the swh.web.common
    application that will be removed so that is why that application renaming
    to swh.web.save_code_now is mandatory to avoid errors when running migrations.
    
    Related to T4398

commit f58181edb8e859ae621921b002ff0c3b17bca016
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Jul 18 15:59:20 2022 +0200

    mailmap: Move feature into a dedicated django application
    
    Move all templates, views, urls and commands related to the mailmap
    feature into its dedicated django application.
    
    Please note that the initial migration will not perform any database
    operations as the tables have already been created by the swh.web.auth
    django application the mailmap feature was previously located at.
    
    Related to T4398

commit 0306c23d03783a1e5fdc898e76444dd2c534fbea
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Jul 18 15:17:38 2022 +0200

    Update swh-web django applications configuration and setup
    
    Towards reorganizing swh-web features into multiple django applications,
    introduce the following changes regarding their settings:
    
    - Declare a fixed set of base django apps and enable to add extra ones
      through configuration
    
    - Add application templates directory to django templates search paths
    
    - Automatically register URLs of selected django applications
    
    - Inject swh-web django app names in templates to check a feature is enabled
    
    Related to T4398

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1989/ for more details.

This revision is now accepted and ready to land.Aug 19 2022, 5:09 PM