mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
15 lines
496 B
Python
15 lines
496 B
Python
from django.contrib import admin
|
|
from .models import StudentStatus
|
|
from leaflet.admin import LeafletGeoAdmin
|
|
|
|
|
|
class StudentStatusAdmin(LeafletGeoAdmin):
|
|
# define which fields are required
|
|
def get_form(self, request, obj=None, **kwargs):
|
|
form = super(StudentStatusAdmin, self).get_form(request, obj, **kwargs)
|
|
form.base_fields['landmark'].required = False
|
|
return form
|
|
|
|
|
|
# Register the new StudentStatus model
|
|
admin.site.register(StudentStatus, StudentStatusAdmin)
|