Commit Graph

16 Commits

Author SHA1 Message Date
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 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
Víðir Valberg Guðmundsson bf2f0c7898 Blackness. 2019-06-16 14:32:24 +02:00
Thomas Steen Rasmussen 18c33383b7 add url support for speakerproposals and eventproposals, including new models Url and UrlType. Also switch to Django 2.0 path() syntax in various urls.py files getting rid of a lot of ugly regex \o/ 2018-05-23 23:28:27 +02:00
Thomas Steen Rasmussen 039af44a92 new content submission flow monster commit of doom. fixes a large part of #191. Split out /program/ urls into a seperate program/urls.py file in the program: URL namespace. Change call for speakers to call for participation everywhere (I think). Add boolean fields call_for_participation_open and call_for_sponsors_open to Camp model. Switch to font-awesome 5.0.13 and update <i> tags everywhere accordingly. Introduce Tracks so all Events belong to a Track, which in turn belongs to a Camp. Add seperate forms for submitting SpeakerProposals and EventProposals so we can set labels and help_text according to EventType, and remove fields we dont need. Remove Pictures from Speaker and SpeakerProposals, it was almost never used, and was a lot of code/complexity. Remove a few PROPOSAL_STATUS namely DRAFT and MODIFIED_AFTER_APPROVAL to simplify the workflow for submitters. Add description, icon and host_title fields to EventType. Add a CombinedProposalSubmitView which allows users to submit a SpeakerProposal and EventProposal from the same page, introducing a new requirements.txt dependency for django-betterforms==1.1.4. Update bootstrap-devsite to match the new reality. 2018-05-20 18:16:20 +02:00
Stephan Telling f9ba48ddfb cleanup in program/ 2018-03-04 16:00:30 +01:00
Thomas Steen Rasmussen 9e3ed81731 fix pictures 2017-03-30 00:20:14 +02:00
Thomas Steen Rasmussen 66f7b7ec2e fix CFS open mixin 2017-03-18 16:33:48 +01:00
Thomas Steen Rasmussen dd23490c01 add mixin to prevent adding and editing user submitted speaker and event proposals 2017-03-18 16:22:16 +01:00
Thomas Steen Rasmussen b151192d02 refactor some of the common image code into a PictureViewMixin, and make pictures work with the devserver 2017-03-17 19:40:47 +01:00
Thomas Steen Rasmussen a715cba597 add admin commands to approve speaker and event proposals 2017-03-16 00:30:59 +01:00
Thomas Steen Rasmussen 181a0e43b0 add some more speaker and event proposal submission stuff 2017-03-12 20:54:33 +01:00
Thomas Steen Rasmussen a8e81dbc6f rename mixin 2017-03-12 19:34:27 +01:00
Thomas Steen Rasmussen a51b795bce rename models and views from submission to proposal 2017-03-12 19:06:03 +01:00
Thomas Steen Rasmussen ad3b826844 rework speaker and talk proposal stuff 2017-03-12 15:43:41 +01:00