def edit_player(request, key): PlayerForm = make_player_form(request) return update_object(request, object_id=key, form_class=PlayerForm, post_save_redirect=reverse('pingpong.views.show_player', kwargs=dict(key='%(key)s')))
def add_player(request): PlayerForm = make_player_form(request) return create_object(request, form_class=PlayerForm, post_save_redirect=reverse('pingpong.views.show_player', kwargs=dict(key='%(key)s')))