Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.contrib import admin
- from .models import University
- from .models import olympiads, organizer, profile, year, ol_organizer, ol_number_int_list, ol_info
- admin.site.register(University)
- admin.site.register(olympiads)
- admin.site.register(organizer)
- admin.site.register(profile)
- admin.site.register(year)
- admin.site.register(ol_organizer)
- admin.site.register(ol_number_int_list)
- admin.site.register(ol_info)
- class UniversityAdmin(admin.ModelAdmin):
- list_display = ("id", "short_name", "country", "url")
- list_display_links = ("short_name",)
- list_filter = ("country",)
- search_fields = ("short_name", "country",)
- class olympiadsAdmin(admin.ModelAdmin):
- list_display = ("name","url")
- list_display_links = ("name")
- list_filter = ("name")
- search_fields = ("name")
- class organizerAdmin(admin.ModelAdmin):
- list_display = ("id", "name")
- list_display_links = ("name")
- list_filter = ("name")
- search_fields = ("name")
- class profileAdmin(admin.ModelAdmin):
- list_display = ("id", "name")
- list_display_links = ("name")
- list_filter = ("name")
- search_fields = ("name")
- class yearAdmin(admin.ModelAdmin):
- list_display = ("id", "num_of_year")
- list_display_links = ("name")
- list_filter = ("name")
- search_fields = ("name")
- class ol_organizerAdmin(admin.ModelAdmin):
- list_display = ("id_year", "id_ol", "id_org")
- list_display_links = ("id_ol", "id_year")
- list_filter = ("id_ol", "id_year")
- search_fields = ("id_ol", "id_year")
- class ol_number_int_listAdmin(admin.ModelAdmin):
- list_display = ("id_year", "id_ol", "number_in_list")
- list_display_links = ("id_ol", "id_year")
- list_filter = ("id_ol", "id_year")
- search_fields = ("id_ol", "id_year")
- class ol_infoAdmin(admin.ModelAdmin):
- list_display = ("id_ol","id_year","id_subj","id_prof", "level" )
- list_display_links = ("id_ol", "id_year")
- list_filter = ("id_ol", "id_year")
- search_fields = ("id_ol", "id_year")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement