Addons-server: Move blocklist/* and addons/admin/* templates under admin/

Created on 23 Apr 2020  路  5Comments  路  Source: mozilla/addons-server

The follow templates are django admin templates but don't follow the usual pattern of being under admin/<app>/<model>_<...>:

  • src/olympia/addons/templates/addons/admin/file_inline.html
  • src/olympia/blocklist/templates/blocklist/block_change_form.html
  • src/olympia/blocklist/templates/blocklist/block_change_list.html
  • src/olympia/blocklist/templates/blocklist/blocklistsubmission_add_form.html
  • src/olympia/blocklist/templates/blocklist/blocklistsubmission_change_form.html
  • src/olympia/blocklist/templates/blocklist/multi_guid_input.html
  • src/olympia/blocklist/templates/blocklist/includes/enhanced_blocks.html
  • src/olympia/blocklist/templates/blocklist/includes/logs.html

Essentially I think the fix is something like:

  • Move src/olympia/blocklist/templates/blocklist/ to src/olympia/blocklist/templates/admin/blocklist/
  • Move src/olympia/addons/templates/addons/admin/file_inline.html to src/olympia/addons/templates/admin/addons/file_inline.html
  • Fix all code rendering/including those templates
  • Remove special cases r'^blocklist\/' and r'^addons\/admin\/' (and associated comment) from JINJA_EXCLUDE_TEMPLATE_PATHS in src/olympia/lib/settings_base.py
  • Remove special cases around those templates paths in PUENTE['DOMAIN_METHODS'] in src/olympia/lib/settings_base.py as well
code quality good first bug mentor assigned p4 verified fixed

All 5 comments

If this is your first contribution, please refer to https://wiki.mozilla.org/Add-ons/Contribute/Code on how to get started.

Mentor: @diox

Hello :)
Can I try to solve this issue?

Yes, it's all yours.

I submitted the code, but I need a rebase. A CI error has occurred because of locale.
I'll submit again after the rebase.

note: I submitted PR again after rebasing

I had a look at the blocklist and addons models and they continue to work as before.
I believe this is all that could be verified for this issue.

Was this page helpful?
0 / 5 - 0 ratings