Ejemplo n.º 1
0
def admin_delete_venue(request, id):
    try:
        venue = Venue.objects.get(pk=id)
    except Venue.DoesNotExist:
        pass
    else:
        venue_service.delete_venue(venue)

    return HttpResponseRedirect(reverse('admin_venues'))
Ejemplo n.º 2
0
def remove_venue(request, venue_id):
    try:
        venue = Venue.objects.get(pk=venue_id, user=request.user, suggested=True)
        venue_service.delete_venue(venue)

        return HttpResponseRedirect(reverse('userena_profile_detail', kwargs={'username': request.user.username}))
    except Venue.DoesNotExist:
        resp = render_to_response('403.html', context_instance=RequestContext(request))
        resp.status_code = 403
        return resp
Ejemplo n.º 3
0
def admin_delete_venue(request, id):
    try:
        venue = Venue.objects.get(pk=id)
    except Venue.DoesNotExist:
        pass
    else:
        venue_service.delete_venue(venue)

    return HttpResponseRedirect(
        reverse('admin_venues')
    )
Ejemplo n.º 4
0
def remove_venue(request, venue_id):
    try:
        venue = Venue.objects.get(pk=venue_id,
                                  user=request.user,
                                  suggested=True)
        venue_service.delete_venue(venue)

        return HttpResponseRedirect(
            reverse('userena_profile_detail',
                    kwargs={'username': request.user.username}))
    except Venue.DoesNotExist:
        resp = render_to_response('403.html',
                                  context_instance=RequestContext(request))
        resp.status_code = 403
        return resp