Mercurial > public > sg101
view user_photos/admin.py @ 700:e888d627928f
Refactored the processing of image uploads.
I suspect I will use this general algorithm in other places (like POTD), so
I made it reusable.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 11 Sep 2013 20:31:23 -0500 |
parents | 2d35e5f97a99 |
children | d7a0aaabc06c |
line wrap: on
line source
"""Admin definitions for the user_photos application.""" from django.contrib import admin from user_photos.models import Photo class PhotoAdmin(admin.ModelAdmin): date_hierarchy = 'upload_date' ordering = ['-upload_date'] raw_id_fields = ['user'] search_fields = ['user__username', 'user__email'] admin.site.register(Photo, PhotoAdmin)