mirror of
https://github.com/ae-utbm/sith.git
synced 2026-06-21 07:22:40 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f15facd8f | |||
| 0ba001ccda | |||
| feca466dbe | |||
| 519a7758c5 | |||
| caa2bf66be | |||
| 998efc7c6b | |||
| 867362fb51 | |||
| d41a3a524a | |||
| 39bbbc8878 | |||
| 5e553d91a8 | |||
| f6f31af975 |
@@ -200,7 +200,11 @@ class TestFilterInactive(TestCase):
|
||||
]
|
||||
sale_recipe.make(customer=cls.users[3].customer, date=time_active)
|
||||
baker.make(
|
||||
Refilling, customer=cls.users[4].customer, date=time_active, counter=counter
|
||||
Refilling,
|
||||
customer=cls.users[4].customer,
|
||||
date=time_active,
|
||||
counter=counter,
|
||||
amount=1,
|
||||
)
|
||||
sale_recipe.make(customer=cls.users[5].customer, date=time_inactive)
|
||||
|
||||
@@ -455,7 +459,9 @@ def test_user_preferences(client: Client):
|
||||
@pytest.mark.django_db
|
||||
def test_user_stats(client: Client):
|
||||
user = subscriber_user.make()
|
||||
baker.make(Refilling, customer=user.customer, amount=99999)
|
||||
baker.make(
|
||||
Refilling, customer=user.customer, amount=settings.SITH_ACCOUNT_MAX_MONEY
|
||||
)
|
||||
bars = [b[0] for b in settings.SITH_COUNTER_BARS]
|
||||
baker.make(
|
||||
Permanency,
|
||||
|
||||
+50
-4
@@ -1,22 +1,68 @@
|
||||
from decimal import Decimal
|
||||
|
||||
from django.conf import settings
|
||||
from django.core import checks
|
||||
from django.core.validators import MaxValueValidator, MinValueValidator
|
||||
from django.db import models
|
||||
from django.utils.functional import cached_property
|
||||
|
||||
|
||||
class CurrencyField(models.DecimalField):
|
||||
"""Custom database field used for currency."""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs["max_digits"] = 12
|
||||
kwargs["decimal_places"] = 2
|
||||
super().__init__(*args, **kwargs)
|
||||
def __init__(
|
||||
self, verbose_name=None, name=None, min_value=None, max_value=None, **kwargs
|
||||
):
|
||||
kwargs.update({"max_digits": 12, "decimal_places": 2})
|
||||
self.min_value = min_value
|
||||
self.max_value = max_value
|
||||
super().__init__(verbose_name, name, **kwargs)
|
||||
|
||||
def to_python(self, value):
|
||||
if value is None:
|
||||
return None
|
||||
return super().to_python(value).quantize(Decimal("0.01"))
|
||||
|
||||
@cached_property
|
||||
def validators(self):
|
||||
res = []
|
||||
if self.max_value:
|
||||
res.append(MaxValueValidator(self.max_value))
|
||||
if self.min_value:
|
||||
res.append(MinValueValidator(self.min_value))
|
||||
return [*super().validators, *res]
|
||||
|
||||
def check(self, **kwargs): # pragma: no cover
|
||||
# this is executed during runserver, but won't run in prod
|
||||
errors = super().check(**kwargs)
|
||||
for name, val in ("min_value", self.min_value), ("max_value", self.max_value):
|
||||
if not val:
|
||||
continue
|
||||
try:
|
||||
float(val)
|
||||
except ValueError:
|
||||
errors.append(
|
||||
checks.Error(
|
||||
f"CurrencyField.{name} must be a valid float",
|
||||
obj=self,
|
||||
id="sith.E001",
|
||||
)
|
||||
)
|
||||
return errors
|
||||
|
||||
def formfield(self, **kwargs):
|
||||
return super().formfield(
|
||||
**{"min_value": self.min_value, "max_value": self.max_value, **kwargs}
|
||||
)
|
||||
|
||||
def deconstruct(self):
|
||||
name, path, args, kwargs = super().deconstruct()
|
||||
if self.min_value is not None:
|
||||
kwargs["min_value"] = self.min_value
|
||||
if self.max_value is not None:
|
||||
kwargs["max_value"] = self.max_value
|
||||
return name, path, args, kwargs
|
||||
|
||||
|
||||
if settings.TESTING:
|
||||
from model_bakery import baker
|
||||
|
||||
+60
-28
@@ -3,13 +3,16 @@ import math
|
||||
import uuid
|
||||
from collections import defaultdict
|
||||
from datetime import date, datetime, timezone
|
||||
from typing import ClassVar
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db.models import Exists, OuterRef, Q
|
||||
from django.forms import BaseModelFormSet
|
||||
from django.http import HttpRequest
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.timezone import now
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django_celery_beat.models import ClockedSchedule
|
||||
@@ -39,6 +42,7 @@ from counter.models import (
|
||||
Customer,
|
||||
Eticket,
|
||||
InvoiceCall,
|
||||
Permanency,
|
||||
Price,
|
||||
Product,
|
||||
ProductFormula,
|
||||
@@ -151,12 +155,13 @@ class CounterLoginForm(LoginForm):
|
||||
raise ValidationError(
|
||||
message=_("You are not a barman of this counter."), code="not_barman"
|
||||
)
|
||||
if Permanency.objects.filter(end=None, user=user).exists():
|
||||
if user in self.request.barmen:
|
||||
message = (
|
||||
_("You are already logged in this counter.")
|
||||
if user in self.counter.barmen_list
|
||||
else _("You are already logged in another counter.")
|
||||
)
|
||||
message = _("You are already logged in this counter.")
|
||||
elif user in self.counter.barmen_list:
|
||||
message = _("You are already logged in another counter.")
|
||||
else:
|
||||
message = _("You are already logged on another device")
|
||||
raise ValidationError(message=message, code="already_logged_in")
|
||||
|
||||
|
||||
@@ -168,18 +173,19 @@ class RefillForm(forms.ModelForm):
|
||||
|
||||
error_css_class = "error"
|
||||
required_css_class = "required"
|
||||
amount = forms.FloatField(
|
||||
min_value=0, widget=forms.NumberInput(attrs={"class": "focus"})
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = Refilling
|
||||
fields = ["amount", "payment_method"]
|
||||
widgets = {"payment_method": forms.RadioSelect}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
def __init__(
|
||||
self, *args, counter: Counter, operator: User, customer: Customer, **kwargs
|
||||
):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
max_value = settings.SITH_ACCOUNT_MAX_MONEY - customer.amount
|
||||
# server-side max_value validation is done by Refilling.clean
|
||||
self.fields["amount"].widget.attrs["max"] = max_value
|
||||
self.fields["payment_method"].choices = (
|
||||
method
|
||||
for method in self.fields["payment_method"].choices
|
||||
@@ -187,6 +193,9 @@ class RefillForm(forms.ModelForm):
|
||||
)
|
||||
if self.fields["payment_method"].initial not in self.allowed_refilling_methods:
|
||||
self.fields["payment_method"].initial = self.allowed_refilling_methods[0]
|
||||
self.instance.counter = counter
|
||||
self.instance.operator = operator
|
||||
self.instance.customer = customer
|
||||
|
||||
|
||||
class CounterEditForm(forms.ModelForm):
|
||||
@@ -560,16 +569,7 @@ class BasketItemForm(forms.Form):
|
||||
quantity = forms.IntegerField(min_value=1, required=True)
|
||||
price_id = forms.IntegerField(min_value=0, required=True)
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
customer: Customer,
|
||||
counter: Counter,
|
||||
allowed_prices: dict[int, Price],
|
||||
*args,
|
||||
**kwargs,
|
||||
):
|
||||
self.customer = customer # Used by formset
|
||||
self.counter = counter # Used by formset
|
||||
def __init__(self, allowed_prices: dict[int, Price], *args, **kwargs):
|
||||
self.allowed_prices = allowed_prices
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
@@ -604,6 +604,15 @@ class BasketItemForm(forms.Form):
|
||||
|
||||
|
||||
class BaseBasketForm(forms.BaseFormSet):
|
||||
# Minimum amount of money there must be on the account after the transaction
|
||||
# If None, the min balance check is skipped
|
||||
min_result_balance: ClassVar[int | None] = 0
|
||||
|
||||
def __init__(self, *args, customer: Customer, counter: Counter, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.customer = customer
|
||||
self.counter = counter
|
||||
|
||||
def clean(self):
|
||||
self.forms = [form for form in self.forms if form.cleaned_data != {}]
|
||||
|
||||
@@ -612,8 +621,8 @@ class BaseBasketForm(forms.BaseFormSet):
|
||||
|
||||
self._check_forms_have_errors()
|
||||
self._check_product_are_unique()
|
||||
self._check_recorded_products(self[0].customer)
|
||||
self._check_enough_money(self[0].counter, self[0].customer)
|
||||
self._check_recorded_products()
|
||||
self._check_account_balance()
|
||||
|
||||
def _check_forms_have_errors(self):
|
||||
if any(len(form.errors) > 0 for form in self):
|
||||
@@ -624,12 +633,35 @@ class BaseBasketForm(forms.BaseFormSet):
|
||||
if len(price_ids) != len(self.forms):
|
||||
raise forms.ValidationError(_("Duplicated product entries."))
|
||||
|
||||
def _check_enough_money(self, counter: Counter, customer: Customer):
|
||||
self.total_price = sum([data["total_price"] for data in self.cleaned_data])
|
||||
if self.total_price > customer.amount:
|
||||
raise forms.ValidationError(_("Not enough money"))
|
||||
@cached_property
|
||||
def total_price(self):
|
||||
refill = settings.SITH_COUNTER_PRODUCTTYPE_REFILLING
|
||||
total_other = sum(
|
||||
form.cleaned_data["total_price"]
|
||||
for form in self.forms
|
||||
if form.price.product.product_type_id != refill
|
||||
)
|
||||
total_refill = sum(
|
||||
form.cleaned_data["total_price"]
|
||||
for form in self.forms
|
||||
if form.price.product.product_type_id == refill
|
||||
)
|
||||
return total_other - total_refill
|
||||
|
||||
def _check_recorded_products(self, customer: Customer):
|
||||
def _check_account_balance(self):
|
||||
result_balance = self.customer.amount - self.total_price
|
||||
if (
|
||||
self.min_result_balance is not None
|
||||
and self.min_result_balance > result_balance
|
||||
):
|
||||
raise forms.ValidationError(_("Not enough money"))
|
||||
if result_balance > settings.SITH_ACCOUNT_MAX_MONEY:
|
||||
raise ValidationError(
|
||||
_("There cannot be more than %(money)d€ on an AE account")
|
||||
% {"money": settings.SITH_ACCOUNT_MAX_MONEY}
|
||||
)
|
||||
|
||||
def _check_recorded_products(self):
|
||||
"""Check for, among other things, ecocups and pitchers"""
|
||||
items = defaultdict(int)
|
||||
for form in self.forms:
|
||||
@@ -638,7 +670,7 @@ class BaseBasketForm(forms.BaseFormSet):
|
||||
returnables = list(
|
||||
ReturnableProduct.objects.filter(
|
||||
Q(product_id__in=ids) | Q(returned_product_id__in=ids)
|
||||
).annotate_balance_for(customer)
|
||||
).annotate_balance_for(self.customer)
|
||||
)
|
||||
limit_reached = []
|
||||
for returnable in returnables:
|
||||
|
||||
+21
-19
@@ -1,8 +1,7 @@
|
||||
from typing import TYPE_CHECKING, Callable
|
||||
|
||||
from django.db.models import Exists, OuterRef
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
from django.utils.functional import SimpleLazyObject, empty
|
||||
from django.utils.functional import SimpleLazyObject
|
||||
|
||||
from core.models import User
|
||||
from counter.models import Permanency
|
||||
@@ -11,20 +10,31 @@ if TYPE_CHECKING:
|
||||
from django.contrib.sessions.backends.base import SessionBase
|
||||
|
||||
|
||||
SESSION_BARMEN_KEY = "barmen_ids"
|
||||
SESSION_PERMANENCES_KEY = "permanence_ids"
|
||||
|
||||
|
||||
def get_cached_barmen(request: HttpRequest) -> set[User]:
|
||||
if not hasattr(request, "_cached_barmen"):
|
||||
session: SessionBase = request.session
|
||||
barmen_ids = session.get(SESSION_BARMEN_KEY, [])
|
||||
if barmen_ids:
|
||||
request._cached_barmen = set(
|
||||
User.objects.filter(
|
||||
Exists(Permanency.objects.filter(user=OuterRef("pk"), end=None)),
|
||||
id__in=barmen_ids,
|
||||
)
|
||||
|
||||
if session_ids := session.get(SESSION_PERMANENCES_KEY, None):
|
||||
# Get ongoing permanences which id is in session.
|
||||
# Note : we store permanence ids rather than user id to be sure
|
||||
# not to wrongfully mark someone as logged here,
|
||||
# even if it logged out then logged in elsewhere.
|
||||
permanences = (
|
||||
Permanency.objects.filter(end=None, id__in=session_ids)
|
||||
.order_by("id")
|
||||
.select_related("user")
|
||||
)
|
||||
|
||||
# if the list of permanences occurring on this device has changed
|
||||
# since the last page load, change the ids stored in session
|
||||
real_ids = [p.id for p in permanences]
|
||||
if real_ids != session_ids:
|
||||
session[SESSION_PERMANENCES_KEY] = real_ids
|
||||
|
||||
request._cached_barmen = {p.user for p in permanences}
|
||||
else:
|
||||
request._cached_barmen = set()
|
||||
|
||||
@@ -53,12 +63,4 @@ class BarmenMiddleware:
|
||||
def __call__(self, request: HttpRequest):
|
||||
request.barmen = SimpleLazyObject(lambda: get_cached_barmen(request))
|
||||
|
||||
response = self.get_response(request)
|
||||
|
||||
if request.barmen._wrapped is not empty and {
|
||||
b.id for b in request.barmen
|
||||
} != set(request.session.get(SESSION_BARMEN_KEY, [])):
|
||||
# update the session data only if `session.barmen`
|
||||
# has been accessed and modified.
|
||||
request.session[SESSION_BARMEN_KEY] = [b.id for b in request.barmen]
|
||||
return response
|
||||
return self.get_response(request)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# Generated by Django 5.2.15 on 2026-06-07 12:08
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
import counter.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [("counter", "0041_alter_billinginfo_country_and_more")]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="customer",
|
||||
name="amount",
|
||||
field=counter.fields.CurrencyField(
|
||||
decimal_places=2,
|
||||
default=0,
|
||||
max_digits=12,
|
||||
max_value=250,
|
||||
verbose_name="amount",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="refilling",
|
||||
name="amount",
|
||||
field=counter.fields.CurrencyField(
|
||||
decimal_places=2, max_digits=12, min_value=0.01, verbose_name="amount"
|
||||
),
|
||||
),
|
||||
]
|
||||
+20
-8
@@ -28,7 +28,7 @@ from dict2xml import dict2xml
|
||||
from django.conf import settings
|
||||
from django.core.validators import MinLengthValidator
|
||||
from django.db import models
|
||||
from django.db.models import Exists, F, OuterRef, Q, QuerySet, Subquery, Sum, Value
|
||||
from django.db.models import Exists, F, Max, OuterRef, Q, QuerySet, Subquery, Sum, Value
|
||||
from django.db.models.functions import Coalesce, Concat, Length
|
||||
from django.forms import ValidationError
|
||||
from django.urls import reverse
|
||||
@@ -99,7 +99,9 @@ class Customer(models.Model):
|
||||
|
||||
user = models.OneToOneField(User, primary_key=True, on_delete=models.CASCADE)
|
||||
account_id = models.CharField(_("account id"), max_length=10, unique=True)
|
||||
amount = CurrencyField(_("amount"), default=0)
|
||||
amount: CurrencyField = CurrencyField(
|
||||
_("amount"), max_value=settings.SITH_ACCOUNT_MAX_MONEY, default=0
|
||||
)
|
||||
|
||||
objects = CustomerQuerySet.as_manager()
|
||||
|
||||
@@ -156,13 +158,15 @@ class Customer(models.Model):
|
||||
unique_fields=["customer", "returnable"],
|
||||
)
|
||||
|
||||
@property
|
||||
@cached_property
|
||||
def can_buy(self) -> bool:
|
||||
"""Check if whether this customer has the right to purchase any item."""
|
||||
subscription = self.user.subscriptions.order_by("subscription_end").last()
|
||||
if subscription is None:
|
||||
subscription_end = self.user.subscriptions.aggregate(
|
||||
res=Max("subscription_end")
|
||||
).get("res")
|
||||
if subscription_end is None:
|
||||
return False
|
||||
return (date.today() - subscription.subscription_end) < timedelta(days=90)
|
||||
return (date.today() - subscription_end) < timedelta(days=90)
|
||||
|
||||
@classmethod
|
||||
def get_or_create(cls, user: User) -> tuple[Customer, bool]:
|
||||
@@ -823,7 +827,7 @@ class Refilling(models.Model):
|
||||
counter = models.ForeignKey(
|
||||
Counter, related_name="refillings", blank=False, on_delete=models.CASCADE
|
||||
)
|
||||
amount = CurrencyField(_("amount"))
|
||||
amount: CurrencyField = CurrencyField(_("amount"), min_value=0.01)
|
||||
operator = models.ForeignKey(
|
||||
User,
|
||||
related_name="refillings_as_operator",
|
||||
@@ -877,6 +881,14 @@ class Refilling(models.Model):
|
||||
return False
|
||||
return user.is_owner(self.counter) and self.payment_method != "CARD"
|
||||
|
||||
def clean(self):
|
||||
super().clean()
|
||||
if (self.amount + self.customer.amount) > settings.SITH_ACCOUNT_MAX_MONEY:
|
||||
raise ValidationError(
|
||||
_("There cannot be more than %(money)d€ on an AE account")
|
||||
% {"money": settings.SITH_ACCOUNT_MAX_MONEY}
|
||||
)
|
||||
|
||||
def delete(self, *args, **kwargs):
|
||||
self.customer.amount -= self.amount
|
||||
self.customer.save()
|
||||
@@ -1105,7 +1117,7 @@ class Permanency(models.Model):
|
||||
on_delete=models.CASCADE,
|
||||
)
|
||||
start = models.DateTimeField(_("start date"))
|
||||
end = models.DateTimeField(_("end date"), null=True, db_index=True)
|
||||
end = models.DateTimeField(_("end date"), null=True, blank=True, db_index=True)
|
||||
activity = models.DateTimeField(_("last activity date"), auto_now=True)
|
||||
|
||||
class Meta:
|
||||
|
||||
@@ -6,7 +6,7 @@ const productParsingRegex = /^(\d+x)?(.*)/i;
|
||||
const codeParsingRegex = / \((\w+)\)$/;
|
||||
|
||||
function parseProduct(query: string): [number, string] {
|
||||
const parsed = productParsingRegex.exec(query);
|
||||
const parsed = productParsingRegex.exec(query) as RegExpExecArray;
|
||||
return [Number.parseInt(parsed[1] || "1", 10), parsed[2]];
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import { BasketItem } from "#counter:counter/basket";
|
||||
import type {
|
||||
CounterConfig,
|
||||
CounterItem,
|
||||
ErrorMessage,
|
||||
ProductFormula,
|
||||
} from "#counter:counter/types";
|
||||
import type { CounterProductSelect } from "./components/counter-product-select-index";
|
||||
@@ -24,7 +23,7 @@ document.addEventListener("alpine:init", () => {
|
||||
}
|
||||
}
|
||||
|
||||
this.codeField = this.$refs.codeField;
|
||||
this.codeField = this.$refs.codeField as CounterProductSelect;
|
||||
this.codeField.widget.hook("after", "onOptionSelect", () => {
|
||||
this.handleCode();
|
||||
});
|
||||
@@ -34,14 +33,14 @@ document.addEventListener("alpine:init", () => {
|
||||
// of a formset so we dynamically apply it here
|
||||
this.$refs.basketManagementForm
|
||||
.querySelector("#id_form-TOTAL_FORMS")
|
||||
.setAttribute(":value", "getBasketSize()");
|
||||
?.setAttribute(":value", "getBasketSize()");
|
||||
},
|
||||
|
||||
removeFromBasket(id: string) {
|
||||
delete this.basket[id];
|
||||
},
|
||||
|
||||
addToBasket(id: string, quantity: number): ErrorMessage {
|
||||
addToBasket(id: string, quantity: number) {
|
||||
const item: BasketItem =
|
||||
this.basket[id] || new BasketItem(config.products[id], 0);
|
||||
|
||||
@@ -50,7 +49,7 @@ document.addEventListener("alpine:init", () => {
|
||||
|
||||
if (item.quantity <= 0) {
|
||||
delete this.basket[id];
|
||||
return "";
|
||||
return;
|
||||
}
|
||||
|
||||
this.basket[id] = item;
|
||||
@@ -72,7 +71,7 @@ document.addEventListener("alpine:init", () => {
|
||||
const products = new Set(
|
||||
Object.values(this.basket).map((item: BasketItem) => item.product.productId),
|
||||
);
|
||||
const formula: ProductFormula = config.formulas.find((f: ProductFormula) => {
|
||||
const formula = config.formulas.find((f: ProductFormula) => {
|
||||
return f.products.every((p: number) => products.has(p));
|
||||
});
|
||||
if (formula === undefined) {
|
||||
@@ -80,9 +79,13 @@ document.addEventListener("alpine:init", () => {
|
||||
}
|
||||
// Now that the formula is found, remove the items composing it from the basket
|
||||
for (const product of formula.products) {
|
||||
const key = Object.entries(this.basket).find(
|
||||
const item = Object.entries(this.basket).find(
|
||||
([_, i]: [string, BasketItem]) => i.product.productId === product,
|
||||
)[0];
|
||||
);
|
||||
if (item === undefined) {
|
||||
continue;
|
||||
}
|
||||
const key = item[0];
|
||||
this.basket[key].quantity -= 1;
|
||||
if (this.basket[key].quantity <= 0) {
|
||||
this.removeFromBasket(key);
|
||||
@@ -92,7 +95,7 @@ document.addEventListener("alpine:init", () => {
|
||||
const result = Object.values(config.products)
|
||||
.filter((item: CounterItem) => item.productId === formula.result)
|
||||
.reduce((acc, curr) => (acc.price.amount < curr.price.amount ? acc : curr));
|
||||
this.addToBasket(result.price.id, 1);
|
||||
this.addToBasket(result.price.id.toString(), 1);
|
||||
this.alertMessage.display(
|
||||
interpolate(
|
||||
gettext("Formula %(formula)s applied"),
|
||||
@@ -119,14 +122,18 @@ document.addEventListener("alpine:init", () => {
|
||||
},
|
||||
|
||||
onRefillingSuccess(event: CustomEvent) {
|
||||
if (event.type !== "htmx:after-request" || event.detail.failed) {
|
||||
if (
|
||||
event.type !== "htmx:after-swap" ||
|
||||
event.detail.failed ||
|
||||
event.detail.elt.querySelector(".errorlist")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
this.customerBalance += Number.parseFloat(
|
||||
(event.detail.target.querySelector("#id_amount") as HTMLInputElement).value,
|
||||
);
|
||||
document.getElementById("selling-accordion").setAttribute("open", "");
|
||||
this.codeField.widget.focus();
|
||||
document.getElementById("selling-accordion")?.setAttribute("open", "");
|
||||
this.codeField?.widget.focus();
|
||||
},
|
||||
|
||||
finish() {
|
||||
@@ -136,7 +143,7 @@ document.addEventListener("alpine:init", () => {
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$refs.basketForm.submit();
|
||||
(this.$refs.basketForm as HTMLFormElement).submit();
|
||||
},
|
||||
|
||||
cancel() {
|
||||
@@ -144,6 +151,8 @@ document.addEventListener("alpine:init", () => {
|
||||
},
|
||||
|
||||
handleCode() {
|
||||
if (!this.codeField) throw Error("Unexpected null codeField.");
|
||||
|
||||
const [quantity, code] = this.codeField.getSelectedProduct() as [number, string];
|
||||
|
||||
if (this.codeField.getOperationCodes().includes(code.toUpperCase())) {
|
||||
|
||||
@@ -176,13 +176,17 @@
|
||||
</form>
|
||||
</div>
|
||||
</details>
|
||||
<details class="accordion" name="selling">
|
||||
<details
|
||||
class="accordion"
|
||||
name="selling"
|
||||
@toggle="if ($event.newState === 'open') $el.querySelector('input[type=number]')?.focus()"
|
||||
>
|
||||
<summary>{% trans %}Refilling{% endtrans %}</summary>
|
||||
{% if object.type == "BAR" %}
|
||||
{% if refilling_fragment %}
|
||||
<div
|
||||
class="accordion-content"
|
||||
@htmx:after-request="onRefillingSuccess"
|
||||
@htmx:after-swap="onRefillingSuccess"
|
||||
>
|
||||
{{ refilling_fragment }}
|
||||
</div>
|
||||
|
||||
@@ -144,6 +144,8 @@ class TestRefilling(TestFullClickBase):
|
||||
assert self.updated_amount(self.customer) == 0
|
||||
|
||||
def test_refilling_no_refer_fail(self):
|
||||
"""Check that the refill fails is the HTTP_REFERER header is missing"""
|
||||
|
||||
def refill():
|
||||
return self.client.post(
|
||||
reverse(
|
||||
@@ -157,13 +159,13 @@ class TestRefilling(TestFullClickBase):
|
||||
)
|
||||
|
||||
self.client.force_login(self.club_admin)
|
||||
assert refill()
|
||||
assert refill().status_code == 403
|
||||
|
||||
self.client.force_login(self.root)
|
||||
assert refill()
|
||||
assert refill().status_code == 403
|
||||
|
||||
self.client.force_login(self.subscriber)
|
||||
assert refill()
|
||||
assert refill().status_code == 403
|
||||
|
||||
assert self.updated_amount(self.customer) == 0
|
||||
|
||||
@@ -199,6 +201,17 @@ class TestRefilling(TestFullClickBase):
|
||||
== 404
|
||||
)
|
||||
|
||||
def test_refilling_above_limit_fails(self):
|
||||
"""Test that it's forbidden to refill a customer above the limit."""
|
||||
self.login_in_bar()
|
||||
limit = settings.SITH_ACCOUNT_MAX_MONEY
|
||||
# create a refilling to check that current balance is taken into account
|
||||
baker.make(Refilling, customer=self.customer.customer, amount=limit // 2)
|
||||
response = self.refill_user(self.customer, self.counter, (limit // 2) + 1)
|
||||
assert response.status_code == 200 # no redirect = failure
|
||||
self.customer.customer.refresh_from_db()
|
||||
assert self.updated_amount(self.customer) == limit // 2
|
||||
|
||||
def test_refilling_counter_success(self):
|
||||
self.login_in_bar()
|
||||
|
||||
@@ -522,6 +535,19 @@ class TestCounterClick(TestFullClickBase):
|
||||
|
||||
assert self.updated_amount(self.customer) == Decimal(10)
|
||||
|
||||
def test_unrecord_above_limit_fails(self):
|
||||
"""Test that it's forbidden to give back a recorded product
|
||||
if it puts the account balance above the limit.
|
||||
"""
|
||||
self.login_in_bar()
|
||||
limit = settings.SITH_ACCOUNT_MAX_MONEY
|
||||
# put the account balance just at the limit
|
||||
baker.make(Refilling, customer=self.customer.customer, amount=limit)
|
||||
response = self.submit_basket(self.customer, [BasketItem(self.dcons.id, 1)])
|
||||
assert response.status_code == 200 # no redirect = failure
|
||||
self.customer.customer.refresh_from_db()
|
||||
assert self.updated_amount(self.customer) == limit
|
||||
|
||||
def test_annotate_has_barman_queryset(self):
|
||||
"""Test if the custom queryset method `annotate_has_barman` works as intended."""
|
||||
counters = Counter.objects.annotate_has_barman(self.barmen)
|
||||
@@ -760,10 +786,10 @@ class TestBarmanConnection(TestCase):
|
||||
assert last_perm.counter == self.counter
|
||||
assert last_perm.user == self.barman
|
||||
assert last_perm.end is None
|
||||
assert self.barman in response.wsgi_request.barmen
|
||||
response = self.client.get(
|
||||
self.detail_url, {"username": self.barman.username, "password": "plop"}
|
||||
)
|
||||
assert self.barman in response.wsgi_request.barmen
|
||||
assert response.context_data.get("barmen") == [self.barman]
|
||||
soup = BeautifulSoup(response.text, "lxml")
|
||||
assert soup.find("form", id="select-user-form") is not None
|
||||
@@ -804,6 +830,41 @@ class TestBarmanConnection(TestCase):
|
||||
)
|
||||
self.assert_counter_login_fails(self.barman)
|
||||
|
||||
def test_barman_already_logged_in_another_device(self):
|
||||
"""Test when the barman is already logged in the current counter on another device."""
|
||||
other_client = Client()
|
||||
other_client.post(
|
||||
self.login_url, {"username": self.barman.username, "password": "plop"}
|
||||
)
|
||||
self.assert_counter_login_fails(self.barman)
|
||||
|
||||
def test_barman_login_elsewhere(self):
|
||||
"""Test when the barman log himself out then log in on another device."""
|
||||
self.client.post(
|
||||
self.login_url, {"username": self.barman.username, "password": "plop"}
|
||||
)
|
||||
other_client = Client()
|
||||
other_client.post(
|
||||
reverse("counter:logout", kwargs={"counter_id": self.counter.id}),
|
||||
data={"user_id": self.barman.id},
|
||||
)
|
||||
response = other_client.post(
|
||||
self.login_url, {"username": self.barman.username, "password": "plop"}
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert response.headers["HX-Redirect"] == self.detail_url
|
||||
# the barmen should now be logged in `other_client`...
|
||||
response = other_client.get(
|
||||
self.detail_url, {"username": self.barman.username, "password": "plop"}
|
||||
)
|
||||
assert self.barman in response.wsgi_request.barmen
|
||||
|
||||
# ... but not in `self.client`
|
||||
response = self.client.get(
|
||||
self.detail_url, {"username": self.barman.username, "password": "plop"}
|
||||
)
|
||||
assert self.barman not in response.wsgi_request.barmen
|
||||
|
||||
def test_barman_already_logged_elsewhere(self):
|
||||
"""Test when the barman is already logged in another counter."""
|
||||
other_counter = baker.make(Counter, type="BAR")
|
||||
|
||||
@@ -15,6 +15,7 @@ from core.models import User
|
||||
from counter.baker_recipes import product_recipe, refill_recipe, sale_recipe
|
||||
from counter.models import (
|
||||
Counter,
|
||||
CounterSellers,
|
||||
Customer,
|
||||
Refilling,
|
||||
ReturnableProduct,
|
||||
@@ -38,7 +39,7 @@ class TestStudentCard(TestCase):
|
||||
cls.subscriber = subscriber_user.make()
|
||||
|
||||
cls.counter = baker.make(Counter, type="BAR")
|
||||
cls.counter.sellers.add(cls.barmen)
|
||||
CounterSellers.objects.create(counter=cls.counter, user=cls.barmen)
|
||||
|
||||
cls.club_counter = baker.make(Counter)
|
||||
role = baker.make(ClubRole, club=cls.club_counter.club, is_board=True)
|
||||
|
||||
+22
-17
@@ -24,7 +24,7 @@ from django.shortcuts import get_object_or_404, redirect, resolve_url
|
||||
from django.urls import reverse
|
||||
from django.utils.safestring import SafeString
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import FormView
|
||||
from django.views.generic import CreateView, FormView
|
||||
from django.views.generic.detail import SingleObjectMixin
|
||||
from ninja.main import HttpRequest
|
||||
|
||||
@@ -32,7 +32,14 @@ from core.auth.mixins import CanViewMixin
|
||||
from core.models import User
|
||||
from core.views.mixins import FragmentMixin, UseFragmentsMixin
|
||||
from counter.forms import BasketForm, RefillForm
|
||||
from counter.models import Counter, Customer, ProductFormula, ReturnableProduct, Selling
|
||||
from counter.models import (
|
||||
Counter,
|
||||
Customer,
|
||||
ProductFormula,
|
||||
Refilling,
|
||||
ReturnableProduct,
|
||||
Selling,
|
||||
)
|
||||
from counter.utils import is_logged_in_counter
|
||||
from counter.views.mixins import CounterTabsMixin
|
||||
from counter.views.student_card import StudentCardFormFragment
|
||||
@@ -66,13 +73,13 @@ class CounterClick(
|
||||
current_tab = "counter"
|
||||
|
||||
def get_form_kwargs(self):
|
||||
kwargs = super().get_form_kwargs()
|
||||
kwargs["form_kwargs"] = {
|
||||
return super().get_form_kwargs() | {
|
||||
"customer": self.customer,
|
||||
"counter": self.object,
|
||||
"allowed_prices": {price.id: price for price in self.prices},
|
||||
"form_kwargs": {
|
||||
"allowed_prices": {price.id: price for price in self.prices}
|
||||
},
|
||||
}
|
||||
return kwargs
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
self.customer = get_object_or_404(Customer, user_id=self.kwargs["user_id"])
|
||||
@@ -219,9 +226,10 @@ class CounterClick(
|
||||
return kwargs
|
||||
|
||||
|
||||
class RefillingCreateView(FragmentMixin, FormView):
|
||||
class RefillingCreateView(FragmentMixin, CreateView):
|
||||
"""This is a fragment only view which integrates with counter_click.jinja"""
|
||||
|
||||
model = Refilling
|
||||
form_class = RefillForm
|
||||
template_name = "counter/fragments/create_refill.jinja"
|
||||
|
||||
@@ -242,23 +250,20 @@ class RefillingCreateView(FragmentMixin, FormView):
|
||||
):
|
||||
raise PermissionDenied
|
||||
|
||||
self.operator = get_operator(request, self.counter, self.customer)
|
||||
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
||||
def render_fragment(self, request, **kwargs) -> SafeString:
|
||||
self.customer = kwargs.pop("customer")
|
||||
self.counter = kwargs.pop("counter")
|
||||
self.object = None
|
||||
return super().render_fragment(request, **kwargs)
|
||||
|
||||
def form_valid(self, form):
|
||||
res = super().form_valid(form)
|
||||
form.clean()
|
||||
form.instance.counter = self.counter
|
||||
form.instance.operator = self.operator
|
||||
form.instance.customer = self.customer
|
||||
form.instance.save()
|
||||
return res
|
||||
def get_form_kwargs(self):
|
||||
return super().get_form_kwargs() | {
|
||||
"counter": self.counter,
|
||||
"operator": get_operator(self.request, self.counter, self.customer),
|
||||
"customer": self.customer,
|
||||
}
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs = super().get_context_data(**kwargs)
|
||||
|
||||
@@ -30,6 +30,7 @@ from django.views.generic.edit import FormView
|
||||
from core.auth.mixins import CanViewMixin
|
||||
from core.views import FragmentMixin, UseFragmentsMixin
|
||||
from counter.forms import CounterLoginForm, GetUserForm
|
||||
from counter.middleware import SESSION_PERMANENCES_KEY
|
||||
from counter.models import Counter, Permanency
|
||||
from counter.utils import is_logged_in_counter
|
||||
from counter.views.mixins import CounterTabsMixin
|
||||
@@ -58,8 +59,8 @@ class CounterLoginFragment(FragmentMixin, SingleObjectMixin, FormView):
|
||||
|
||||
def form_valid(self, form: CounterLoginForm):
|
||||
user = form.get_user()
|
||||
self.object.permanencies.create(user=user, start=timezone.now())
|
||||
self.request.barmen.add(user)
|
||||
perm = self.object.permanencies.create(user=user, start=timezone.now())
|
||||
self.request.session.setdefault(SESSION_PERMANENCES_KEY, []).append(perm.id)
|
||||
self.success_url = reverse(
|
||||
"counter:details", kwargs={"counter_id": self.object.id}
|
||||
)
|
||||
|
||||
@@ -5,10 +5,11 @@ interface BasketItem {
|
||||
name: string;
|
||||
quantity: number;
|
||||
unitPrice: number;
|
||||
isRefill: boolean;
|
||||
}
|
||||
|
||||
const BASKET_CACHE_KEY = "basket";
|
||||
const BASKET_CACHE_VERSION = 1;
|
||||
const BASKET_CACHE_VERSION = 2;
|
||||
|
||||
document.addEventListener("alpine:init", () => {
|
||||
Alpine.data("basket", (validPrices: number[], lastPurchaseTime?: number) => ({
|
||||
@@ -21,7 +22,7 @@ document.addEventListener("alpine:init", () => {
|
||||
});
|
||||
document
|
||||
.getElementById("id_form-TOTAL_FORMS")
|
||||
.setAttribute(":value", "basket.length");
|
||||
?.setAttribute(":value", "basket.length");
|
||||
},
|
||||
|
||||
loadBasket(): BasketItem[] {
|
||||
@@ -32,8 +33,8 @@ document.addEventListener("alpine:init", () => {
|
||||
return [];
|
||||
}
|
||||
if (
|
||||
lastPurchaseTime !== null &&
|
||||
localStorage.basketTimestamp !== undefined &&
|
||||
lastPurchaseTime &&
|
||||
localStorage.basketTimestamp &&
|
||||
new Date(lastPurchaseTime) >=
|
||||
new Date(Number.parseInt(localStorage.basketTimestamp, 10))
|
||||
) {
|
||||
@@ -64,6 +65,19 @@ document.addEventListener("alpine:init", () => {
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the total of money that would be added to the AE account on basket purchase.
|
||||
*/
|
||||
getTotalAdded() {
|
||||
return this.basket
|
||||
.filter((item) => item.isRefill || item.unitPrice < 0)
|
||||
.reduce(
|
||||
(acc: number, item: BasketItem) =>
|
||||
acc + Math.abs(item.quantity * item.unitPrice),
|
||||
0,
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Add 1 to the quantity of an item in the basket
|
||||
* @param {BasketItem} item
|
||||
@@ -86,7 +100,7 @@ document.addEventListener("alpine:init", () => {
|
||||
|
||||
if (this.basket[index].quantity === 0) {
|
||||
this.basket = this.basket.filter(
|
||||
(e: BasketItem) => e.priceId !== this.basket[index].id,
|
||||
(e: BasketItem) => e.priceId !== this.basket[index].priceId,
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -103,14 +117,16 @@ document.addEventListener("alpine:init", () => {
|
||||
* @param id The id of the product to add
|
||||
* @param name The name of the product
|
||||
* @param price The unit price of the product
|
||||
* @param isRefill true if the product is a refill bond
|
||||
* @returns The created item
|
||||
*/
|
||||
createItem(id: number, name: string, price: number): BasketItem {
|
||||
createItem(id: number, name: string, price: number, isRefill: boolean): BasketItem {
|
||||
const newItem = {
|
||||
priceId: id,
|
||||
name,
|
||||
quantity: 0,
|
||||
unitPrice: price,
|
||||
isRefill,
|
||||
} as BasketItem;
|
||||
|
||||
this.basket.push(newItem);
|
||||
@@ -125,16 +141,17 @@ document.addEventListener("alpine:init", () => {
|
||||
* @param id The id of the product to add
|
||||
* @param name The name of the product
|
||||
* @param price The unit price of the product
|
||||
* @param isRefill true if the product is a refill bond
|
||||
*/
|
||||
addFromCatalog(id: number, name: string, price: number) {
|
||||
let item = this.basket.find((e: BasketItem) => e.priceId === id);
|
||||
addFromCatalog(id: number, name: string, price: number, isRefill: boolean) {
|
||||
const item = this.basket.find((e: BasketItem) => e.priceId === id);
|
||||
|
||||
// if the item is not in the basket, we create it
|
||||
// else we add + 1 to it
|
||||
if (item) {
|
||||
this.add(item);
|
||||
} else {
|
||||
item = this.createItem(id, name, price);
|
||||
this.createItem(id, name, price, isRefill);
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -58,6 +58,17 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<template x-if="(getTotalAdded() + {{ customer_amount }}) > {{ settings.SITH_ACCOUNT_MAX_MONEY }}">
|
||||
<div class="alert alert-red">
|
||||
<div class="alert-main">
|
||||
{% trans trimmed limit=settings.SITH_ACCOUNT_MAX_MONEY %}
|
||||
You cannot purchase the current basket,
|
||||
because it would put your AE account balance
|
||||
above the {{ limit }}€ limit
|
||||
{% endtrans %}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<ul class="item-list">
|
||||
{# Starting money #}
|
||||
<li>
|
||||
@@ -109,9 +120,12 @@
|
||||
<i class="fa fa-trash"></i>
|
||||
{% trans %}Clear{% endtrans %}
|
||||
</button>
|
||||
<button class="btn btn-blue">
|
||||
<button
|
||||
class="btn btn-blue"
|
||||
:disabled="(getTotalAdded() + {{ customer_amount }}) > {{ settings.SITH_ACCOUNT_MAX_MONEY }}"
|
||||
>
|
||||
<i class="fa fa-check"></i>
|
||||
<input type="submit" value="{% trans %}Validate{% endtrans %}"/>
|
||||
{% trans %}Validate{% endtrans %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -199,7 +213,12 @@
|
||||
id="{{ price.id }}"
|
||||
class="card clickable shadow"
|
||||
:class="{selected: basket.some((i) => i.priceId === {{ price.id }})}"
|
||||
@click='addFromCatalog({{ price.id }}, {{ price.full_label|tojson }}, {{ price.amount }})'
|
||||
@click='addFromCatalog(
|
||||
{{ price.id }},
|
||||
{{ price.full_label|tojson }},
|
||||
{{ price.amount }},
|
||||
{{ (price.product.product_type_id == settings.SITH_COUNTER_PRODUCTTYPE_REFILLING)|lower }}
|
||||
)'
|
||||
{% if price.sold_out %}disabled{% endif %}
|
||||
>
|
||||
{% if price.product.icon %}
|
||||
|
||||
@@ -278,6 +278,27 @@ class TestEboutic(TestCase):
|
||||
)
|
||||
assert Basket.objects.count() == 2
|
||||
|
||||
def test_refill_limit(self):
|
||||
"""Test that an eboutic basket cannot refill an account above the limit."""
|
||||
self.client.force_login(self.subscriber)
|
||||
product = product_recipe.make(
|
||||
product_type_id=settings.SITH_COUNTER_PRODUCTTYPE_REFILLING,
|
||||
counters=[self.eboutic],
|
||||
)
|
||||
price = price_recipe.make(
|
||||
product=product,
|
||||
groups=[self.group_cotiz],
|
||||
amount=settings.SITH_ACCOUNT_MAX_MONEY // 10,
|
||||
)
|
||||
|
||||
response = self.submit_basket([BasketItem(price.id, 10)])
|
||||
assert Basket.objects.count() == 1
|
||||
assertRedirects(response, reverse("eboutic:checkout", kwargs={"basket_id": 1}))
|
||||
|
||||
response = self.submit_basket([BasketItem(price.id, 11)])
|
||||
assert Basket.objects.count() == 1
|
||||
assert response.status_code == 200 # no redirect = form validation failed
|
||||
|
||||
def test_create_basket(self):
|
||||
self.client.force_login(self.new_customer)
|
||||
assertRedirects(
|
||||
|
||||
+4
-6
@@ -66,9 +66,7 @@ if TYPE_CHECKING:
|
||||
|
||||
|
||||
class BaseEbouticBasketForm(BaseBasketForm):
|
||||
def _check_enough_money(self, *args, **kwargs):
|
||||
# Disable money check
|
||||
...
|
||||
min_result_balance = None # user can pay by card, so no minimum enforced
|
||||
|
||||
|
||||
EbouticBasketForm = forms.formset_factory(
|
||||
@@ -88,15 +86,15 @@ class EbouticMainView(LoginRequiredMixin, FormView):
|
||||
form_class = EbouticBasketForm
|
||||
|
||||
def get_form_kwargs(self):
|
||||
kwargs = super().get_form_kwargs()
|
||||
kwargs["form_kwargs"] = {
|
||||
return super().get_form_kwargs() | {
|
||||
"customer": self.customer,
|
||||
"counter": get_eboutic(),
|
||||
"form_kwargs": {
|
||||
"allowed_prices": {
|
||||
price.id: price for price in self.prices if not price.sold_out
|
||||
}
|
||||
},
|
||||
}
|
||||
return kwargs
|
||||
|
||||
def form_valid(self, formset):
|
||||
if len(formset) == 0:
|
||||
|
||||
@@ -251,8 +251,12 @@ class ApplyElectionResultForm(forms.Form):
|
||||
user_id=c.user_id,
|
||||
club_id=c.role.club_role.club_id,
|
||||
role=c.role.club_role,
|
||||
description=(
|
||||
c.role.title if c.role.title != c.role.club_role.name else ""
|
||||
),
|
||||
)
|
||||
for c in candidates
|
||||
]
|
||||
Membership.objects.bulk_create(memberships)
|
||||
Membership._add_club_groups(memberships)
|
||||
return memberships
|
||||
|
||||
@@ -13,6 +13,7 @@ from pytest_django.asserts import assertRedirects
|
||||
from club.models import Club, ClubRole, Membership
|
||||
from core.baker_recipes import subscriber_user
|
||||
from core.models import Group, User
|
||||
from election.forms import ApplyElectionResultForm
|
||||
from election.models import Candidature, Election, ElectionList, Role, Vote
|
||||
|
||||
|
||||
@@ -155,6 +156,19 @@ class TestApplyResult(TestCase):
|
||||
response = self.client.post(self.url, data={"candidates": ids})
|
||||
assert response.status_code == 403
|
||||
|
||||
def test_membership_description(self):
|
||||
"""Test that if club role name and election role name are different,
|
||||
then the election role name is used as membership description.
|
||||
"""
|
||||
form = ApplyElectionResultForm(
|
||||
election=self.election, data={"candidates": [self.candidatures[0].id]}
|
||||
)
|
||||
assert form.is_valid()
|
||||
memberships = form.save()
|
||||
assert len(memberships) == 1
|
||||
assert memberships[0].role == self.club_roles[0]
|
||||
assert memberships[0].description == "election role 1"
|
||||
|
||||
def test_no_result_to_apply(self):
|
||||
self.election.roles.update(club_role=None)
|
||||
user = baker.make(
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-06-05 13:39+0200\n"
|
||||
"POT-Creation-Date: 2026-06-10 20:18+0200\n"
|
||||
"PO-Revision-Date: 2016-07-18\n"
|
||||
"Last-Translator: Maréchal <thomas.girod@utbm.fr\n"
|
||||
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
||||
@@ -3217,6 +3217,10 @@ msgstr "Vous êtes déjà connecté à ce comptoir."
|
||||
msgid "You are already logged in another counter."
|
||||
msgstr "Vous êtes déjà connecté à un autre comptoir."
|
||||
|
||||
#: counter/forms.py
|
||||
msgid "You are already logged on another device"
|
||||
msgstr "Vous êtes déjà connecté sur un autre appareil"
|
||||
|
||||
#: counter/forms.py
|
||||
msgid "Regular barmen"
|
||||
msgstr "Barmen réguliers"
|
||||
@@ -3306,6 +3310,11 @@ msgstr "Saisie de produit dupliquée"
|
||||
msgid "Not enough money"
|
||||
msgstr "Solde insuffisant"
|
||||
|
||||
#: counter/forms.py counter/models.py
|
||||
#, python-format
|
||||
msgid "There cannot be more than %(money)d€ on an AE account"
|
||||
msgstr "Il ne peut pas y avoir plus de %(money)d€ sur un compte AE"
|
||||
|
||||
#: counter/forms.py
|
||||
#, python-format
|
||||
msgid ""
|
||||
@@ -4428,6 +4437,15 @@ msgstr "Payer avec un compte AE"
|
||||
msgid "The online shop of the association."
|
||||
msgstr "La boutique en ligne de l'association."
|
||||
|
||||
#: eboutic/templates/eboutic/eboutic_main.jinja
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You cannot purchase the current basket, because it would put your AE account "
|
||||
"balance above the %(limit)s€ limit"
|
||||
msgstr ""
|
||||
"Vous ne pouvez pas finaliser le panier actuel, parce que le solde de votre "
|
||||
"compte AE passerait au-dessus de la limite de %(limit)s€."
|
||||
|
||||
#: eboutic/templates/eboutic/eboutic_main.jinja
|
||||
msgid "Clear"
|
||||
msgstr "Vider"
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ dependencies = [
|
||||
"Pillow>=12.2.0,<13.0.0",
|
||||
"mistune>=3.2.1,<4.0.0",
|
||||
"django-jinja<3.0.0,>=2.11.0",
|
||||
"cryptography>=48.0.1,<49.0.0",
|
||||
"cryptography>=48.0.0,<49.0.0",
|
||||
"django-phonenumber-field>=8.4.0,<9.0.0",
|
||||
"phonenumbers>=9.0.32,<10.0.0",
|
||||
"reportlab>=4.5.1,<5.0.0",
|
||||
|
||||
@@ -503,6 +503,12 @@ SITH_ACCOUNT_INACTIVITY_DELTA = relativedelta(years=2)
|
||||
SITH_ACCOUNT_DUMP_DELTA = timedelta(days=30)
|
||||
"""timedelta between the warning mail and the actual account dump"""
|
||||
|
||||
SITH_ACCOUNT_MAX_MONEY = 250 # €
|
||||
"""Maximum amount of money a sith account can hold.
|
||||
|
||||
This amount is defined by the AE's Terms and Conditions of Sale.
|
||||
"""
|
||||
|
||||
# Defines which product type is the refilling type,
|
||||
# and thus increases the account amount
|
||||
SITH_COUNTER_PRODUCTTYPE_REFILLING = env.int(
|
||||
|
||||
@@ -442,55 +442,55 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "cryptography"
|
||||
version = "48.0.1"
|
||||
version = "48.0.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "cffi", marker = "platform_python_implementation != 'PyPy'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/12/45/870e7f4bef50e5f53b9f51d4428aee5290eedf58ba443f16b1ebb7ab8e66/cryptography-48.0.1.tar.gz", hash = "sha256:266f4ee051abb2f725b74ef8072b521ce1feacf685a3364fa6a6b45548db791a", size = 832989, upload-time = "2026-06-09T22:32:31.8Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/9f/a9/db8f313fdcd85d767d4973515e1db101f9c71f95fced83233de224673757/cryptography-48.0.0.tar.gz", hash = "sha256:5c3932f4436d1cccb036cb0eaef46e6e2db91035166f1ad6505c3c9d5a635920", size = 832984, upload-time = "2026-05-04T22:59:38.133Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/1b/bc/ee4137cbbe105652c0ee4252792b78fc8e7afa4b8e61d9d5dc05a7f45731/cryptography-48.0.1-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:3e4a1a3232eef2e6c732827d5722db29a0cc8b27af2a4d865b094cf954be9ca1", size = 8008324, upload-time = "2026-06-09T22:31:00.702Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d5/85/6379d42181bfc713094f081360fc5784d6c816b599d45e7f082502d173ce/cryptography-48.0.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:32143b24adb918f078134e1e230f1eb8cc04886b92c28b5f0041aaf3e5699225", size = 4696243, upload-time = "2026-06-09T22:32:33.446Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9c/87/c85d147b53323c7eb4d850920c8901377323c2a0ff8d79c262d4fee89aa2/cryptography-48.0.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f0d27a5696721ef7a672b8c810f6aded391058e0b9486e63e6d93baf765da691", size = 4713235, upload-time = "2026-06-09T22:31:40.141Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/79/58/67cbf8cf1ee7c54b439ca07bbecf8362c07afc11a3724fea70f745784add/cryptography-48.0.1-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:eb86ce1af36fe65041b6db9a8bb064ee621a7e5fded0f80d475ec243477cd242", size = 4702323, upload-time = "2026-06-09T22:31:42.191Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/89/c6/24266ac10c47f6cd2a865f4446062b466da1d1f10b27189eac00e61bf0c9/cryptography-48.0.1-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:b024e784ad6c077ee0147b35ea9cbfc1e34e1fd4c1dcca214c2794d73a12df08", size = 5300085, upload-time = "2026-06-09T22:31:58.703Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d2/bb/cc4b78784f97efc8c5874c2a9743708d172be6663024b34a0467885ae0c8/cryptography-48.0.1-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3752f2dbc8f07a30aad2932c986cea495b03bb554887828225da104f732852b6", size = 4746137, upload-time = "2026-06-09T22:31:31.01Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1f/52/0c44de3f5267f8fbe8e835138017522a333436166e406f0db9b9e6e3033f/cryptography-48.0.1-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:bd81490cd5801d755cf97bb68ac191f14b708470b1c7cf4580f669b9c9264cd8", size = 4333867, upload-time = "2026-06-09T22:32:28.096Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9a/2e/772d7adbfa931537bc401640b7cac9976bff689bda187833e5d63b428e49/cryptography-48.0.1-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:66fd0771e7b9c6dcd44cf1120690d2338d16d72795cf40cae2786a39eba65429", size = 4701805, upload-time = "2026-06-09T22:31:38.284Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f8/a3/b06844f303873493c963caf581c04df31c7035e0c1b0f02c4814d319ec80/cryptography-48.0.1-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:3fd2ca57062b241c856670b073487d2e86c4637937ca5601e48f97bf8e11fc8f", size = 5258461, upload-time = "2026-06-09T22:31:04.187Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9f/13/8b765e2e12b07c74941caadb9d1c8fdc006c4dfbf2b8f2d610519758954d/cryptography-48.0.1-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:0ee6ea481db1ab889cba043ec1eda17bb9c1ea79db6722f779c3667f9f70322f", size = 4745488, upload-time = "2026-06-09T22:32:30.07Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2e/aa/48972bce55049b32a94f4907eda4d75fa385aad8a39506cc2fc72196ecf0/cryptography-48.0.1-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:f2ceef93cb096aa3c4cc4b5c94ca6131f9196d28c64d6111533402a9b2054d41", size = 4830256, upload-time = "2026-06-09T22:31:43.868Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/47/a2/e5079a032fb85cf6005046ca92bbd78b0c82dad2b5751ab8c311659da06f/cryptography-48.0.1-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9bd3f92d76217892b15df84ca256c2c113d386fdda7a7d8691aeeced976507c6", size = 4979117, upload-time = "2026-06-09T22:31:05.845Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b7/a0/8f50cae9c74e718ed769d63ed5c74bd0ea830c9550a74629cebd1b9c7bc7/cryptography-48.0.1-cp311-abi3-win32.whl", hash = "sha256:b9a32b876490d66c8bcc9963ef220199569748434ab01a9d6aaeabf88e7f5158", size = 3304154, upload-time = "2026-06-09T22:32:16.845Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c5/69/0572c77dbace6fef72f33755bd52ea399c71367250d366237f8691826b9e/cryptography-48.0.1-cp311-abi3-win_amd64.whl", hash = "sha256:39489bfca54c7a1f6b297efcd8bc608ab92d16c4ca631b0cad4da46724588b24", size = 3817138, upload-time = "2026-06-09T22:32:00.388Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/42/06/3e768b4c3bc78201583fa35a0e18f640dd782ff41afba88f8545481a8874/cryptography-48.0.1-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:f817adc181390bd54f2f700107a7419040fb7c1bdf2fc26f36551a06a68c3345", size = 7989830, upload-time = "2026-06-09T22:31:07.8Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8a/13/6476736484b94041110c8340a3eb63962fea4975baea8cb4a512adb44d4d/cryptography-48.0.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d5d30989c6917b478b5817902e85fddaea2261efa8648383d965381ccb9e1ac4", size = 4689201, upload-time = "2026-06-09T22:31:09.745Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/79/62/65a87f34d2a431546e2509b85d55e8c90df86d668f6731da64d538512ac2/cryptography-48.0.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:df637c05205ea7c1d7fbcbe54bbfea648a52951155f997af13d895d0ecc96991", size = 4702822, upload-time = "2026-06-09T22:32:24.409Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7f/59/810b5204b0a9b10f4b6bc06bd551a8b609803cd931806bc3b71884b225e5/cryptography-48.0.1-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:869c3b8a53bfe27147832df48b32adadf558249d50e76cb3769d40e986b13265", size = 4694875, upload-time = "2026-06-09T22:32:08.737Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/24/dc/d8ca05ffea724eec6d232ea6f18e74c269eb6bdfdcc9bfba689790d1325f/cryptography-48.0.1-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:e361afba8918070d376df76f408a4f67fec0ee9cff81a99e48fe9a233ef59e17", size = 5290385, upload-time = "2026-06-09T22:31:15.212Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/03/8c/3be6cb4da181f5bb6c19cf560c2359d60644a6b5fc5b57854e528f47b296/cryptography-48.0.1-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:d069066deead00ac7f090be101be875a06855908f7ec004c27b8fefb4acfb411", size = 4737082, upload-time = "2026-06-09T22:32:22.66Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/aa/f6/d5f60a5a1434dbfd949e227fd0065d194c7e6b6ac526b17f5c06152b8231/cryptography-48.0.1-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:09f73a725d582cef64b91281a322cd798d14a33b2b6f2b7ad9531dc336d84c02", size = 4325328, upload-time = "2026-06-09T22:32:10.777Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/17/b7/ba75dd947a14b6ad907b01ae8f6b5b348cdd1b48142f0063dee9e20c1d9d/cryptography-48.0.1-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:15254441469dd6bf027039453288e2072124f8b6603563f5d759e1c9b69273fa", size = 4694530, upload-time = "2026-06-09T22:31:53.105Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/62/29/50d6b9e8aff12d8b67afaeb3569335e32dc83a5723e3bbded24fdac9f809/cryptography-48.0.1-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:8ace4507d1e6533c125f4fac754f8bb8b6a74c08e92179dabd7e16571a3efbf3", size = 5245046, upload-time = "2026-06-09T22:31:25.774Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9f/04/618f4115cfc0add0838c82507aa18a346089428da8653ad38b3ff36f5cb3/cryptography-48.0.1-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:b4e391975f038e66432328639620a4aff2d307513b004f1ca06d6225bced815c", size = 4736660, upload-time = "2026-06-09T22:32:12.676Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/24/9c/06e062462a0de28a3b3911322eded4c16deb9f441b1b7575d3dc59488ab5/cryptography-48.0.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:42fcd8e26fe555d9b3577a135f5091fefa0aa4e99129c23fb56787a1bd4ada72", size = 4822229, upload-time = "2026-06-09T22:31:17.062Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f4/be/0561971eaaee4b8a0e7d5113c536921063ab91aaf23278ac374eaf881e11/cryptography-48.0.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c1400da5e32a43253392277eac7490a60e497d810a63dd5608d71bbd7af507c9", size = 4966364, upload-time = "2026-06-09T22:31:32.842Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a4/27/728c77876f12b000820b69ae490f3c4083775e79e07827e9e60be07ad209/cryptography-48.0.1-cp314-cp314t-win32.whl", hash = "sha256:0df56b056bc17c1b7d6821dfa65216e62bd232d8ab05eb3db44e71d235651471", size = 3278498, upload-time = "2026-06-09T22:31:29.154Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/06/e3/79a612c6d7b1e6ee0edd43633d53035bec2cfb78c82b76f7864f39e36f34/cryptography-48.0.1-cp314-cp314t-win_amd64.whl", hash = "sha256:9de21387aa95e2a895823d0745b430bed4f33503ba9ab5e0b5311f33e37d66d2", size = 3798790, upload-time = "2026-06-09T22:31:56.697Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ca/6c/00fa2a95997164c8b2072ce327c23d4ab20809ccc323ea5fab91e53a4bba/cryptography-48.0.1-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:4fdc69f8e4316bcf0c8c8ec1f26f285d12e8142d88d96c876a59a03be3f6ae67", size = 7987408, upload-time = "2026-06-09T22:32:20.777Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b0/d9/45f309a7e4e5f3f8f121d6d3be9e94024a7726ec598d6e08ae04edb2f04d/cryptography-48.0.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:48fe40804d4caa2288f24e70ca8c64c42dd826da0ad7e4f1b41b2128d679e6c8", size = 4690196, upload-time = "2026-06-09T22:31:54.74Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5f/9f/a1bc8bcc798811b8527eb374bbccf30a3f3e806829d967118222bf1125eb/cryptography-48.0.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:86be3b1b0b6bf09482fb50a979c508d2950ed95f5621ec77f4e385962006b83a", size = 4696782, upload-time = "2026-06-09T22:31:45.615Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/66/c2/81a4fb4e4373c500bb526bc337ac5719dd31dd15b970b84a238168c6aa08/cryptography-48.0.1-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:4ab0a343c807bbcd90c971cd1ecf072937cd01847a9e002bef88fb47ac6be577", size = 4696618, upload-time = "2026-06-09T22:31:11.564Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e5/0b/aa68b221dde92d09cb29a024ede17550ee21e77a404e59fc093c82bb51e1/cryptography-48.0.1-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:9621de99d2da096006b629979efd8ae7eb2d8b822488d0c89ee4000c306c59b1", size = 5289970, upload-time = "2026-06-09T22:31:20.368Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/78/13/fba657f958d2af66ea959a4ba01212632089249d34af1ae48054136344d7/cryptography-48.0.1-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:88c852a0ae366e262e5a1744b685e6a433dc8788dd2a277e418bf4904203609d", size = 4731873, upload-time = "2026-06-09T22:31:22.253Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4c/4c/9a964756d24a26b3e34dfcb16f961b89838786e6700b635b0d1e3adff4b6/cryptography-48.0.1-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:43c5835e2cb98c8733d86f57d6fc879b613f5c3478607281c3e36daffc6dd8a6", size = 4330804, upload-time = "2026-06-09T22:31:36.56Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4b/0f/a10f3a6eb12950a10e3a874070283aa2dd5875b2bfd15fad8a3e17b3f13e/cryptography-48.0.1-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:fe0180af5bf9236518a087e35bf2d9a347d5f5f51e63c579d683ddff424e3d46", size = 4696217, upload-time = "2026-06-09T22:31:13.351Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f3/6f/5cd12f951165ea73ef85266775d97e4c763b2474ccfd816dd69d3a18d6f8/cryptography-48.0.1-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:b7a2d1a937a738a881737cec135a38bb61470589b17515b9f73f571d0ae10401", size = 5245252, upload-time = "2026-06-09T22:32:02.193Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/68/ab/8aaa12e4516ec4464033ab79b6f3b592bd5a92102467c4ace8a0d970203f/cryptography-48.0.1-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:b74ca3b8e5ecdd833bf6a002ca41b4793bb27fb8f1c06ffaf2643c9e9140e31b", size = 4731388, upload-time = "2026-06-09T22:32:04.019Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1b/24/50027ea4dca85ec1f40688f3c24fb32ccacd520583c9592c3cc95628e6fb/cryptography-48.0.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2c37f2461406063b417837f5f3daab668652acd82423efcd7f0a9f04be972de1", size = 4824186, upload-time = "2026-06-09T22:32:18.707Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/52/41/04cb5eb17085ade6f50cc611fb657df6a0f5885350de8764ece89c050197/cryptography-48.0.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:86fe77abb1bd87afb251d4d02ada7ecf53a32cee9b67d976abb2e45a13297475", size = 4964539, upload-time = "2026-06-09T22:31:18.793Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/36/bf/ed70785c496e89d7e73b7cda2d21f2447fd6d4e821714b8d04ff217fed92/cryptography-48.0.1-cp39-abi3-win32.whl", hash = "sha256:6b2c0c3e6ccf3ade7750f836ef3ee36eea250cc467d45c256895573ac08cc6f1", size = 3282307, upload-time = "2026-06-09T22:30:53.162Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b3/ff/371ea7d252656ee1eb6d83eeeef3d1d0c6baf1d6497687d081ea03814670/cryptography-48.0.1-cp39-abi3-win_amd64.whl", hash = "sha256:9a49ca6c81417f6a5edb50375a60cccdd70fa0a91a5211829dbea74eba94d2ac", size = 3793408, upload-time = "2026-06-09T22:32:15.191Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/df/3d/01f6dd9190170a5a241e0e98c2d04be3664a9e6f5b9b872cde63aff1c3dd/cryptography-48.0.0-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:0c558d2cdffd8f4bbb30fc7134c74d2ca9a476f830bb053074498fbc86f41ed6", size = 8001587, upload-time = "2026-05-04T22:57:36.803Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b2/6e/e90527eef33f309beb811cf7c982c3aeffcce8e3edb178baa4ca3ae4a6fa/cryptography-48.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f5333311663ea94f75dd408665686aaf426563556bb5283554a3539177e03b8c", size = 4690433, upload-time = "2026-05-04T22:57:40.373Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/90/04/673510ed51ddff56575f306cf1617d80411ee76831ccd3097599140efdfe/cryptography-48.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7995ef305d7165c3f11ae07f2517e5a4f1d5c18da1376a0a9ed496336b69e5f3", size = 4710620, upload-time = "2026-05-04T22:57:42.935Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/14/d5/e9c4ef932c8d800490c34d8bd589d64a31d5890e27ec9e9ad532be893294/cryptography-48.0.0-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:40ba1f85eaa6959837b1d51c9767e230e14612eea4ef110ee8854ada22da1bf5", size = 4696283, upload-time = "2026-05-04T22:57:45.294Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0c/29/174b9dfb60b12d59ecfc6cfa04bc88c21b42a54f01b8aae09bb6e51e4c7f/cryptography-48.0.0-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:369a6348999f94bbd53435c894377b20ab95f25a9065c283570e70150d8abc3c", size = 5296573, upload-time = "2026-05-04T22:57:47.933Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/95/38/0d29a6fd7d0d1373f0c0c88a04ba20e359b257753ac497564cd660fc1d55/cryptography-48.0.0-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a0e692c683f4df67815a2d258b324e66f4738bd7a96a218c826dce4f4bd05d8f", size = 4743677, upload-time = "2026-05-04T22:57:50.067Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/30/be/eef653013d5c63b6a490529e0316f9ac14a37602965d4903efed1399f32b/cryptography-48.0.0-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:18349bbc56f4743c8b12dc32e2bccb2cf83ee8b69a3bba74ef8ae857e26b3d25", size = 4330808, upload-time = "2026-05-04T22:57:52.301Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/84/9e/500463e87abb7a0a0f9f256ec21123ecde0a7b5541a15e840ea54551fd81/cryptography-48.0.0-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:7e8eac43dfca5c4cccc6dad9a80504436fca53bb9bc3100a2386d730fbe6b602", size = 4695941, upload-time = "2026-05-04T22:57:54.603Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e3/dc/7303087450c2ec9e7fbb750e17c2abfbc658f23cbd0e54009509b7cc4091/cryptography-48.0.0-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:9ccdac7d40688ecb5a3b4a604b8a88c8002e3442d6c60aead1db2a89a041560c", size = 5252579, upload-time = "2026-05-04T22:57:57.207Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d0/c0/7101d3b7215edcdc90c45da544961fd8ed2d6448f77577460fa75a8443f7/cryptography-48.0.0-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:bd72e68b06bb1e96913f97dd4901119bc17f39d4586a5adf2d3e47bc2b9d58b5", size = 4743326, upload-time = "2026-05-04T22:57:59.535Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ac/d8/5b833bad13016f562ab9d063d68199a4bd121d18458e439515601d3357ec/cryptography-48.0.0-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:59baa2cb386c4f0b9905bd6eb4c2a79a69a128408fd31d32ca4d7102d4156321", size = 4826672, upload-time = "2026-05-04T22:58:01.996Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/98/e1/7074eb8bf3c135558c73fc2bcf0f5633f912e6fb87e868a55c454080ef09/cryptography-48.0.0-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9249e3cd978541d665967ac2cb2787fd6a62bddf1e75b3e347a594d7dacf4f74", size = 4972574, upload-time = "2026-05-04T22:58:03.968Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/04/70/e5a1b41d325f797f39427aa44ef8baf0be500065ab6d8e10369d850d4a4f/cryptography-48.0.0-cp311-abi3-win32.whl", hash = "sha256:9c459db21422be75e2809370b829a87eb37f74cd785fc4aa9ea1e5f43b47cda4", size = 3294868, upload-time = "2026-05-04T22:58:06.467Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f4/ac/8ac51b4a5fc5932eb7ee5c517ba7dc8cd834f0048962b6b352f00f41ebf9/cryptography-48.0.0-cp311-abi3-win_amd64.whl", hash = "sha256:5b012212e08b8dd5edc78ef54da83dd9892fd9105323b3993eff6bea65dc21d7", size = 3817107, upload-time = "2026-05-04T22:58:08.845Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6b/84/70e3feea9feea87fd7cbe77efb2712ae1e3e6edf10749dc6e95f4e60e455/cryptography-48.0.0-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:3cb07a3ed6431663cd321ea8a000a1314c74211f823e4177fefa2255e057d1ec", size = 7986556, upload-time = "2026-05-04T22:58:11.172Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/89/6e/18e07a618bb5442ba10cf4df16e99c071365528aa570dfcb8c02e25a303b/cryptography-48.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8c7378637d7d88016fa6791c159f698b3d3eed28ebf844ac36b9dc04a14dae18", size = 4684776, upload-time = "2026-05-04T22:58:13.712Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/be/6a/4ea3b4c6c6759794d5ee2103c304a5076dc4b19ae1f9fe47dba439e159e9/cryptography-48.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:cc90c0b39b2e3c65ef52c804b72e3c58f8a04ab2a1871272798e5f9572c17d20", size = 4698121, upload-time = "2026-05-04T22:58:16.448Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2f/59/6ff6ad6cae03bb887da2a5860b2c9805f8dac969ef01ce563336c49bd1d1/cryptography-48.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:76341972e1eff8b4bea859f09c0d3e64b96ce931b084f9b9b7db8ef364c30eff", size = 4690042, upload-time = "2026-05-04T22:58:18.544Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ca/b4/fc334ed8cfd705aca282fe4d8f5ae64a8e0f74932e9feecb344610cf6e4d/cryptography-48.0.0-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:55b7718303bf06a5753dcdccf2f3945cf18ad7bffde41b61226e4db31ab89a9c", size = 5282526, upload-time = "2026-05-04T22:58:20.75Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/11/08/9f8c5386cc4cd90d8255c7cdd0f5baf459a08502a09de30dc51f553d38dc/cryptography-48.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:a64697c641c7b1b2178e573cbc31c7c6684cd56883a478d75143dbb7118036db", size = 4733116, upload-time = "2026-05-04T22:58:23.627Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b8/77/99307d7574045699f8805aa500fa0fb83422d115b5400a064ddd306d7750/cryptography-48.0.0-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:561215ea3879cb1cbbf272867e2efda62476f240fb58c64de6b393ae19246741", size = 4316030, upload-time = "2026-05-04T22:58:25.581Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/fd/36/a608b98337af3cb2aff4818e406649d30572b7031918b04c87d979495348/cryptography-48.0.0-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:ad64688338ed4bc1a6618076ba75fd7194a5f1797ac60b47afe926285adb3166", size = 4689640, upload-time = "2026-05-04T22:58:27.747Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/dd/a6/825010a291b4438aecc1f568bc428189fc1175515223632477c07dc0a6df/cryptography-48.0.0-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:906cbf0670286c6e0044156bc7d4af9cbb0ef6db9f73e52c3ec56ba6bdde5336", size = 5237657, upload-time = "2026-05-04T22:58:29.848Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b9/09/4e76a09b4caa29aad535ddc806f5d4c5d01885bd978bd984fbc6ca032cae/cryptography-48.0.0-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:ea8990436d914540a40ab24b6a77c0969695ed52f4a4874c5137ccf7045a7057", size = 4732362, upload-time = "2026-05-04T22:58:32.009Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/18/78/444fa04a77d0cb95f417dda20d450e13c56ba8e5220fc892a1658f44f882/cryptography-48.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c18684a7f0cc9a3cb60328f496b8e3372def7c5d2df39ac267878b05565aaaae", size = 4819580, upload-time = "2026-05-04T22:58:34.254Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/38/85/ea67067c70a1fd4be2c63d35eeed82658023021affccc7b17705f8527dd2/cryptography-48.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:9be5aafa5736574f8f15f262adc81b2a9869e2cfe9014d52a44633905b40d52c", size = 4963283, upload-time = "2026-05-04T22:58:36.376Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/75/54/cc6d0f3deac3e81c7f847e8a189a12b6cdd65059b43dad25d4316abd849a/cryptography-48.0.0-cp314-cp314t-win32.whl", hash = "sha256:c17dfe85494deaeddc5ce251aebd1d60bbe6afc8b62071bb0b469431a000124f", size = 3270954, upload-time = "2026-05-04T22:58:38.791Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/49/67/cc947e288c0758a4e5473d1dcb743037ab7785541265a969240b8885441a/cryptography-48.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:27241b1dc9962e056062a8eef1991d02c3a24569c95975bd2322a8a52c6e5e12", size = 3797313, upload-time = "2026-05-04T22:58:40.746Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f2/63/61d4a4e1c6b6bab6ce1e213cd36a24c415d90e76d78c5eb8577c5541d2e8/cryptography-48.0.0-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:58d00498e8933e4a194f3076aee1b4a97dfec1a6da444535755822fe5d8b0b86", size = 7983482, upload-time = "2026-05-04T22:58:43.769Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d5/ac/f5b5995b87770c693e2596559ffafe195b4033a57f14a82268a2842953f3/cryptography-48.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:614d0949f4790582d2cc25553abd09dd723025f0c0e7c67376a1d77196743d6e", size = 4683266, upload-time = "2026-05-04T22:58:46.064Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ec/c6/8b14f67e18338fbc4adb76f66c001f5c3610b3e2d1837f268f47a347dbbb/cryptography-48.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7ce4bfae76319a532a2dc68f82cc32f5676ee792a983187dac07183690e5c66f", size = 4696228, upload-time = "2026-05-04T22:58:48.22Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ea/73/f808fbae9514bd91b47875b003f13e284c8c6bdfd904b7944e803937eec1/cryptography-48.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:2eb992bbd4661238c5a397594c83f5b4dc2bc5b848c365c8f991b6780efcc5c7", size = 4689097, upload-time = "2026-05-04T22:58:50.9Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/93/01/d86632d7d28db8ae83221995752eeb6639ffb374c2d22955648cf8d52797/cryptography-48.0.0-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:22a5cb272895dce158b2cacdfdc3debd299019659f42947dbdac6f32d68fe832", size = 5283582, upload-time = "2026-05-04T22:58:53.017Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/02/e1/50edc7a50334807cc4791fc4a0ce7468b4a1416d9138eab358bfc9a3d70b/cryptography-48.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:2b4d59804e8408e2fea7d1fbaf218e5ec984325221db76e6a241a9abd6cdd95c", size = 4730479, upload-time = "2026-05-04T22:58:55.611Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6f/af/99a582b1b1641ff5911ac559beb45097cf79efd4ead4657f578ef1af2d47/cryptography-48.0.0-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:984a20b0f62a26f48a3396c72e4bc34c66e356d356bf370053066b3b6d54634a", size = 4326481, upload-time = "2026-05-04T22:58:57.607Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/90/ee/89aa26a06ef0a7d7611788ffd571a7c50e368cc6a4d5eef8b4884e866edb/cryptography-48.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:5a5ed8fde7a1d09376ca0b40e68cd59c69fe23b1f9768bd5824f54681626032a", size = 4688713, upload-time = "2026-05-04T22:59:00.077Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/70/ba/bcb1b0bb7a33d4c7c0c4d4c7874b4a62ae4f56113a5f4baefa362dfb1f0f/cryptography-48.0.0-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:8cd666227ef7af430aa5914a9910e0ddd703e75f039cef0825cd0da71b6b711a", size = 5238165, upload-time = "2026-05-04T22:59:02.317Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c9/70/ca4003b1ce5ca3dc3186ada51908c8a9b9ff7d5cab83cc0d43ee14ec144f/cryptography-48.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9071196d81abc88b3516ac8cdfad32e2b66dd4a5393a8e68a961e9161ddc6239", size = 4729947, upload-time = "2026-05-04T22:59:05.255Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/44/a0/4ec7cf774207905aef1a8d11c3750d5a1db805eb380ee4e16df317870128/cryptography-48.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1e2d54c8be6152856a36f0882ab231e70f8ec7f14e93cf87db8a2ed056bf160c", size = 4822059, upload-time = "2026-05-04T22:59:07.802Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1e/75/a2e55f99c16fcac7b5d6c1eb19ad8e00799854d6be5ca845f9259eae1681/cryptography-48.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a5da777e32ffed6f85a7b2b3f7c5cbc88c146bfcd0a1d7baf5fcc6c52ee35dd4", size = 4960575, upload-time = "2026-05-04T22:59:09.851Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b8/23/6e6f32143ab5d8b36ca848a502c4bcd477ae75b9e1677e3530d669062578/cryptography-48.0.0-cp39-abi3-win32.whl", hash = "sha256:77a2ccbbe917f6710e05ba9adaa25fb5075620bf3ea6fb751997875aff4ae4bd", size = 3279117, upload-time = "2026-05-04T22:59:12.019Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9d/9a/0fea98a70cf1749d41d738836f6349d97945f7c89433a259a6c2642eefeb/cryptography-48.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:16cd65b9330583e4619939b3a3843eec1e6e789744bb01e7c7e2e62e33c239c8", size = 3792100, upload-time = "2026-05-04T22:59:14.884Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2146,7 +2146,7 @@ tests = [
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "celery", extras = ["redis"], specifier = ">=5.6.3,<8" },
|
||||
{ name = "cryptography", specifier = ">=48.0.1,<49.0.0" },
|
||||
{ name = "cryptography", specifier = ">=48.0.0,<49.0.0" },
|
||||
{ name = "dict2xml", specifier = ">=1.7.8,<2.0.0" },
|
||||
{ name = "django", specifier = ">=5.2.15,<6.0.0" },
|
||||
{ name = "django-celery-beat", specifier = ">=2.9.0" },
|
||||
|
||||
Reference in New Issue
Block a user