mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 07:41:14 +00:00
fix imports
This commit is contained in:
parent
76e9f3b1dc
commit
10f42b1522
@ -15,28 +15,16 @@
|
||||
|
||||
from django.urls import path
|
||||
|
||||
from counter.views import (
|
||||
from counter.views.admin import (
|
||||
ActiveProductListView,
|
||||
ArchivedProductListView,
|
||||
CashSummaryEditView,
|
||||
CashSummaryListView,
|
||||
CounterActivityView,
|
||||
CounterCashSummaryView,
|
||||
CounterClick,
|
||||
CounterCreateView,
|
||||
CounterDeleteView,
|
||||
CounterEditPropView,
|
||||
CounterEditView,
|
||||
CounterLastOperationsView,
|
||||
CounterListView,
|
||||
CounterMain,
|
||||
CounterRefillingListView,
|
||||
CounterStatView,
|
||||
EticketCreateView,
|
||||
EticketEditView,
|
||||
EticketListView,
|
||||
EticketPDFView,
|
||||
InvoiceCallView,
|
||||
ProductCreateView,
|
||||
ProductEditView,
|
||||
ProductTypeCreateView,
|
||||
@ -44,6 +32,24 @@ from counter.views import (
|
||||
ProductTypeListView,
|
||||
RefillingDeleteView,
|
||||
SellingDeleteView,
|
||||
)
|
||||
from counter.views.cash import (
|
||||
CashSummaryEditView,
|
||||
CashSummaryListView,
|
||||
CounterCashSummaryView,
|
||||
)
|
||||
from counter.views.click import CounterClick
|
||||
from counter.views.eticket import (
|
||||
EticketCreateView,
|
||||
EticketEditView,
|
||||
EticketListView,
|
||||
EticketPDFView,
|
||||
)
|
||||
from counter.views.invoice import InvoiceCallView
|
||||
from counter.views.main import (
|
||||
CounterActivityView,
|
||||
CounterLastOperationsView,
|
||||
CounterMain,
|
||||
StudentCardDeleteView,
|
||||
StudentCardFormView,
|
||||
counter_login,
|
||||
|
@ -32,6 +32,7 @@ from core.views import CanEditMixin, CanViewMixin
|
||||
from counter.forms import CounterEditForm, ProductEditForm
|
||||
from counter.models import Counter, Product, ProductType, Refilling, Selling
|
||||
from counter.utils import is_logged_in_counter
|
||||
from counter.views.mixins import CounterAdminMixin, CounterAdminTabsMixin
|
||||
|
||||
|
||||
class CounterListView(CounterAdminTabsMixin, CanViewMixin, ListView):
|
||||
|
@ -32,6 +32,11 @@ from counter.models import (
|
||||
Refilling,
|
||||
)
|
||||
from counter.utils import is_logged_in_counter
|
||||
from counter.views.mixins import (
|
||||
CounterAdminMixin,
|
||||
CounterAdminTabsMixin,
|
||||
CounterTabsMixin,
|
||||
)
|
||||
|
||||
|
||||
class CashRegisterSummaryForm(forms.Form):
|
||||
|
@ -29,6 +29,7 @@ from django.views.generic import DetailView
|
||||
from core.views import CanViewMixin
|
||||
from counter.forms import NFCCardForm, RefillForm
|
||||
from counter.models import Counter, Customer, Product, Selling, StudentCard
|
||||
from counter.views.mixins import CounterTabsMixin
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.models import User
|
||||
|
@ -21,6 +21,7 @@ from django.views.generic.edit import CreateView, UpdateView
|
||||
from core.views import CanViewMixin
|
||||
from counter.forms import EticketForm
|
||||
from counter.models import Eticket, Selling
|
||||
from counter.views.mixins import CounterAdminMixin, CounterAdminTabsMixin
|
||||
|
||||
|
||||
class EticketListView(CounterAdminTabsMixin, CounterAdminMixin, ListView):
|
||||
|
@ -21,6 +21,7 @@ from django.views.generic import TemplateView
|
||||
|
||||
from accounting.models import CurrencyField
|
||||
from counter.models import Refilling, Selling
|
||||
from counter.views.mixins import CounterAdminMixin, CounterAdminTabsMixin
|
||||
|
||||
|
||||
class InvoiceCallView(CounterAdminTabsMixin, CounterAdminMixin, TemplateView):
|
||||
|
@ -12,76 +12,26 @@
|
||||
# OR WITHIN THE LOCAL FILE "LICENSE"
|
||||
#
|
||||
#
|
||||
import itertools
|
||||
import re
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import timezone as tz
|
||||
from http import HTTPStatus
|
||||
from operator import itemgetter
|
||||
from typing import TYPE_CHECKING
|
||||
from urllib.parse import parse_qs
|
||||
from datetime import timedelta
|
||||
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.db import DataError, transaction
|
||||
from django.db.models import F
|
||||
from django.forms import CheckboxSelectMultiple
|
||||
from django.forms.models import modelform_factory
|
||||
from django.http import (
|
||||
Http404,
|
||||
HttpRequest,
|
||||
HttpResponse,
|
||||
HttpResponseRedirect,
|
||||
JsonResponse,
|
||||
)
|
||||
from django.http import HttpRequest, HttpResponseRedirect
|
||||
from django.shortcuts import get_object_or_404, redirect
|
||||
from django.urls import reverse, reverse_lazy
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.decorators.http import require_POST
|
||||
from django.views.generic import DetailView, ListView, TemplateView
|
||||
from django.views.generic.base import View
|
||||
from django.views.generic.edit import (
|
||||
CreateView,
|
||||
DeleteView,
|
||||
FormMixin,
|
||||
FormView,
|
||||
ProcessFormView,
|
||||
UpdateView,
|
||||
)
|
||||
from django.views.generic import DetailView
|
||||
from django.views.generic.edit import DeleteView, FormMixin, FormView, ProcessFormView
|
||||
|
||||
from accounting.models import CurrencyField
|
||||
from core.utils import get_semester_code, get_start_of_semester
|
||||
from core.views import CanEditMixin, CanViewMixin, TabedViewMixin
|
||||
from core.views import CanEditMixin, CanViewMixin
|
||||
from core.views.forms import LoginForm
|
||||
from counter.forms import (
|
||||
CashSummaryFormBase,
|
||||
CounterEditForm,
|
||||
EticketForm,
|
||||
GetUserForm,
|
||||
NFCCardForm,
|
||||
ProductEditForm,
|
||||
RefillForm,
|
||||
StudentCardForm,
|
||||
)
|
||||
from counter.models import (
|
||||
CashRegisterSummary,
|
||||
CashRegisterSummaryItem,
|
||||
Counter,
|
||||
Customer,
|
||||
Eticket,
|
||||
Permanency,
|
||||
Product,
|
||||
ProductType,
|
||||
Refilling,
|
||||
Selling,
|
||||
StudentCard,
|
||||
)
|
||||
from counter.forms import GetUserForm, StudentCardForm
|
||||
from counter.models import Counter, Customer, Permanency, StudentCard
|
||||
from counter.utils import is_logged_in_counter
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.models import User
|
||||
from counter.views.mixins import CounterTabsMixin
|
||||
|
||||
|
||||
class StudentCardDeleteView(DeleteView, CanEditMixin):
|
||||
|
Loading…
Reference in New Issue
Block a user