TACC / Core-CMS

The Core CMS codebase used by TACC Portals.
https://cep.tacc.utexas.edu
2 stars 1 forks source link

refactor: CMD-141 move email_management app #828

Closed wesleyboar closed 3 months ago

wesleyboar commented 3 months ago

Overview

Move the mail_management app to a new (temporary) location for Core-CMS common apps.

Temporary? What's the Plan? Why not do it right now? - Yes, temporary; until the WI team has more time to suffer the side effects of the plan. - Plan is to: 1. Rename `apps` to `/custom_apps` or `apps/custom`. 2. Update client apps accordingly. 3. (Maybe) Move `email_management` to `/apps`. - Not now, because [TACC/Core-CMS-Custom](https://github.com/TACC/Core-CMS-Custom) and [TACC/tup-ui](https://github.com/TACC/tup-ui) (and maybe even [TACC/Camino](https://github.com/TACC/Camino)) need to change to not break on rename of a directory that docker-compose files depend on.

Related

Changes

Testing

Regression test #817:

  1. Add a new form with an email field
  2. Submit form.
  3. Review Docker logs.
  4. Verify log sends email (text and html).

UI

Docker log ``` core_cms | Content-Type: multipart/alternative; core_cms | boundary="===============0499775380862410495==" core_cms | MIME-Version: 1.0 core_cms | Subject: Form Submission - Help core_cms | From: webmaster@localhost core_cms | To: wbomar@tacc.utexas.edu core_cms | Date: Thu, 28 Mar 2024 22:48:10 -0000 core_cms | Message-ID: <171166609008.9.7696401260088608234@core_cms> core_cms | core_cms | --===============0499775380862410495== core_cms | Content-Type: text/plain; charset="utf-8" core_cms | MIME-Version: 1.0 core_cms | Content-Transfer-Encoding: 7bit core_cms | core_cms | core_cms | core_cms | Form: Help core_cms | Date: 28th March 2024 17:48 core_cms | core_cms | core_cms | Email: core_cms | wbomar@tacc.utexas.edu core_cms | core_cms | core_cms | Sent via http://localhost:8000 core_cms | core_cms | --===============0499775380862410495== core_cms | Content-Type: text/html; charset="utf-8" core_cms | MIME-Version: 1.0 core_cms | Content-Transfer-Encoding: 7bit core_cms | core_cms | core_cms | core_cms | core_cms | core_cms | core_cms | Form Submission - Help core_cms | core_cms | core_cms |

Help

core_cms |

Date: 28th March 2024 17:48

core_cms | core_cms |

core_cms | Email:
core_cms | wbomar@tacc.utexas.edu core_cms |

core_cms | core_cms | Sent via localhost:8000/help/ core_cms | core_cms | core_cms | core_cms | --===============0499775380862410495==-- core_cms | core_cms | ------------------------------------------------------------------------------- core_cms | [DJANGO] DEBUG 2024-03-28 17:48:10,088 UTC apps portal.common_apps.email_management.apps.callback:45: received submission from Help core_cms | [DJANGO] DEBUG 2024-03-28 17:48:10,088 UTC apps portal.common_apps.email_management.apps.callback:46: core_cms | Content-Type: multipart/alternative; core_cms | boundary="===============8586361228230960461==" core_cms | MIME-Version: 1.0 core_cms | Subject: TACC Form Submission Received: Help core_cms | From: no-reply@tacc.utexas.edu core_cms | To: wbomar@tacc.utexas.edu core_cms | Date: Thu, 28 Mar 2024 22:48:10 -0000 core_cms | Message-ID: <171166609008.9.18151125752073781493@core_cms> core_cms | core_cms | --===============8586361228230960461== core_cms | Content-Type: text/plain; charset="utf-8" core_cms | MIME-Version: 1.0 core_cms | Content-Transfer-Encoding: 7bit core_cms | core_cms | core_cms | Greetings, core_cms | core_cms | You have successfully submitted a form on the example.com website. Thank you for your submission. core_cms | core_cms | Sincerely, core_cms | example.com Communications core_cms | core_cms | --===============8586361228230960461== core_cms | Content-Type: text/html; charset="utf-8" core_cms | MIME-Version: 1.0 core_cms | Content-Transfer-Encoding: 7bit core_cms | core_cms | core_cms |

Greetings,

core_cms |

core_cms | You have successfully submitted a form on the example.com website. Thank you for your submission. core_cms |

core_cms |

core_cms | Sincerely,
core_cms | example.com Communications core_cms |

core_cms | core_cms | --===============8586361228230960461==-- core_cms | core_cms | ------------------------------------------------------------------------------- core_cms | [DJANGO] INFO 2024-03-28 17:48:10,089 UTC basehttp django.server.log_message:212: "POST /forms/submit/ HTTP/1.1" 200 66 ```
wesleyboar commented 3 months ago

@R-Tomas-Gonzalez,

Are we making the same changes to TUP_CMS as well?

Ish. I might update https://github.com/TACC/tup-ui/pull/448 to match the move so it still works on a CMS image that has this change, but such a common_apps directory there in TUP-CMS would be transient; it will die after CMD-112 is done via setting instead of file.