0

I am currently working on a project that requires me to create a schedule from which users can book different periods. In practical terms, users need to have the possibility to subscribe to our services for the length of their choice (eg. from 4 to 7pm).

Here is my question.. I would like to know what is the most efficient way to manage every subscription and to display all the data gathered. Is there any "plugin" that would allow me to manage this easily? Otherwise could you please tell me what is the best approach to adopt?

At this stage, when they register, they can choose:

  • one day of the week
  • an hour of beginning
  • an hour of ending

(Registration form --> http://www.leclubdesdevoirs.be/inscriptions/)

In my opinion, the best is to tabulate the information. What do you think? And Could I implement this? Here is an example :

---------------- | student 1  | student 2    | student 3   | Student 4  | Total
---------------------------------------------------------------------
16.00-16.15    |XXXXXXX |XXXXXXX |000000000|000000000| 2 students 
---------------------------------------------------------------------
16.15-16.30    |XXXXXXX |XXXXXXX |XXXXXXX |000000000| 3 students     
---------------------------------------------------------------------
16.30-16.45    |XXXXXXX |000000000|XXXXXXX |XXXXXXX | 3 students   
---------------------------------------------------------------------
16.45-17.00    |XXXXXXX |000000000|XXXXXXX |XXXXXXX | 3 students 
---------------------------------------------------------------------

Where :

  • XXXXXXX means present
  • 000000000 means absent
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • To me it seems a completely custom solution would be easiest, query the subscriptions within your target timeframe (week?) put them in some sorted dict, for loop a table out of it. Something like {'monday': {'16:00-16:15': [3, 4]}}. I got to thinking about using cron expressions for your schedules, but that's overengineering. – Lauri Elias Sep 21 '16 at 11:07
  • What about django-scheduler? – ger.s.brett Sep 21 '16 at 16:12
  • ger.s.brett, Django-scheduler seems really nice! Is there a way to try it/have a live preview before installing this plugging and jump into the code. I'm not sure about the possibility of adding "automatically" new events and manage the subscriptions... Thanks – Pierre Collinet Sep 22 '16 at 07:36

0 Answers0