Esempio n. 1
0
def resetrepo(request):
    if request.method != 'POST':
        return HttpResponseNotAllowed(['POST'])
    controllers.GitRepository(request.user.username).reset()
    controllers.unset_mission_completed(request.user.get_profile(), 'git_config')
    controllers.unset_mission_completed(request.user.get_profile(), 'git_checkout')
    controllers.unset_mission_completed(request.user.get_profile(), 'git_diff')
    controllers.unset_mission_completed(request.user.get_profile(), 'git_rebase')
    if 'stay_on_this_page' in request.GET:
        return HttpResponseRedirect(reverse(main_page))
    else:
        return HttpResponseRedirect(reverse(long_description))
Esempio n. 2
0
def resetrepo(request):
    if request.method != 'POST':
        return HttpResponseNotAllowed(['POST'])
    controllers.GitRepository(request.user.username).reset()
    controllers.unset_mission_completed(request.user.get_profile(),
                                        'git_checkout')
    controllers.unset_mission_completed(request.user.get_profile(), 'git_diff')
    controllers.unset_mission_completed(request.user.get_profile(),
                                        'git_rebase')
    if 'stay_on_this_page' in request.GET:
        return HttpResponseRedirect(reverse(main_page))
    else:
        return HttpResponseRedirect(reverse(checkout))