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 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(request, song_id): > p = get_object_or_404(Song, pk=song_id) > u = request.user.id > if request.method == 'GET': > # save song > p = > UserSong(user_id=u,song=p,added_date=datetime.date.today()) > p.save() > request.user.message_set.create(message="Your song was > added successfully.") > return songs(request) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---