pytask/taskapp/views.py
changeset 429 288ce2de2172
parent 428 c9d8cd54195e
child 430 a11a778fca54
equal deleted inserted replaced
428:c9d8cd54195e 429:288ce2de2172
    44                 task_url = reverse('view_task', kwargs={'task_id': task.id})
    44                 task_url = reverse('view_task', kwargs={'task_id': task.id})
    45                 return shortcuts.redirect(task_url)
    45                 return shortcuts.redirect(task_url)
    46             else:
    46             else:
    47                 context.update({'form':form})
    47                 context.update({'form':form})
    48                 return shortcuts.render_to_response(
    48                 return shortcuts.render_to_response(
    49                   'task/create.html', context)
    49                   'task/edit.html', context)
    50         else:
    50         else:
    51             form = taskapp_forms.CreateTaskForm()
    51             form = taskapp_forms.CreateTaskForm()
    52             context.update({'form': form})
    52             context.update({'form': form})
    53             return shortcuts.render_to_response('task/create.html', context)
    53             return shortcuts.render_to_response('task/edit.html', context)
    54     else:
    54     else:
    55         return show_msg(user, 'You are not authorised to create a task.')
    55         return show_msg(user, 'You are not authorised to create a task.')
    56 
    56 
    57 def browse_tasks(request):
    57 def browse_tasks(request):
    58 
    58