from django.contrib import admin
from . models import Location, Meetup, Participant
# here we can register the models that we want to be manageble by the django admin area/panel

# Register your models here.

# we can customize the way an instance of a model appear in the admin area
class MeetupAdmin(admin.ModelAdmin):
    list_display = ('title', 'date','location','image')  # what model fields should be displayed in the instances list
    # also we can add certain features to the list instances section of the admin area for this model
    list_filter = ('location','date')  #which fields will allow filter capabilities
    prepopulated_fields = {'slug': ('title', )}   # autogenerated the field base on other fields

admin.site.register(Meetup, MeetupAdmin)
admin.site.register(Location)
admin.site.register(Participant)