Mercurial > public > sg101
annotate user_photos/admin.py @ 696:b2a8fde3173a
Got the image resizing and uploading working. It needs a lot of work though.
This commit is just to capture something that works.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 08 Sep 2013 19:06:54 -0500 |
parents | 2d35e5f97a99 |
children | d7a0aaabc06c |
rev | line source |
---|---|
bgneal@695 | 1 """Admin definitions for the user_photos application.""" |
bgneal@695 | 2 from django.contrib import admin |
bgneal@695 | 3 |
bgneal@695 | 4 from user_photos.models import Photo |
bgneal@695 | 5 |
bgneal@695 | 6 |
bgneal@695 | 7 class PhotoAdmin(admin.ModelAdmin): |
bgneal@695 | 8 date_hierarchy = 'upload_date' |
bgneal@695 | 9 ordering = ['-upload_date'] |
bgneal@695 | 10 raw_id_fields = ['user'] |
bgneal@695 | 11 search_fields = ['user__username', 'user__email'] |
bgneal@695 | 12 |
bgneal@695 | 13 admin.site.register(Photo, PhotoAdmin) |