Thanks Maarten, so can I still then iterate through the songs in my
template file?
On Jan 8, 10:00 am, Maarten <[EMAIL PROTECTED]> wrote:
> Hello
>
> """
> def songs(request):
> songs_listing = []
> for songs_list in Song.objects.all():
> songs_dict = {}
>
Hello
"""
def songs(request):
songs_listing = []
for songs_list in Song.objects.all():
songs_dict = {}
songs_dict['list_object'] = songs_list
songs_listing.append(songs_dict)
return render_to_response('songs/songs.html',
{ 's
On Jan 7, 3:05 pm, Darthmahon <[EMAIL PROTECTED]> wrote:
> Hi Doug,
>
> Returning the songs function results worked a treat. I'm looking into
> the generic views part of Django at the moment as it seems to be what
> I want or is it ok for me to do as you suggested above?
I haven't used generic vi
Hi Doug,
Returning the songs function results worked a treat. I'm looking into
the generic views part of Django at the moment as it seems to be what
I want or is it ok for me to do as you suggested above?
Cheers,
Chris
On Jan 7, 8:48 pm, Doug B <[EMAIL PROTECTED]> wrote:
> Couldn't you get what
Couldn't you get what you are looking for by just returning the songs
function results? The view are just python functions, so you can
return a view from a view. If things get to0 confusing that way,
making one or more helper functions shared between different views is
another option.
def add(r
Hi All,
Got a quick question for you. I have a page that lists songs. Each
song has a link that allows a user to add it to their songs list.
Here is the views.py file:
def songs(request):
songs_listing = []
for songs_list in Song.objects.all():
songs_dict = {}
6 matches
Mail list logo