Commit Graph

103 Commits

Author SHA1 Message Date
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 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 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 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 daefd62f96 add duration to eventsession constraints 2020-06-22 10:54:09 +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 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
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
Víðir Valberg Guðmundsson 08d0dd7161 Make provided laptop default=True. 2019-08-01 09:34:00 +02:00
Víðir Valberg Guðmundsson 7236462023 Adding "use_provided_speaker_laptop" to EventProposal. 2019-07-31 12:47:38 +02:00
Víðir Valberg Guðmundsson bf2f0c7898 Blackness. 2019-06-16 14:32:24 +02:00
Víðir Valberg Guðmundsson b2fa1dc92c WIP Reimbursement feature (#278)
* Almost done, need the send to economic part.

* Add a way to approve/reject an reimbursement and send mails accordingly.

* finish work on custom invoice address

* add textfield notes to Order for internal orga notes about the order

* Almost done, need the send to economic part.

* Add a way to approve/reject an reimbursement and send mails accordingly.

* economy commit of doom.. replace reimbursement app with an economy app, add Expense and Reimbursement models, add management of expenses and reimbursements to backoffice. Rework and cleanup permissions stuff, add Camp.Permissions pseudo model to hold all our non-model permissions. still experimental, expect rough edges, but basic functionality should work.
2018-08-30 00:52:32 +02:00
Víðir Valberg Guðmundsson c8f6f76689 Make email mandatory and show that on the event proposal admin site. 2018-08-18 20:04:15 +02:00
Víðir Valberg Guðmundsson f15f878508 Add a proposal edit permission. 2018-08-18 16:37:20 +02:00
Víðir Valberg Guðmundsson 1af78e6ff7 Add email to SpeakerProposal and Speaker models. 2018-08-18 14:11:30 +02:00
Víðir Valberg Guðmundsson a3bfd85604 Disable timezone support. Everything is in Europe/Copenhagen anyway. 2018-08-11 18:15:19 +02:00
Víðir Valberg Guðmundsson 4043b609fd Model should have a default of false, so things that are not defined as true will default to false. 2018-08-09 15:35:58 +02:00
Víðir Valberg Guðmundsson 0e3e6ae06f Remove "this". 2018-08-09 15:30:24 +02:00
Víðir Valberg Guðmundsson f2c5c26262 Fix video recording field and help text. 2018-08-09 15:28:46 +02:00
Thomas Steen Rasmussen 016ac8adac use hasattr() and clean up urls 2018-07-24 19:02:58 +02:00
Thomas Steen Rasmussen 32e9b7c40b
Fix urls handling and other stuff (#249)
* update font-awesome to 5.1 and add fab- and fa-regular icons, fixed #244

* also handle slugs when dealing with SingleObjectMixin CBV views, fixes #248

* add missing trailing slash to bar/menu

* add missing trailing slash on event slugs, fixes #245

* fix a lot of stuff related to proposal URLs. actually display them on speaker and event detail pages. show the urltype icons. better messages on update and delete pages. fix 500 error when reapproving events. fix bug that made urls multiply when reapproving event. fixes #246 and fixes #247
2018-07-17 22:43:16 +02:00
Víðir Valberg Guðmundsson b602e394fe Fix CampViewMixin to deal properly with multiple camp_filters when dealing with SingleObjectMixin based CBVs 2018-07-17 20:46:30 +02:00
Víðir Valberg Guðmundsson 4c60415336 Make each model which inherit from CampRelatedModel but doesn not have a direct relation, define a camp_filter. (#240) 2018-06-20 22:03:29 +02:00
Thomas Steen Rasmussen 4ad58188b2 change the default for link icons, move import for speakerproposalmodel earlier in dode, and add mark_as_rejected() method on eventproposal model 2018-06-03 23:36:07 +02:00
Thomas Steen Rasmussen 3fb2f44e94 add eventtype icons to event list and event detail views in program 2018-06-03 17:16:35 +02:00
Thomas Steen Rasmussen 811b8171af working on #232, this commit changes backoffice to be camp specific (although many of the actual functions are camp independent). Add backoffice/mixins.py with BackofficeViewMixin to keep it DRY. Add backoffice views to manage proposals. Move SpeakerProposal and EventProposal detail template to includes to they can be used from backoffice. Rename our commonmark templatetags so the names are more intuitive. 2018-06-03 15:34:04 +02:00
Thomas Steen Rasmussen 24371b629a reenable mails to Content team when speaker/eventproposals are created/updated, change so proposal URLs are opened in new window, add a message in browser when proposals are approved in the admin 2018-05-26 10:24:52 +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
Víðir Valberg Guðmundsson b172d678fa Add filter for tracks to the schedule 2018-05-20 20:08:25 +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
Víðir Valberg Guðmundsson ff758b15ff Initial work on uprading. 2018-04-03 18:44:10 +02:00
Stephan Telling df5e167376
add on_delete to all foreignkeys 2018-03-04 16:26:35 +01:00
Stephan Telling f9ba48ddfb cleanup in program/ 2018-03-04 16:00:30 +01:00
Reynir Björnsson 68cba4659a Add event abstract to iCal
Testing, what is testing?!
2017-09-02 00:50:45 +02:00
Vidir Valberg Gudmundsson 0edcaeb11e Adding inital version of program control center. 2017-08-22 11:48:51 +02:00
Vidir Valberg Gudmundsson d44ef3bbd8 Adding small indicators of the number of events instances for the different filters. Resulted in some cleanup as well. 2017-08-16 18:30:02 +02:00
Vidir Valberg Gudmundsson d4d7fad439 Cleanups. Adding Speaker detail. 2017-08-16 18:30:02 +02:00
Vidir Valberg Gudmundsson a447ca476f Working on event detail. Also small visual help in DayView. Also some favorite stuff. 2017-08-16 18:27:28 +02:00
Vidir Valberg Gudmundsson a938f2406f Filtering by video recording is now possible. Also show video recording states. 2017-08-16 18:27:28 +02:00
Vidir Valberg Gudmundsson e8c0ab1941 Organized the code in a more sane manner. Also some websocket work. 2017-08-16 18:27:28 +02:00
Vidir Valberg Gudmundsson a6470d2ec9 Initial work on the schedule written in elm. 2017-08-16 18:26:49 +02:00