summaryrefslogtreecommitdiff
path: root/fotos
diff options
context:
space:
mode:
authorJoaquín Aguirrezabalaga <kinote@kinote.org>2014-01-03 01:06:22 +0100
committerJoaquín Aguirrezabalaga <kinote@kinote.org>2014-01-03 01:06:40 +0100
commitf05c5e2d8a705df1c94b63a978267b291c893bbb (patch)
treea8bd95e9cc2c0bd48be57893ccc4ddec63152d29 /fotos
parent802a74102b9073e961ef1d7a487f99b962d76512 (diff)
downloadelgarito-master.tar.gz
elgarito-master.zip
django 1.6HEADmaster
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}))