Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hunter T Jozwiak
whats-open
Commits
8197992e
Verified
Commit
8197992e
authored
Nov 03, 2017
by
David Haynes
🙆
Browse files
OpenTimeInline now defaults to 7
- also reorder fields to group open and closing items
parent
9bb565bc
Changes
1
Show whitespace changes
Inline
Side-by-side
whats-open/api/admin.py
View file @
8197992e
...
...
@@ -43,6 +43,16 @@ class OpenTimeInline(admin.TabularInline):
model
=
OpenTime
# 7 days of the week, so only have 7 rows
max_num
=
7
extra
=
7
# We are basically reordering things to look nicer to the user here
fieldsets
=
(
(
None
,
{
'fields'
:
(
(
'start_day'
,
'start_time'
),
(
'end_day'
,
'end_time'
)
),
}),
)
class
ScheduleAdmin
(
admin
.
ModelAdmin
):
"""
...
...
@@ -64,7 +74,8 @@ class ScheduleAdmin(admin.ModelAdmin):
# line
(
'valid_start'
,
'valid_end'
),
'twenty_four_hours'
,
'schedule_for_removal'
)
'schedule_for_removal'
,
'promote_to_main'
)
}),
)
...
...
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