summaryrefslogtreecommitdiff
path: root/fotos
diff options
context:
space:
mode:
Diffstat (limited to 'fotos')
-rw-r--r--fotos/admin.py4
-rw-r--r--fotos/views.py22
2 files changed, 17 insertions, 9 deletions
diff --git a/fotos/admin.py b/fotos/admin.py
index 8a5f94a..f5cc4cc 100644
--- a/fotos/admin.py
+++ b/fotos/admin.py
@@ -1,12 +1,14 @@
# vim: set fileencoding=utf-8 ts=4 shiftwidth=4 softtabstop=4 expandtab:
from django.contrib import admin
-from elgarito.fotos.models import Album, Foto
+from fotos.models import Album, Foto
+
class AlbumAdmin(admin.ModelAdmin):
list_display = ('nombre', 'autor', 'created_on')
admin.site.register(Album, AlbumAdmin)
+
class FotoAdmin(admin.ModelAdmin):
list_display = ('nombre', 'album', 'autor', 'created_on')
diff --git a/fotos/views.py b/fotos/views.py
index 6b0fd91..4288fc8 100644
--- a/fotos/views.py
+++ b/fotos/views.py
@@ -1,18 +1,24 @@
-from elgarito.fotos.models import Album, Foto, Tag
-from django.shortcuts import render_to_response, get_object_or_404
+from fotos.models import Album
+from django.shortcuts import render_to_response
from django.template import RequestContext
+
def index(request):
lista_albums = Album.objects.all()
- return render_to_response('fotos/index.html', RequestContext(request,
- {'lista_albums': lista_albums}))
+ return render_to_response('fotos/index.html',
+ RequestContext(request,
+ {'lista_albums': lista_albums}))
+
def album(request):
lista_albums = Album.objects.all()
- return render_to_response('fotos/index.html', RequestContext(request,
- {'lista_albums': lista_albums}))
+ return render_to_response('fotos/index.html',
+ RequestContext(request,
+ {'lista_albums': lista_albums}))
+
def foto(request):
lista_albums = Album.objects.all()
- return render_to_response('fotos/index.html', RequestContext(request,
- {'lista_albums': lista_albums}))
+ return render_to_response('fotos/index.html',
+ RequestContext(request,
+ {'lista_albums': lista_albums}))