-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.py
52 lines (31 loc) · 949 Bytes
/
admin.py
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
from django.contrib import admin
from . import models
# Place
class PlaceAdmin(admin.ModelAdmin):
list_display = (
"name",
"address",
"votes",
"link",
"is_eat",
"is_drink",
"id",
"is_enabled",
)
admin.site.register(models.Place, PlaceAdmin)
# Analytic
class AnalyticAdmin(admin.ModelAdmin):
list_display = ("ip", "user", "created_at", "path", "querystring")
admin.site.register(models.Analytic, AnalyticAdmin)
# Vote
class VoteAdmin(admin.ModelAdmin):
list_display = ("ip", "date", "place")
admin.site.register(models.Vote, VoteAdmin)
# Group
class GroupAdmin(admin.ModelAdmin):
list_display = ("route", "name", "slug", "created_at", "visits")
admin.site.register(models.Group, GroupAdmin)
# Membership
class MembershipAdmin(admin.ModelAdmin):
list_display = ("id", "group", "place")
admin.site.register(models.Membership, MembershipAdmin)