Question: Python coding-style, Imports

Question

Python coding-style, Imports

Answers 0
Added at 2016-12-09 07:12
Tags
Question

i have seep programmers using isort to sort imports, often use

from django.http import (
    Http404, HttpResponse, HttpResponseBadRequest, HttpResponseNotAllowed,
    HttpResponseRedirect,
)

then

return HttpResponse(...)
...
return HttpResponseRedirect(...)

But i use the following method,

from django import http

then

return http.HttpResponse(...)
...
return http.HttpResponseRedirect(...)

Is there any known problems using the latter method ?

Answers
Source Show
◀ Wstecz