1 2 3 4 5 6 | def form_kwargs(request):
kwargs = {}
if request.method == 'POST':
kwargs['data'] = request.POST
kwargs['files'] = request.FILES
return kwargs
|
1 2 3 4 5 6 | def form_kwargs(request):
kwargs = {}
if request.method == 'POST':
kwargs['data'] = request.POST
kwargs['files'] = request.FILES
return kwargs
|
Comments
Maybe its just me, but I don't see how this is "DRY"er. Not even sure what the point of it is.
#
Normally, you'd write:
Now you write:
#