Commit graph

321 commits

Author SHA1 Message Date
Thomas Steen Rasmussen 3a42b262f3 add more text to event scheduled email 2021-08-15 22:44:33 +02:00
Thomas Steen Rasmussen 6b4d8e0790 make it optional to specify speaker_event conflicts 2021-08-15 22:04:33 +02:00
Thomas Steen Rasmussen 5162a54a2d enable email to submitter and speakers when an event is scheduled 2021-08-07 15:31:11 +02:00
Thomas Steen Rasmussen 01687ea11a run pre-commit --all-files, it's been a while since last time 2021-07-19 15:06:10 +02:00
Thomas Steen Rasmussen 3f17132cc3 new wording for speaker/event emails 2021-06-27 14:56:06 +02:00
Thomas Flummer 4d32a9deb9
add backoffice tool to add recording URLs (#683) 2020-11-01 16:44:46 +01:00
Thomas Steen Rasmussen c6cb90e567 fix broken speakerproposal remove person view 2020-08-12 14:59:28 +02:00
Thomas Steen Rasmussen 64b8f0ee10 the old NullBooleanField defaulted to blank=True, BooleanField with null=True does not, TIL 2020-08-11 10:16:53 +02:00
Thomas Steen Rasmussen db20fd7b68 fix django3.1 compatibility 2020-08-11 02:35:18 +02:00
Thomas Steen Rasmussen 6d97d4b603 add missing tags migration for blank=True 2020-08-10 20:35:52 +02:00
Thomas Steen Rasmussen f205802f89 fix eventsession search 2020-08-09 15:36:37 +02:00
Thomas Steen Rasmussen c153a2c3e3 allow updating an event without specifying tags 2020-08-05 01:02:52 +02:00
Thomas Steen Rasmussen 1327c21e74 assume a speaker is always available if they submitted no availability at all 2020-08-04 22:37:35 +02:00
Thomas Steen Rasmussen 09cf137aac Handle edge cases where a speaker has 0 events 2020-08-04 00:22:43 +02:00
Thomas Steen Rasmussen 71a0f4f594 complete the rename of slacking off to recreational event, fixes #603 maybe 2020-08-03 23:41:51 +02:00
Thomas Steen Rasmussen 3cbd4f4e87 do not hold emails to the content team 2020-07-29 22:06:59 +02:00
Thomas Steen Rasmussen 1c82575fb9 dont hold mails to the content team 2020-07-29 20:37:20 +02:00
Thomas Steen Rasmussen 5c9b71b976 Move Url FK cleaning away from model.clean() so ModelForm don't call it before the fk's have been set, causing unheard mayhem. Fixes #589 and thanks for the report! 2020-07-17 22:36:50 +02:00
Thomas Steen Rasmussen f25a6332c2 fix proposalupdateview, form not self please 2020-06-30 20:00:34 +02:00
Thomas Steen Rasmussen bd53f64208 add responsible_team to most emails, while here run pre-commit run --all-files 2020-06-22 17:25:08 +02:00
Thomas Steen Rasmussen daefd62f96 add duration to eventsession constraints 2020-06-22 10:54:09 +02:00
Thomas Steen Rasmussen 9fce167c7c show event uuid in admin 2020-06-22 09:10:10 +02:00
Thomas Steen Rasmussen 8b239e1812 rework migration, remove unique from event.uuid for now 2020-06-22 02:14:02 +02:00
Thomas Steen Rasmussen 7b435ace42 add constraint to prevent adjacent eventsessions for the same eventtype and location, and add some missing migrations 2020-06-22 02:02:29 +02:00
Thomas Steen Rasmussen 8efac62f62 remove references to eventinstance.event_slot, that future does not exist anymore 2020-06-22 01:18:25 +02:00
Thomas Steen Rasmussen 0ba8ee4916 remove unique for now 2020-06-03 23:52:52 +02:00
Thomas Steen Rasmussen 2e969ac116 add null=True for now 2020-06-03 23:39:15 +02:00
Thomas Steen Rasmussen 99bc1cf0a1 add null=True for now 2020-06-03 23:36:30 +02:00
Thomas Steen Rasmussen 341fa7394d add null=True for now 2020-06-03 22:20:12 +02:00
Thomas Flummer 1c88ed8073
Added title blocks to templates that did not have one (#511)
In most cases this mirrors the primary header on the page, but in some cases the title is simplified and/or nested to reflect the depth of the current page

Co-authored-by: Thomas Steen Rasmussen <tykling@bornhack.org>
2020-06-03 21:30:10 +02:00
Thomas Steen Rasmussen eff4bfaf1c
SpeakerAvailability, EventSession, autoscheduler, and other goodies (#497)
* fix old bug where the get_days() method would return the wrong number of days, this was not discovered because our bootstrap script has been creating 9 day camps instead of 8 day camps (this has been fixed in a different commit)

* remove stray debug print

* output camp days in local timezone (CEST usually), not UTC

* speakeravailability commit of doom, originally intended for #385 but goes a bit further than that. Adds SpeakerAvailability and EventSession models, and models for the new autoscheduler. Update bootstrap script and more. New conference_autoscheduler dependency. Work in progress, but ready for playing around!

* add conference-scheduler to requirements

* rework migrations, work at bit with postgres range fields and bounds, change how speakeravailability is saved (continuous ranges instead of 1 hour chunks), add tests for utils/range_fields.py including adding hypothesis to requirements/dev.txt, add a test which runs our bootstrap script

* catch name collision in the right place, and load missing postgres extension in the migration

* add some verbosity to see what the travis issue might be

* manually create btree_gist extension in postgres, not sure why the BtreeGistExtension() operation in program/migrations/0085... isn't working in travis?

* create extension in the right database maybe

* lets try this then

* ok so the problem is not that the btree_gist extension isn't getting loaded, the problem is that GIST indexes do not work with uuid fields in postgres 9.6, lets take another stab at getting pg10 with postgis to work with in travis

* lets try normal socket connection

* add SPEAKER_AVAILABILITY_DAYCHUNK_HOURS=3 to travis environment_settings.py

* rework migrations, change so an autoschedule can work with multiple eventtypes, change AutoSlot model to use a DateTimeRangeField so we can use the database for more efficient lookups, add 'conflicts' self m2m for EventLocation to indicate when a room conflicts with another room, add a support_autoscheduling bool to EventType, add workshops to bootstrap script, add timing output to bootstrap script

* update README a bit, move some functionality to model methods, update jquery and jquery.datatables, include datatables in base.html instead of in each page, start adding backoffice schedule management views (unfinished), yolo commit so I can show valberg something

* Switch to a more simple way of using the autoscheduler, meaning we can remove the whole autoscheduler app and all models. All autoscheduler code is now in program/autoscheduler.py and a bit in backoffice views. Add more backoffice CRUD views for schedule management. Add datatables moment.js plugin to help table sorting of dates. Add Speaker{Proposal}EventConflict model to allow speakers to inform us which events they want to attend so we dont schedule them at the same time. Add EventTag model. New models not hooked up to anything yet.

* handle cases where there is no solution without failing, also dont return anything here

* wrong block kiddo

* switch from EventInstance to EventSlot as the way we schedule events. Finish backoffice content team views (mostly). Many small changes. Prod will need data migration of EventInstances -> EventSlots when the time comes.

* keep speakeravailability stuff a bit more DRY by using the AvailabilityMatrixViewMixin everywhere, add event_duration_minutes to EventSession create/update form, reverse the order we delete/create EventSlot objects when updating an EventSession

* go through all views, fix various little bugs here and there

* add missing migration

* add django-taggit, add tags for Events, add tags in bootstrap script, make AutoScheduler use tags. Add tags in forms and templates.

* fix taggit entry in requirements

* Fix our iCal view: Add uuid field to Event, add uuid property to EventSlot which calculates a consitent UUID for an event at a start time at a location. Use this as the schedule uuid. While here fix so our iCal export is valid, a few fields were missing, the iCal file now validates 100% OK.

* fix our FRAB xml export view

* comment the EventSlot.uuid property better

* typo in comment

* language

Co-Authored-By: Benjamin Balder Bach <benjamin@overtag.dk>

* language

Co-Authored-By: Benjamin Balder Bach <benjamin@overtag.dk>

* Update src/backoffice/templates/autoschedule_debug_events.html

Co-Authored-By: Benjamin Balder Bach <benjamin@overtag.dk>

* add a field to make this form look less weird. No difference in functionality.

* remove stray print and refactor this form init a bit

* fix ScheduleView

* only show slots where all speakers are available when scheduling events manually in backoffice

* make event list sortable by video recording column

* update description on {speaker|event}proposal models reason field

* remove badge showing number of scheduled slots for each event in backoffice eventlist. it was unclear what the number meant and it doesn't really fit

* remember to consider events in the same location when deciding whether a slot is available or not

* add is_available() method to EventLocation, add clean_location() method to EventSlot, call it from EventSlot.clean(), update a bit of text in eventslotunschedule template

* fix EventSession.get_available_slots() so it doesnt return busy slots as available, and since this means we can no longer schedule stuff in the lunchbreak lower the number of talks in the bootstrap script a bit so we have a better chance of having a solvable problem

* fix the excludefilter in EventSession.get_available_slots() for real this time, also fix an icon and add link in event schedule template in backoffice

* show message when no slots are available for manual scheduling in backoffice

* add event_conflicts to SpeakerUpdateView form in backoffice

* fix link to speaker object in speakerproposal list in backoffice

* allow blank tags

* make duration validation depend on the eventtype event_duration_minutes if we have one. fix help_text and label and placeholder for all duration fields

* allow music acts up to 180 mins in the bootstrap data

* fix wrong eventtype name for recreational events in speakerproposalform

* stretch the colspan one cell more

* save event_conflicts m2m when submitting speaker and event together

* form not self, and add succes message

* move js function toggleclass() to bornhack.js and rename to toggle_sa_form_class(), function is used in several templates and was missing when submitting combined proposals

* move the no-js removal to the top of ready() function

This will allow other javascript initialization (eg. DataTable) to see the elements and initialize accordingly (eg. column width for tables)

* Fixed problem with event feedback detail view

* Fixed problem with event feedback list view

* introduce a get_tzrange_days() function and use that to get the relevant days for the matrix instead of camp.get_days(), thereby fixing some display issues when eventsessions cross dates

* show submitting user and link to proposal on backoffice event detail page, change User to Submitter in backoffice speaker list table

* show warning by the buttons when a proposal cannot be approved, and show better text on approve/reject buttons

* disable js schedule, save m2m, prefetch some stuff

* fix broken date header in table

* remove use of djangos regular slugify function, use the new utils.slugs.unique_slugify() instead

Co-authored-by: Thomas Steen Rasmussen <tykling@bornhack.org>
Co-authored-by: Benjamin Balder Bach <benjamin@overtag.dk>
Co-authored-by: Thomas Flummer <tf@flummer.net>
2020-06-03 21:18:06 +02:00
Thomas Steen Rasmussen bf7578a833
Send emails when proposals are accepted/rejected, and when eventinstances are created/updated (#466)
* fixup labels and help_text for the email field

* add email and published columns to speaker proposal table, add published column to event proposal table

* send email to user when a speaker or eventproposal is accepted or rejected. Send email to submitter and all speakers when an eventinstance is created, or when the time is updated (event is rescheduled). Fix a few other small things while here.
2020-03-05 12:23:42 +01:00
Vidir Valberg Gudmundsson df1a6564b7 Fix #365 2020-02-24 09:40:42 +01:00
Thomas Steen Rasmussen 27f3470f92 fix noscript schedule template, while here add a prefetch_related in the view to reduce number of sql lookups from 116 to 8 for bootstrap data 2020-02-22 17:19:17 +01:00
Thomas Steen Rasmussen 76fcfd7855 lets call this frab exporter 1.0 2020-02-22 16:24:37 +01:00
Thomas Steen Rasmussen eb18fc2ec5 fix eventinstance uuid migration with this abomination https://docs.djangoproject.com/en/dev/howto/writing-migrations/#migrations-that-add-unique-fields 2020-02-22 16:21:51 +01:00
Thomas Steen Rasmussen 24d2c0d041 add note about the license we decided to use for recordings 2020-02-22 15:47:58 +01:00
Thomas Steen Rasmussen b6eaaa5f18
Frab xml export (#459)
* first stab at a frab xml generator

* delete unused xsd file

* remove camp title from location name

* add uuid field to eventinstance and use it in the frab xml
2020-02-22 15:09:12 +01:00
Thomas Steen Rasmussen 33383e6559
Event feedback (#451)
* Event feedback functionality and related commits:

* blackness and isort and flake8 - this branch does not have pre-commit so I forgot :/

* finish backoffice management of eventfeedback

* add username to eventfeedback detail panel when viewed in backoffice

* Add feedback url to elm schedule. Fix access when user is anonymous. Remove print statement.

* one prefetch_related call to rule them all

Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
2020-02-22 14:50:09 +01:00
Thomas Steen Rasmussen 00af109e2f
add flake8 and isort to pre-commit config, make flake8 and isort happy (#441)
* add flake8 to pre-commit config, and fixup many things to make flake8 happy

* add isort and sort all imports, add to pre-commit and requirements
2020-02-12 13:10:41 +01:00
Thomas Steen Rasmussen 377a77143c black everything, working on #355 2020-02-07 18:46:34 +01:00
Víðir Valberg Guðmundsson 20f380dfd6
Planked code form betterforms. (Aka django 3.0 upgrade) (#436)
* Bump django from 2.2.8 to 3.0.2 in /src/requirements

Bumps [django](https://github.com/django/django) from 2.2.8 to 3.0.2.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/2.2.8...3.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Planked code form betterforms.

* Remove betterform from requirements.

* Try with master of django-allauth-2fa.

* Use static templatetag library, staticfiles is gone.

* Use newly released django-allauth-2fa 0.8 instead of git url.

* Django 3.0.3 is out.

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-02-07 18:21:34 +01:00
Víðir Valberg Guðmundsson 08d0dd7161 Make provided laptop default=True. 2019-08-01 09:34:00 +02:00
Víðir Valberg Guðmundsson 80793d3d1d Add "use_provided_speaker_laptop" to eventproposal_detail.html. Also correct a typo. 2019-07-31 20:22:11 +02:00
Víðir Valberg Guðmundsson 7236462023 Adding "use_provided_speaker_laptop" to EventProposal. 2019-07-31 12:47:38 +02:00
Thomas Steen Rasmussen 444aa59159 s/name/title/g 2019-07-29 17:00:25 +02:00
Thomas Steen Rasmussen d276032389 better subjects for content team emails, and add quotes in body 2019-07-21 15:26:57 +02:00
Thomas Steen Rasmussen 939d17c8bd use event_type from last event from the loop, fix backtrace when updating a speakerproposal which has more than one eventproposal of the same type 2019-07-16 10:35:19 +02:00
Víðir Valberg Guðmundsson 8ce7bce383 Redirect only if user is not superuser. 2019-06-24 15:56:09 +02:00
Víðir Valberg Guðmundsson 6536a05e03 Woops forgot the migration. 2019-06-24 15:45:56 +02:00