Exemplo n.º 1
0
def long_description_submit(request):
    # Initialize data array and some default values.
    data = {}
    data['git_config_form'] = forms.ConfigForm()
    data['git_config_error_message'] = ''
    if request.method == 'POST':
        form = forms.ConfigForm(request.POST)
        if form.is_valid():
            view_helpers.set_mission_completed(request.user.get_profile(),
                                               'git_config')
            return HttpResponseRedirect(reverse(long_description))

    data['git_config_form'] = form
    return long_description(request, data)
Exemplo n.º 2
0
def long_description(request, passed_data=None):
    state = GitMissionPageState(request, passed_data)
    state.this_mission_page_short_name = 'Setup Git'
    data = state.as_dict_for_template_context()
    data['git_config_form'] = forms.ConfigForm()
    if passed_data:
        data.update(passed_data)
    return (request, 'missions/git/about_git.html', data)