-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add closed message and general improvements
- add an admin field for a custom closed message - move site configuration to django-solo - update Tailwind CSS library
- Loading branch information
Showing
19 changed files
with
204 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by Django 5.1 on 2024-08-17 15:09 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('cafeteria', '0017_lunchperiod_floating_staff'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='SiteConfiguration', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('balance_export_path', models.CharField(blank=True, help_text='File path to which current balance export files should be saved.', max_length=255)), | ||
('closed_for_break', models.BooleanField(default=False, help_text='Is the cafeteria closed for a school break or holiday?')), | ||
('current_year', models.CharField(help_text='The current school year.', max_length=10)), | ||
('debt_limit', models.FloatField(default=0.0, help_text='The debt limit at which point users are prevented from ordering.')), | ||
('new_card_fee', models.FloatField(default=0.0, help_text='The fee charged for a new lunch card.')), | ||
('order_close_time', models.TimeField(default=datetime.time(8, 15), help_text='The time orders should stop being accepted.')), | ||
('order_open_time', models.TimeField(default=datetime.time(0, 0), help_text='The time orders should start being accepted.')), | ||
('reports_email', models.CharField(blank=True, help_text='The email addresses, comma seperated, to which system reports should be sent.')), | ||
], | ||
options={ | ||
'verbose_name': 'Site Configuration', | ||
}, | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
cafeteria/migrations/0019_siteconfiguration_closed_message.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.1 on 2024-08-17 18:58 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('cafeteria', '0018_siteconfiguration'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='siteconfiguration', | ||
name='closed_message', | ||
field=models.CharField(blank=True, help_text='The message to be displayed with the cafeteria is closed for a break or holiday.'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.