Magnus Hagander [Tue, 19 Nov 2024 15:05:21 +0000 (16:05 +0100)]
Fix attendee email filtering
Commit
afe20375 was supposed to remove individual-attendee emails, but
instead removed regclasses-emails.
Magnus Hagander [Wed, 13 Nov 2024 13:52:29 +0000 (14:52 +0100)]
Add support for reportlab 3.6 to the dev_requirements.txt
AFAICT the system worked just fine with this before, but the
requirements.txt specifically locked in the version thats in Debian
Bullseye.
Generally it's still recommended to use the packaged version (which
worked with both Bullseye and Bookworm already).
Fixes #122 (even though nothing actually changes)
Magnus Hagander [Wed, 13 Nov 2024 13:25:44 +0000 (14:25 +0100)]
Don't crash on no-data passed to svg charts
This could cause a divide-by-zero in some cases. Instead render the text
"NO DATA". Normally, the entire svg would be exluded in this case, but
in case it's not this will at least work.
Magnus Hagander [Tue, 12 Nov 2024 16:20:09 +0000 (17:20 +0100)]
Filter out individual attendee mails on default view
The list of "all attendeemails" can get very long if we included
individual ones sometimes sent. So don't do that. Only include them if
they are sent to a group, or if there is >1 individual on it.
Magnus Hagander [Tue, 12 Nov 2024 14:32:46 +0000 (15:32 +0100)]
Handle jinja2 renamed context decorators
Jinja2 v3.0 renamed contextfilter to pass_context. Put some code in that
handles both the v3 and v2 name at the same time, as a first step
towards supporting jinja2 v3.
Magnus Hagander [Tue, 12 Nov 2024 10:05:36 +0000 (11:05 +0100)]
Add support for qrcode library, and make it default
The qrencode library we've been using is basically dead (and has been
for a while), so add support for the newer pure-python qrcode library.
We keep support for the qrencode one around, so we don't break things
on existing installs, but consider it deprecated and should eventually
be removed.
Fixes #123
Magnus Hagander [Tue, 12 Nov 2024 09:24:39 +0000 (10:24 +0100)]
Generate a fake payment link when previewing invoice
This way we get to see the qr code on the preview as well, even
though it can of course not be used. But it helps adjusting layouts.
Magnus Hagander [Wed, 6 Nov 2024 14:53:08 +0000 (15:53 +0100)]
Include invoice num in log of invoice created/canceled for regs
Magnus Hagander [Wed, 6 Nov 2024 11:18:19 +0000 (12:18 +0100)]
Replace a number of <input type="submit"> with <button type="submit">
This separates the value posted from the text on the button, which
*hopefully* will prevent the errors caused by people using browser
extensions that translate the site, thereby submitting buttons in german
and french for example.
This only touches buttons on the frontend side, at least for now.
Backend users are expected to not use such extensions. And we keep
setting the value to the same as before, so that if some skins have
completely overriden the forms and added their own HTML, it will
continue to work.
This will likely require some frontend skins to update their CSS rules
to match. Things will still work without such changes, but will not look
as good.
Hopefully fixes #150
Magnus Hagander [Wed, 6 Nov 2024 11:13:01 +0000 (12:13 +0100)]
Add missing import
Magnus Hagander [Tue, 5 Nov 2024 15:32:57 +0000 (16:32 +0100)]
Fix crash on total time if all volunteers have zero time
Magnus Hagander [Tue, 5 Nov 2024 15:29:10 +0000 (16:29 +0100)]
Fix volunteer sorting on time when time > 24 hours
Magnus Hagander [Tue, 5 Nov 2024 15:20:15 +0000 (16:20 +0100)]
Set default ordering of volunteer stats table
Magnus Hagander [Tue, 5 Nov 2024 15:15:56 +0000 (16:15 +0100)]
Switch volunteer schedule stats to use DataTables
This gives us things like sorting and searching, useful when the list is
long.
Fixes #139
Magnus Hagander [Tue, 5 Nov 2024 14:51:38 +0000 (15:51 +0100)]
Don't query fields we don't care about for volunteer stats
Magnus Hagander [Tue, 5 Nov 2024 14:47:11 +0000 (15:47 +0100)]
Prevent signing up for volunteer slot when not a volunteer
This could happen when an admin goes through the backend interface to
reach the volunteer schedule, which would create entries that otherwise
are incomplete.
Magnus Hagander [Tue, 5 Nov 2024 13:09:15 +0000 (14:09 +0100)]
Don't crash on contracts with no sender specific message
Commit
470fbba78f7ad65c63eab5fa956032592d5a467a didn't take this case
into account, assuming it could only be empty and not None, but it's an
optional parameter tot he function and the "Send test contract"
functionality explicitly does that.
Spotted by Steve Singer
Magnus Hagander [Tue, 5 Nov 2024 12:41:31 +0000 (13:41 +0100)]
Use select for update before creating invoice for conference registration
Do this only for POSTs, but without that if the user clicks the confirm
button twice in a row Really Fast, there's a race condition whereby two
invoices can be created for the same registration, which is not
supported elsewhere in the system.
This probably likely exists in other places as well, but it becomes a
lot more apparent when it comes to creating invoices as the generation
of the PDFs take some time.
Magnus Hagander [Tue, 5 Nov 2024 10:23:07 +0000 (11:23 +0100)]
Don't crash when both removing and uploading PDF at the same time
Noted by Karen Jex
Magnus Hagander [Tue, 22 Oct 2024 14:13:00 +0000 (17:13 +0300)]
Attept to fix timezone issue in twitter interface
Magnus Hagander [Fri, 18 Oct 2024 15:09:11 +0000 (17:09 +0200)]
Add a dockerfile for deploystatic
Since some platforms makes it hard to get the same version of jinja2
(and presumably other things) as we need, create a small Dockerfile
with an example based off the Debian version that we know work.
Magnus Hagander [Thu, 17 Oct 2024 16:18:19 +0000 (18:18 +0200)]
Support specifying an autocancel time for reg transfer invoices
And default it to the autocancel for the conference, but allow the admin
creating the invoice to override if needed.
Magnus Hagander [Fri, 11 Oct 2024 17:50:59 +0000 (19:50 +0200)]
Add extra debugging on exceptions rendering badges
Vik Fearing [Thu, 10 Oct 2024 11:54:24 +0000 (13:54 +0200)]
Add "Olympic scoring" method.
If there are more than two votes, then one copy each of the highest and lowest
scores is removed before averaging.
Magnus Hagander [Thu, 10 Oct 2024 10:52:58 +0000 (12:52 +0200)]
Add missing word to template
Magnus Hagander [Tue, 8 Oct 2024 12:11:05 +0000 (14:11 +0200)]
Fix label for sentat column
Magnus Hagander [Tue, 8 Oct 2024 12:10:18 +0000 (14:10 +0200)]
Make it possible to add a form warning just at the bottom
Magnus Hagander [Tue, 8 Oct 2024 12:07:13 +0000 (14:07 +0200)]
Don't load a list of every user in the system when creating vouchers
Magnus Hagander [Tue, 8 Oct 2024 12:05:59 +0000 (14:05 +0200)]
Decorate mailqueue views with @login_required
We did explicitly check for superuser permissions, so there was no way
to get in, but without the decorator we wouldn't get the redirect to the
login page.
Magnus Hagander [Tue, 8 Oct 2024 12:02:00 +0000 (14:02 +0200)]
Properly name North Macedonia
The country changed name a few years ago, our registration should
reflect that.
Magnus Hagander [Wed, 25 Sep 2024 19:37:15 +0000 (21:37 +0200)]
JQuery isn't needed anymore, so fix documentation about skinning
The JQuery requirement was removed in
d9211618, but it seems we forgot
to remove the documentation that it was required.
Spotted by Kaiting Chen
Magnus Hagander [Thu, 19 Sep 2024 08:09:14 +0000 (10:09 +0200)]
Set nicer label for previewbackground field in admin editor
Magnus Hagander [Fri, 13 Sep 2024 09:46:03 +0000 (11:46 +0200)]
Include claimid in exported sponsor claims data
Magnus Hagander [Wed, 11 Sep 2024 15:21:01 +0000 (17:21 +0200)]
For failed social media posts, show time for next attempt
Magnus Hagander [Wed, 11 Sep 2024 13:13:55 +0000 (15:13 +0200)]
Allow unclaiming of sponsor sessions even after they're approved
This just deletes the sessions, and also the speaker in case it had no
other sessions.
Vik Fearing [Thu, 5 Sep 2024 07:39:18 +0000 (09:39 +0200)]
Also make DejaVu fonts available from Django.
Commit
5a07ecd9 only worked in standalone mode, and would error in
Django mode. Fix that.
Vik Fearing [Wed, 4 Sep 2024 11:26:29 +0000 (13:26 +0200)]
Allow multiple fonts on the command line
Vik Fearing [Wed, 4 Sep 2024 09:44:12 +0000 (11:44 +0200)]
Add all fonts from the DejaVu family
Magnus Hagander [Wed, 4 Sep 2024 16:21:07 +0000 (18:21 +0200)]
Add another missing import
Magnus Hagander [Wed, 4 Sep 2024 15:35:03 +0000 (17:35 +0200)]
Fix two misspellings of status
Magnus Hagander [Wed, 4 Sep 2024 15:16:04 +0000 (17:16 +0200)]
Add missing import
Magnus Hagander [Tue, 3 Sep 2024 14:01:21 +0000 (16:01 +0200)]
Fix cancellation of invoices manually flagged as paid
This is not a normal situation and has to be dealt with manually
regardless, but we shouldn't crash on it prior to telling the user they
have to do that...
Magnus Hagander [Tue, 3 Sep 2024 13:55:52 +0000 (15:55 +0200)]
Fix dumb typo in attribute name
This caused an error in the view when setting up a new oauth client
(such as a linkedin page). It happened *after* the actual configuration
was completed, so one just had to reload for things to work, but it
still shouldn't error like that.
Magnus Hagander [Wed, 21 Aug 2024 15:04:07 +0000 (17:04 +0200)]
Clarify status of pending attendee emails
Separate out "not sent yet" from "not supposed to be sent yet".
Magnus Hagander [Wed, 21 Aug 2024 15:32:28 +0000 (17:32 +0200)]
Remove unused import
Magnus Hagander [Wed, 21 Aug 2024 11:47:55 +0000 (13:47 +0200)]
List which fields are available when building tweet templates
Both for sponsor benefits and for campaign creation, list which fields
are available to use in the Jinja templates, to make it easier to figure
out how to use them.
Magnus Hagander [Wed, 21 Aug 2024 11:35:38 +0000 (13:35 +0200)]
Mark some missing unsafe attributes
Magnus Hagander [Wed, 21 Aug 2024 11:35:00 +0000 (13:35 +0200)]
Add function to get list of (sandbox approved) attributes from classes
Magnus Hagander [Wed, 21 Aug 2024 11:33:11 +0000 (13:33 +0200)]
Add some generic useful templatetags to identify types
Magnus Hagander [Wed, 21 Aug 2024 11:32:37 +0000 (13:32 +0200)]
Add a widget to show a simple treeview
Magnus Hagander [Fri, 9 Aug 2024 15:48:42 +0000 (17:48 +0200)]
Add a form control for previewing HTML
This uses (partially) the pgweb code for loading previewable HTML into
an iframe sandbox.
Magnus Hagander [Tue, 20 Aug 2024 15:36:04 +0000 (17:36 +0200)]
Remove debugging code accidentally left in
Magnus Hagander [Tue, 20 Aug 2024 08:33:48 +0000 (10:33 +0200)]
Indicate if a benefit has expired in the sponsor overview matrix
Magnus Hagander [Tue, 20 Aug 2024 08:33:16 +0000 (10:33 +0200)]
Add a template tag to access an array by index
For some reason, django won't let us do that from a template, so we have
to add our own.
Magnus Hagander [Mon, 19 Aug 2024 13:23:42 +0000 (15:23 +0200)]
Remove support for templtaes in attendee emails
This was accidentally broken in
52fa57dc, and went mostly unnoticed. It
was only used by signup emails which now ended up having just one link
instead of two, so it seems fine for now. We'll eventually want to add
more smarness to the templates around this, but that can't be done
without a bigger surgery so for now just remove it.
Magnus Hagander [Mon, 19 Aug 2024 11:15:05 +0000 (13:15 +0200)]
Remove dependency on pgcrypto
pgcrypto was only used to set tokens in some migrations,
so in practice it should not actually be UPDATEing any
rows anymore (there should either be no rows, or they're
all updated by now). Once the migration has completed,
all new tokens are set from the python code.
So update the migrations to use the build-in random() function instead,
which is "good enough for this usage", and thereby dropping the
dependency on pgcrypto making new installs easier.
Magnus Hagander [Mon, 19 Aug 2024 10:49:19 +0000 (12:49 +0200)]
Remove extra period.
Magnus Hagander [Fri, 9 Aug 2024 15:49:15 +0000 (17:49 +0200)]
Fix typo
Dan Langille [Fri, 9 Aug 2024 01:22:16 +0000 (01:22 +0000)]
django.conf.urls.url() was deprecated in Django 3.0, and was removed in
Django 4.0
Magnus Hagander [Tue, 6 Aug 2024 11:02:09 +0000 (13:02 +0200)]
Use send_conference_simple_mail for conference related mail
Magnus Hagander [Tue, 6 Aug 2024 11:01:16 +0000 (13:01 +0200)]
Remove unusd import
Magnus Hagander [Tue, 6 Aug 2024 11:00:54 +0000 (13:00 +0200)]
Make confwiki send notifications using send_conference_notification
Magnus Hagander [Mon, 5 Aug 2024 12:00:57 +0000 (14:00 +0200)]
Calculate, store and use etags on speaker photos
This allows us to return 304 not modified for speaker photos, as they
change very infrequently. Actual etag is maintained as an md5() of the
contents, by a database trigger the same way we do for util/storage
fields.
Magnus Hagander [Tue, 30 Jul 2024 14:02:59 +0000 (16:02 +0200)]
Fix invalid option passing
Magnus Hagander [Tue, 30 Jul 2024 14:01:50 +0000 (16:01 +0200)]
Allow overriding how far back to fetch Wise transactions
Magnus Hagander [Tue, 23 Jul 2024 13:02:11 +0000 (15:02 +0200)]
Fix query for nagios alerts on unsent social media broadcasts
As of
45b8e2e9, we update the sent column to be True while leaving
unsent providers in the linked table (so we can keep track of which
succeeded and which failed). The nagios check never got the memo about
that one, so it didn't check the sent column, only the linked table,
when in fact it's now enough to *just* check the sent column. So do
that.
Magnus Hagander [Mon, 22 Jul 2024 17:49:09 +0000 (19:49 +0200)]
Check instance.pk, not instance.id, for members get_list
Commit
f2baae524 added a guard on instance.id to all get_list calls. For
Members that was technically not needed since there is currently no
interface to manually add a member, but it was added for consistency and
future-proofing. But since the Member object doesn't have its own
primary key, it would instead cause a crash. So - change it to look at
the `pk` field which does exist.
Reported by Stacey Haysler, diagnosed by Christophe Pettus
Magnus Hagander [Mon, 22 Jul 2024 12:42:53 +0000 (14:42 +0200)]
Fix typo that caused message token refresh to never run in background
Magnus Hagander [Mon, 1 Jul 2024 10:38:12 +0000 (12:38 +0200)]
Allow comma directly after batch number when matching adyen payouts
Magnus Hagander [Wed, 26 Jun 2024 15:31:47 +0000 (17:31 +0200)]
Show social media post status per network even for single text posts
Previously we'd just show a boolean "posted" or "not posted" based on if
there was more than one version of the text. But it's actually
interesting to know if it's posted to only some of the networks even if
the exact same text is posted to all of them, so make it show that in
all cases.
Magnus Hagander [Tue, 25 Jun 2024 14:08:54 +0000 (16:08 +0200)]
Cache inactive messaging providers when viewing the queue
Without this, if a provider goes from active -> inactive when there are
existing posts, we'd crash the view of the existing ones.
Magnus Hagander [Tue, 25 Jun 2024 14:05:56 +0000 (16:05 +0200)]
Make it possible to confirm sponsor benefits without triggering social media
For example if a sponsor needs to re-claim something because they sent
the wrong data, we don't want to trigger a second post.
Magnus Hagander [Tue, 25 Jun 2024 13:52:42 +0000 (15:52 +0200)]
Don't render broken image tags for declined benefits
Magnus Hagander [Tue, 25 Jun 2024 13:49:02 +0000 (15:49 +0200)]
Add a preview step when sponsors upload images
When a sponsor uploads an image, show them a preview of what they
actually uploaded and require confirmation of it. In particular, render
this preview on a background color if configured, same ast he admin
preview.
Magnus Hagander [Tue, 25 Jun 2024 13:46:07 +0000 (15:46 +0200)]
Add ability to do preview-on-background on uploaded images
This allows the admin to configure a color to use as preview background
for the image upload sponsor benefit. Particularly useful for allowing
the previewing the transparency of an image to be used no a website
that has a non-white background,.
Magnus Hagander [Tue, 25 Jun 2024 13:35:29 +0000 (15:35 +0200)]
Move color_validator to shared file
Magnus Hagander [Tue, 25 Jun 2024 10:06:27 +0000 (12:06 +0200)]
Replace newline with <br/> in signwell messages
When attaching a message to a contract, it looksl ike Signwell accepts
html (the format isn't really documented), so this is a way to make the
message a lot nicer.
Magnus Hagander [Tue, 25 Jun 2024 09:57:42 +0000 (11:57 +0200)]
Don't ask for manager when sending manual additional contracts
We don't use the manager anyway, we send it to all -- and the help text
already said we do, but the field was still in the form.
Magnus Hagander [Mon, 24 Jun 2024 14:28:09 +0000 (16:28 +0200)]
Add exact error times to Mastodon poll times
Anything to find a pattern.
Magnus Hagander [Mon, 24 Jun 2024 14:19:13 +0000 (16:19 +0200)]
Add a default value for GOCARDLESS_COUNTRY
Magnus Hagander [Mon, 24 Jun 2024 14:11:42 +0000 (16:11 +0200)]
Disable persistent connections for Mastodon provider
Perhaps it's the use of multiple parallel persistent connections that
breaks mastodon.social? Who knows, but it's worth a try since we don't
really make any useful use of the persistent connections anyway.
Magnus Hagander [Mon, 24 Jun 2024 13:56:36 +0000 (15:56 +0200)]
Add payment provider for Gocardless bank account data
They provide a service similar to Plaid but better layed out for small
organisations (in Europe at least) for now. Let's see how long that
lasts, but for now here's a basic provider that works very similar to
the Plaid one, except it does not support webhooks.
Magnus Hagander [Fri, 21 Jun 2024 19:27:51 +0000 (21:27 +0200)]
Don't try to post empty content on multiprovider tweets
When rendering multiprovider tweets, if there is no messaging at all
defined, we get no text, and that's normal. However, when then also need
to check for no text at all in the posting side of things *before* we
check for providers, or we will violate a database constraint.
Of course, one should define tweet templates when there is no messaging
configuration, but we should also not crash if it's done.
Spotted by Karen Jex
Magnus Hagander [Fri, 21 Jun 2024 17:06:54 +0000 (19:06 +0200)]
Fix typo
Magnus Hagander [Fri, 21 Jun 2024 15:34:24 +0000 (17:34 +0200)]
Plaid no longer supports a development environment, change default
Magnus Hagander [Wed, 19 Jun 2024 15:21:06 +0000 (17:21 +0200)]
Make deadlines even more clear on the sponsor dashboard
Bold, and write it in two places. Also, specify the exact timezone.
Magnus Hagander [Wed, 19 Jun 2024 14:51:47 +0000 (16:51 +0200)]
Trap exceptions when posting to social media
The providers themselves would catch some exceptions and turn them into
proper error messages, but for the cases where they don't, we want the
loop in the sender to do so for us and just log the exception message.
Magnus Hagander [Tue, 18 Jun 2024 15:22:51 +0000 (17:22 +0200)]
Allow re-sending contracts to instant buy levels
These levels by definitoin don't need a contract, but some sponsors
still want it...
Magnus Hagander [Sun, 16 Jun 2024 14:25:24 +0000 (16:25 +0200)]
Make it possible to have some benefits not included in token data
Magnus Hagander [Sun, 16 Jun 2024 14:17:51 +0000 (16:17 +0200)]
Fix typo
Magnus Hagander [Sun, 16 Jun 2024 13:51:45 +0000 (15:51 +0200)]
Render linebreaks in multi-line text sponsor benefits
We'll want to look into markdown support at some point, but as a
quickfix at least render newlines in large texts.
Magnus Hagander [Sun, 16 Jun 2024 12:11:42 +0000 (14:11 +0200)]
Add basic rate limiter for Mastodon API calls
It seems at leaast mastodon.social may have implemented rate limiting at
the TCP level (afaict). To work aroud this, implement a 15 second rate
limit for Mastodon API calls to individual providers (allow other calls
to go quicker). As this is done per-process it only affects batch jobs,
but those are also the only ones with the issue.
Uncertain if this will actually work since the limit isn't documented
(unlike the http level limit), but it's worth a try.
Magnus Hagander [Fri, 14 Jun 2024 08:53:39 +0000 (10:53 +0200)]
Always sort benefits by id in token based json update
This can otherwise lead to weird diffs in downstream projects that pull
it down, when unordered data changes.
Magnus Hagander [Tue, 11 Jun 2024 08:28:21 +0000 (10:28 +0200)]
Stop referring to "new style jinja root"
This hasn't been new style for many many years, and there is only one
style supported anyway. (Change only to help text)
Magnus Hagander [Thu, 6 Jun 2024 20:55:46 +0000 (22:55 +0200)]
Teach sponsor VAT validation about the Greece exceptoin
Other than validating the VAT number (which worked), we also ensured the
first two characters were the ISO code of a valid country. Turns out
this only applies to all other countries thant Greece -- Greece uses EL
which is not a valid country code. So map the Greece exception to the
Greece country code, thus allowing signups from there.
Magnus Hagander [Thu, 6 Jun 2024 20:42:48 +0000 (22:42 +0200)]
Accept paypal code T0700 as a payment
This is one never seen before and seems to be used for shipping labels.
Bring it in and treat it like any other.
Noted by Christophe Pettus, but not his patch - going for a minimalistic
one. This code may need some further refactoring down the road.
Magnus Hagander [Thu, 30 May 2024 20:36:38 +0000 (22:36 +0200)]
Actually sort the tracks by the tracks sort key in the cfp form
Previously it was only used in the backend, not in the cfp form, which
is just wrong.
Magnus Hagander [Thu, 30 May 2024 18:59:32 +0000 (20:59 +0200)]
Return sponsors inside level in predictable order in tokendata
It doesn't really matter which order as the receiver is supposed to sort
it by whatever their rules are, but we should at least make it
predictable so we don't generate unnecessarily large diffs.
Magnus Hagander [Tue, 28 May 2024 20:03:52 +0000 (22:03 +0200)]
Add a class to conference feedback fieldsets
Magnus Hagander [Tue, 28 May 2024 16:15:30 +0000 (18:15 +0200)]
Trap and handle really invalid URLs from sponsor signup
If a URL is *really* invalid, we could crash with an exception instead
of showing a form error.