Commit 9d4bcae0 authored by Daniel W Bond's avatar Daniel W Bond

Merge branch '2.2-dev' of git.gmu.edu:srct/whats-open into admin-actions

parents 15dd2043 ded1cb8c
Pipeline #2176 canceled with stage
......@@ -96,6 +96,16 @@ class FacilityAdmin(admin.ModelAdmin):
'tapingo_url', 'phone_number', 'note', 'owners'),
}),
)
autocomplete_fields = ['main_schedule', 'special_schedules', ]
# despite the name of this method, ("change" seems to imply it would affect modify)
# it is called only when initially creating a model
def get_changeform_initial_data(self, request):
initial_data = super(FacilityAdmin, self).get_changeform_initial_data(request)
initial_data['owners'] = [request.user, ]
return initial_data
class OpenTimeInline(admin.TabularInline):
"""
......@@ -143,6 +153,8 @@ class ScheduleAdmin(admin.ModelAdmin):
'promote_to_main')
}),
)
search_fields = ['name', ] # search terms for autcomplete
ordering = ['name', ] # autocomplete ordering
# https://docs.djangoproject.com/en/1.11/ref/contrib/gis/admin/#osmgeoadmin
OSMGeoAdmin.default_lon = -8605757.16502
......
......@@ -123,7 +123,7 @@ class Facility(TimeStampedModel):
# A link to the logo image for this Facility
logo = models.URLField('Logo URL', blank=True,
default="https://imgur.com/q2Phkn9.png",
default="https://wopen-cdn.dhaynes.xyz/default.png",
help_text="The absolute URL to the logo image for this Facility.")
# The User(s) that claim ownership over this facility
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment