Skip to content

Add top level infrastructure for new extensions work

Frank Duncan requested to merge ots-newsletter-signup-extension into ots-main

Add a newsletter_signup field to the User class, with updates the the Profile page as well as wagtail admin pages.

This MR is a semi-example. The use case is real in that we have added this flag to ardc's user profile (see commit f5bf3e17), AND we would like to add it to future clients, however there are some stubs for things we don't do in ardc's branch.

The stubs include:

  • css to customize the new field
  • js to have a simple popup with the new field is checked
  • signals to watch the django saves to output a note about the signup happening (this would possibly get replaced by an email to the user)

Some other notes are that this is basically how we would have to open up the django/wagtail models to add things to them. There may be some interesting migration challenges as models move forward, but they should be handleable.

No tests are written, but they absolutely would need to be! This code depends on using underlying django mechanisms to achieve what it wants to. That may break as those assumptions change.

Overall, this should be a straightforward example. Please take a look, @james and @jbickel and give feedback!

Merge request reports

Loading