diff options
author | Magnus Hagander | 2017-10-03 18:06:10 +0000 |
---|---|---|
committer | Magnus Hagander | 2017-10-04 08:55:43 +0000 |
commit | d4096bbaed2d7234596f7838300213c80e368823 (patch) | |
tree | 4f48021a21b2665b37d9850caf0477d23898491e /postgresqleu/util/random.py | |
parent | cefeda8869bec59261888ff3d626ebab4647eda0 (diff) |
Implement volunteer schedule management
This adds the concepts of VolunteerSlot and VolunteerAssignment.
Each VolunteerSlot has a minimum and a maximum number of volunteers.
Possible volunteers (listed in a new field on the conference itself) can
sign up for specific slots they are interested in, which must then be
confirmed by an admin (controlled by the admin field on the conference).
Admins can also add volunteers to specific slots, which must then be
confirmed by the volunteer.
There is also a per-volunteer ical feed using a secret URL (this adds a
regtoken field to all registrations, which is something we've already
needed for some other things as well, so it'll be good to have
regardless).
No notifications are sent in this system, that's all intended to be
manually handled by the volunteer manager, at least for now.
Diffstat (limited to 'postgresqleu/util/random.py')
-rw-r--r-- | postgresqleu/util/random.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/postgresqleu/util/random.py b/postgresqleu/util/random.py new file mode 100644 index 00000000..dfea233f --- /dev/null +++ b/postgresqleu/util/random.py @@ -0,0 +1,8 @@ +from Crypto.Hash import SHA256 +from Crypto import Random + +def generate_random_token(): + s = SHA256.new() + r = Random.new() + s.update(r.read(250)) + return s.hexdigest() |