Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
whats-open
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
whats-open
Commits
1672d971
Commit
1672d971
authored
Jan 26, 2019
by
David Haynes
🙆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for n amount of open times
Closes
#90
parent
971736fe
Pipeline
#3728
passed with stage
in 1 minute and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
whats-open/api/admin.py
whats-open/api/admin.py
+3
-6
No files found.
whats-open/api/admin.py
View file @
1672d971
...
...
@@ -145,7 +145,7 @@ class FacilityAdmin(admin.ModelAdmin):
return
initial_data
class
OpenTimeInline
(
admin
.
Tabular
Inline
):
class
OpenTimeInline
(
admin
.
Stacked
Inline
):
"""
A table of time periods that represent an "open time" for a Facility.
...
...
@@ -154,9 +154,7 @@ class OpenTimeInline(admin.TabularInline):
# Columns correspond to each attribute in the OpenTime table
model
=
OpenTime
# 7 days of the week, so only have 7 rows
max_num
=
7
extra
=
7
extra
=
1
# We are basically reordering things to look nicer to the user here
fieldsets
=
(
(
None
,
{
"fields"
:
((
"start_day"
,
"start_time"
),
(
"end_day"
,
"end_time"
))}),
...
...
@@ -184,8 +182,7 @@ class ScheduleAdmin(admin.ModelAdmin):
{
"fields"
:
(
"name"
,
# Pair valid_start and valid_end together on the same
# line
# Pair valid_start and valid_end together on the same line
(
"valid_start"
,
"valid_end"
),
"twenty_four_hours"
,
"schedule_for_removal"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment