comparison user_photos/admin.py @ 695:2d35e5f97a99

In process work for #50. Started a user_photos application. Initial commit with model, form, and view. The view doesn't save the photo yet.
author Brian Neal <bgneal@gmail.com>
date Sat, 07 Sep 2013 20:50:46 -0500
parents
children d7a0aaabc06c
comparison
equal deleted inserted replaced
694:d84aaf239182 695:2d35e5f97a99
1 """Admin definitions for the user_photos application."""
2 from django.contrib import admin
3
4 from user_photos.models import Photo
5
6
7 class PhotoAdmin(admin.ModelAdmin):
8 date_hierarchy = 'upload_date'
9 ordering = ['-upload_date']
10 raw_id_fields = ['user']
11 search_fields = ['user__username', 'user__email']
12
13 admin.site.register(Photo, PhotoAdmin)