summaryrefslogtreecommitdiff
path: root/app/photos/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/photos/admin.py')
-rw-r--r--app/photos/admin.py28
1 files changed, 25 insertions, 3 deletions
diff --git a/app/photos/admin.py b/app/photos/admin.py
index 659dcb6..9453734 100644
--- a/app/photos/admin.py
+++ b/app/photos/admin.py
@@ -4,7 +4,7 @@ from django.contrib.gis.admin import OSMGeoAdmin
from django.conf.urls import patterns
from django.conf.urls import url
from django.utils.translation import ungettext, ugettext_lazy as _
-from photos.models import Photo, PhotoGallery, LuxImage, LuxGallery
+from photos.models import Photo, PhotoGallery, LuxImage, LuxGallery, LuxImageSize
from django.shortcuts import render
from django.contrib.admin import helpers
from django.http import HttpResponseRedirect
@@ -13,10 +13,17 @@ from django.http import HttpResponseRedirect
from .forms import UploadZipForm, GalleryForm
+class LuxImageSizeAdmin(OSMGeoAdmin):
+ pass
+
+
+admin.site.register(LuxImageSize, LuxImageSizeAdmin)
+
+
class LuxImageAdmin(OSMGeoAdmin):
- list_display = ('pk', 'admin_thumbnail', 'pub_date',)
- list_filter = ('pub_date',)
+ list_display = ('pk', 'admin_thumbnail', 'pub_date', 'location')
+ list_filter = ('pub_date', 'location')
search_fields = ['title', 'caption']
# Options for OSM map Using custom ESRI topo map
default_lon = -9285175
@@ -29,6 +36,21 @@ class LuxImageAdmin(OSMGeoAdmin):
map_template = 'gis/admin/osm.html'
openlayers_url = '/static/admin/js/OpenLayers.js'
+ fieldsets = (
+ (None, {
+ 'fields': (('image', 'pub_date'), 'sizes', ('title', 'alt'), 'caption', 'point', ('is_public', 'is_video'), ('photo_credit_source','photo_credit_url'))
+ }),
+ ('Exif Data', {
+ 'classes': ('collapse',),
+ 'fields': ('exif_raw', 'exif_aperture', 'exif_make', 'exif_model', 'exif_exposure', 'exif_iso', 'exif_focal_length', 'exif_lens', 'exif_date', 'height', 'width'),
+ }),
+ )
+
+
+
+
+
+
admin.site.register(LuxImage, LuxImageAdmin)