summaryrefslogtreecommitdiff
path: root/app/daily/admin.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2016-01-24 16:28:00 -0500
committerluxagraf <sng@luxagraf.net>2016-01-24 16:28:00 -0500
commit3c30c584f6254ed729f8fda0f898cec8d53566d4 (patch)
treeb2a1b14c95d6b3294e8bf906896f94e64294541f /app/daily/admin.py
parent738b076c2e73d5ee7a1f5cdc930a135bc7854cb6 (diff)
Added user to daily feature so corrinne can contribute
Diffstat (limited to 'app/daily/admin.py')
-rw-r--r--app/daily/admin.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/daily/admin.py b/app/daily/admin.py
index 30b3c79..b468301 100644
--- a/app/daily/admin.py
+++ b/app/daily/admin.py
@@ -10,16 +10,16 @@ class WeatherAdmin(OSMGeoAdmin):
class DailyAdmin(OSMGeoAdmin):
- list_display = ('date', 'location')
+ form = LGEntryForm
+ list_display = ('date', 'user', 'location')
list_filter = (
'date',
('location', admin.RelatedOnlyFieldListFilter),
)
- form = LGEntryForm
fieldsets = (
(None, {
'fields': (
- 'title',
+ 'user',
'body_markdown',
'weather_human',
)
@@ -34,6 +34,11 @@ class DailyAdmin(OSMGeoAdmin):
}),
)
+ def get_form(self, request, obj=None, **kwargs):
+ form = super(DailyAdmin, self).get_form(request, **kwargs)
+ form.current_user = request.user
+ return form
+
class CheckInAdmin(OSMGeoAdmin):
list_display = ('date', 'location')