diff options
author | Magnus Hagander | 2023-07-24 15:11:29 +0000 |
---|---|---|
committer | Magnus Hagander | 2023-07-24 15:22:40 +0000 |
commit | a8ccf2e22012010ab61652b66b13c8199cb12c3d (patch) | |
tree | 1e5bc4369be180358c088e770d4433b11726a578 /postgresqleu/confreg/admin.py | |
parent | 10d74003ee29a707a977a28f4a41e8a17825ec31 (diff) |
Move cfpintro, additionalintro and welcomemail from db to templates
This moves these large-text fields out of the database and into the
templates, which makes them a lot easier to edit there, and will make it
possible to use better HTML templating and such in the future.
cfpintro can be set either using a full template block override or using
a property called system.cfp.intro.
additionalintro can for now only be set as a property,
system.reg.additionalintro.
In passing also add a system.reg.voucherintro to override the default
text introducing what to do with vouchers.
As of this, require the template confreg/mail/welcomemail.txt to exist
in the skin directory to make it possible to send welcome emails.
Previously there was a default content for this file that just included
the database property as the entire text, but from this it requires a
complete file in the skin. The fact that it exists is validated when
trying to turn on either welcome email or tickets.
Also create a new model for ConferenceRemovedData where we persist the
current values for these fields, since the database content isn't under
version control, in case it needs to be recovered later.
Diffstat (limited to 'postgresqleu/confreg/admin.py')
-rw-r--r-- | postgresqleu/confreg/admin.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/postgresqleu/confreg/admin.py b/postgresqleu/confreg/admin.py index dd7f4828..1875c281 100644 --- a/postgresqleu/confreg/admin.py +++ b/postgresqleu/confreg/admin.py @@ -18,6 +18,7 @@ from .models import PendingAdditionalOrder from .models import VolunteerSlot from .models import AccessToken from .models import ConferenceNews +from .models import ConferenceRemovedData from postgresqleu.util.forms import ConcurrentProtectedModelForm @@ -513,6 +514,11 @@ class VolunteerSlotAdmin(admin.ModelAdmin): list_display = ('__str__', 'title') +class ConferenceRemovedDataAdmin(admin.ModelAdmin): + list_filter = ['urlname', ] + list_display = ('urlname', 'description') + + admin.site.register(ConferenceSeries, ConferenceSeriesAdmin) admin.site.register(Conference, ConferenceAdmin) admin.site.register(RegistrationClass, RegistrationClassAdmin) @@ -536,3 +542,4 @@ admin.site.register(PendingAdditionalOrder, PendingAdditionalOrderAdmin) admin.site.register(VolunteerSlot, VolunteerSlotAdmin) admin.site.register(AccessToken) admin.site.register(ConferenceNews) +admin.site.register(ConferenceRemovedData, ConferenceRemovedDataAdmin) |