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