-
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathadmin.py
More file actions
86 lines (71 loc) · 1.72 KB
/
admin.py
File metadata and controls
86 lines (71 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
from django.contrib import admin
from api.models import (
CodeSchool,
Location,
Scholarship,
ScholarshipApplication,
SuccessStory,
TeamMember,
)
@admin.register(Scholarship)
class ScholarshipAdmin(admin.ModelAdmin):
list_display = (
"name",
"location",
"open_time",
"close_time",
"created_at",
"updated_at",
)
@admin.register(ScholarshipApplication)
class ScholarshipApplicationAdmin(admin.ModelAdmin):
list_display = ("user", "scholarship", "terms_accepted", "created_at", "updated_at")
@admin.register(TeamMember)
class TeamMemberAdmin(admin.ModelAdmin):
list_display = ("name", "email", "role", "group", "image_src")
@admin.register(Location)
class LocationAdmin(admin.ModelAdmin):
list_display = (
"code_school",
"va_accepted",
"address1",
"address2",
"city",
"state",
"zip",
)
@admin.register(CodeSchool)
class CodeSchoolAdmin(admin.ModelAdmin):
list_display = (
"name",
"url",
"full_time",
"hardware_included",
"has_online",
"online_only",
"has_housing",
"mooc",
"is_partner",
"is_vet_tec_approved",
"rep_name",
"rep_email",
)
list_filter = (
"full_time",
"hardware_included",
"has_online",
"online_only",
"has_housing",
"mooc",
"is_partner",
"is_vet_tec_approved",
)
search_fields = ("name", "rep_name", "rep_email", "url")
@admin.register(SuccessStory)
class SuccessStoryAdmin(admin.ModelAdmin):
list_display = (
"created_by",
"created_at",
"text",
"is_approved",
)