Ejemplo n.º 1
0
def delete_event(request, event_key):
    e = None
    try:
        e = AutoRetry(PlaylistEvent).get(event_key)
    except BadKeyError:
        pass
    else:
        if e and e.selector.key() == auth.get_current_user(request).key():
            e.delete()
            playlist_event_listeners.delete(event_key)

    return HttpResponseRedirect(reverse("playlists_landing_page"))
Ejemplo n.º 2
0
def delete_event(request, event_key):
    e = None
    try:
        e = AutoRetry(PlaylistEvent).get(event_key)
    except BadKeyError:
        pass
    else:
        if e and e.selector.key() == auth.get_current_user(request).key():
            e.delete()
            playlist_event_listeners.delete(event_key)

    return HttpResponseRedirect(reverse('playlists_landing_page'))
Ejemplo n.º 3
0
def delete_event(request, event_key):
    e = None
    try:
        e = AutoRetry(PlaylistEvent).get(event_key)
    except BadKeyError:
        pass
    else:
        if e and e.selector.key() == auth.get_current_user(request).key():
            e.delete()
            # This avoids seeing dupes after deleting the last
            # submitted track.
            memcache.delete('playlist.last_track')
            playlist_event_listeners.delete(event_key)

    return HttpResponseRedirect(reverse('playlists_landing_page'))
Ejemplo n.º 4
0
def delete_event(request, event_key):
    e = None
    try:
        e = AutoRetry(PlaylistEvent).get(event_key)
    except BadKeyError:
        pass
    else:
        if e and e.selector.key() == auth.get_current_user(request).key():
            e.delete()
            # This avoids seeing dupes after deleting the last
            # submitted track.
            memcache.delete('playlist.last_track')
            playlist_event_listeners.delete(event_key)

    return HttpResponseRedirect(reverse('playlists_landing_page'))