misc: apply django-upgrade (#69798)
This commit is contained in:
parent
8e09b2f73d
commit
cd498afcb0
|
@ -14,7 +14,8 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.conf.urls import include, re_path
|
from django.conf.urls import re_path
|
||||||
|
from django.urls import include
|
||||||
|
|
||||||
from combo.urls_utils import decorated_includes, staff_required
|
from combo.urls_utils import decorated_includes, staff_required
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.conf.urls import include, re_path
|
from django.conf.urls import re_path
|
||||||
|
from django.urls import include
|
||||||
|
|
||||||
from combo.urls_utils import decorated_includes, staff_required
|
from combo.urls_utils import decorated_includes, staff_required
|
||||||
|
|
||||||
|
|
|
@ -808,8 +808,8 @@ class ItemDownloadView(View):
|
||||||
if data.status_code != 200:
|
if data.status_code != 200:
|
||||||
logging.error('failed to retrieve invoice (%r)', data.status_code)
|
logging.error('failed to retrieve invoice (%r)', data.status_code)
|
||||||
messages.error(request, _('We are sorry but an error occured when retrieving the invoice.'))
|
messages.error(request, _('We are sorry but an error occured when retrieving the invoice.'))
|
||||||
if self.request.META.get('HTTP_REFERER'):
|
if self.request.headers.get('Referer'):
|
||||||
return HttpResponseRedirect(self.request.META.get('HTTP_REFERER'))
|
return HttpResponseRedirect(self.request.headers.get('Referer'))
|
||||||
return HttpResponseRedirect('/')
|
return HttpResponseRedirect('/')
|
||||||
|
|
||||||
r = HttpResponse(data, content_type='application/pdf')
|
r = HttpResponse(data, content_type='application/pdf')
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.conf.urls import include, re_path
|
from django.conf.urls import re_path
|
||||||
|
from django.urls import include
|
||||||
|
|
||||||
from combo.urls_utils import decorated_includes, staff_required
|
from combo.urls_utils import decorated_includes, staff_required
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.conf.urls import include, re_path
|
from django.conf.urls import re_path
|
||||||
|
from django.urls import include
|
||||||
|
|
||||||
from combo.urls_utils import decorated_includes, staff_required
|
from combo.urls_utils import decorated_includes, staff_required
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.conf.urls import include, re_path
|
from django.conf.urls import re_path
|
||||||
|
from django.urls import include
|
||||||
|
|
||||||
from combo.urls_utils import decorated_includes, manager_required
|
from combo.urls_utils import decorated_includes, manager_required
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,9 @@ import logging
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
from django.apps import apps
|
from django.apps import apps
|
||||||
from django.conf.urls import include, re_path
|
from django.conf.urls import re_path
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
|
from django.urls import include
|
||||||
from django.views.debug import technical_404_response
|
from django.views.debug import technical_404_response
|
||||||
|
|
||||||
from .urls_utils import decorated_includes, staff_required
|
from .urls_utils import decorated_includes, staff_required
|
||||||
|
|
|
@ -15,10 +15,11 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import include, re_path
|
from django.conf.urls import re_path
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||||
|
from django.urls import include
|
||||||
from django.views.i18n import JavaScriptCatalog
|
from django.views.i18n import JavaScriptCatalog
|
||||||
|
|
||||||
from . import plugins
|
from . import plugins
|
||||||
|
|
Loading…
Reference in New Issue