mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-23 19:06:37 +02:00
Compare commits
1 Commits
migration-
...
83de99c28e
Author | SHA1 | Date | |
---|---|---|---|
83de99c28e |
@ -7,25 +7,25 @@ stages:
|
|||||||
variables:
|
variables:
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
|
|
||||||
# Debian Bullseye
|
# Debian Buster
|
||||||
py39-django42:
|
# py37-django22:
|
||||||
stage: test
|
# stage: test
|
||||||
image: debian:bullseye
|
# image: debian:buster-backports
|
||||||
before_script:
|
# before_script:
|
||||||
- >
|
# - >
|
||||||
apt-get update &&
|
# apt-get update &&
|
||||||
apt-get install --no-install-recommends -y
|
# apt-get install --no-install-recommends -t buster-backports -y
|
||||||
python3-django python3-django-crispy-forms
|
# python3-django python3-django-crispy-forms
|
||||||
python3-django-extensions python3-django-filters python3-django-polymorphic
|
# python3-django-extensions python3-django-filters python3-django-polymorphic
|
||||||
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
# python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
||||||
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
# python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
||||||
python3-bs4 python3-setuptools tox texlive-xetex
|
# python3-bs4 python3-setuptools tox texlive-xetex
|
||||||
script: tox -e py39-django42
|
# script: tox -e py37-django22
|
||||||
|
|
||||||
# Ubuntu 22.04
|
# Ubuntu 20.04
|
||||||
py310-django42:
|
py38-django22:
|
||||||
stage: test
|
stage: test
|
||||||
image: ubuntu:22.04
|
image: ubuntu:20.04
|
||||||
before_script:
|
before_script:
|
||||||
# Fix tzdata prompt
|
# Fix tzdata prompt
|
||||||
- ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone
|
- ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone
|
||||||
@ -37,12 +37,12 @@ py310-django42:
|
|||||||
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
||||||
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
||||||
python3-bs4 python3-setuptools tox texlive-xetex
|
python3-bs4 python3-setuptools tox texlive-xetex
|
||||||
script: tox -e py310-django42
|
script: tox -e py38-django22
|
||||||
|
|
||||||
# Debian Bookworm
|
# Debian Bullseye
|
||||||
py311-django42:
|
py39-django22:
|
||||||
stage: test
|
stage: test
|
||||||
image: debian:bookworm
|
image: debian:bullseye
|
||||||
before_script:
|
before_script:
|
||||||
- >
|
- >
|
||||||
apt-get update &&
|
apt-get update &&
|
||||||
@ -52,13 +52,11 @@ py311-django42:
|
|||||||
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil
|
||||||
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache
|
||||||
python3-bs4 python3-setuptools tox texlive-xetex
|
python3-bs4 python3-setuptools tox texlive-xetex
|
||||||
script: tox -e py311-django42
|
script: tox -e py39-django22
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
stage: quality-assurance
|
stage: quality-assurance
|
||||||
image: debian:bookworm
|
image: debian:bullseye
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update && apt-get install -y tox
|
- apt-get update && apt-get install -y tox
|
||||||
script: tox -e linters
|
script: tox -e linters
|
||||||
|
@ -5,7 +5,7 @@ from django.contrib import admin
|
|||||||
from note_kfet.admin import admin_site
|
from note_kfet.admin import admin_site
|
||||||
|
|
||||||
from .forms import GuestForm
|
from .forms import GuestForm
|
||||||
from .models import Activity, ActivityType, Entry, Guest, Opener
|
from .models import Activity, ActivityType, Entry, Guest
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Activity, site=admin_site)
|
@admin.register(Activity, site=admin_site)
|
||||||
@ -45,11 +45,3 @@ class EntryAdmin(admin.ModelAdmin):
|
|||||||
Admin customisation for Entry
|
Admin customisation for Entry
|
||||||
"""
|
"""
|
||||||
list_display = ('note', 'activity', 'time', 'guest')
|
list_display = ('note', 'activity', 'time', 'guest')
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Opener, site=admin_site)
|
|
||||||
class OpenerAdmin(admin.ModelAdmin):
|
|
||||||
"""
|
|
||||||
Admin customisation for Opener
|
|
||||||
"""
|
|
||||||
list_display = ('activity', 'opener')
|
|
||||||
|
@ -4,14 +4,13 @@
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from random import shuffle
|
from random import shuffle
|
||||||
|
|
||||||
from bootstrap_datepicker_plus.widgets import DateTimePickerInput
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
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 member.models import Club
|
from member.models import Club
|
||||||
from note.models import Note, NoteUser
|
from note.models import Note, NoteUser
|
||||||
from note_kfet.inputs import Autocomplete
|
from note_kfet.inputs import Autocomplete, DateTimePickerInput
|
||||||
from note_kfet.middlewares import get_current_request
|
from note_kfet.middlewares import get_current_request
|
||||||
from permission.backends import PermissionBackend
|
from permission.backends import PermissionBackend
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* On form submit, add a new opener
|
* On form submit, create a new friendship
|
||||||
*/
|
*/
|
||||||
function form_create_opener (e) {
|
function form_create_opener (e) {
|
||||||
// Do not submit HTML form
|
// Do not submit HTML form
|
||||||
@ -16,9 +16,9 @@ function form_create_opener (e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an opener between an activity and a user
|
* Create a trust between users
|
||||||
* @param activity:Integer activity id
|
* @param trusting:Integer trusting note id
|
||||||
* @param opener:Integer user note id
|
* @param trusted:Integer trusted note id
|
||||||
*/
|
*/
|
||||||
function create_opener(activity, opener) {
|
function create_opener(activity, opener) {
|
||||||
$.post('/api/activity/opener/', {
|
$.post('/api/activity/opener/', {
|
||||||
@ -28,15 +28,36 @@ function create_opener(activity, opener) {
|
|||||||
}).done(function () {
|
}).done(function () {
|
||||||
// Reload tables
|
// Reload tables
|
||||||
$('#opener_table').load(location.pathname + ' #opener_table')
|
$('#opener_table').load(location.pathname + ' #opener_table')
|
||||||
addMsg(gettext('Opener successfully added'), 'success')
|
addMsg(gettext('Friendship successfully added'), 'success')
|
||||||
}).fail(function (xhr, _textStatus, _error) {
|
}).fail(function (xhr, _textStatus, _error) {
|
||||||
errMsg(xhr.responseJSON)
|
errMsg(xhr.responseJSON)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On click of "delete", delete the opener
|
* On form submit, create a new friendship
|
||||||
* @param button_id:Integer Opener id to remove
|
function create_opener (e) {
|
||||||
|
// Do not submit HTML form
|
||||||
|
e.preventDefault()
|
||||||
|
|
||||||
|
// Get data and send to API
|
||||||
|
const formData = new FormData(e.target)
|
||||||
|
$.post('/api/activity/opener/', {
|
||||||
|
csrfmiddlewaretoken: formData.get('csrfmiddlewaretoken'),
|
||||||
|
activity: formData.get('activity'),
|
||||||
|
opener: formData.get('opener')
|
||||||
|
}).done(function () {
|
||||||
|
// Reload table
|
||||||
|
$('#opener_table').load(location.pathname + ' #opener_table')
|
||||||
|
addMsg(gettext('Alias successfully added'), 'success')
|
||||||
|
}).fail(function (xhr, _textStatus, _error) {
|
||||||
|
errMsg(xhr.responseJSON)
|
||||||
|
})
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On click of "delete", delete the trust
|
||||||
|
* @param button_id:Integer Trust id to remove
|
||||||
*/
|
*/
|
||||||
function delete_button (button_id) {
|
function delete_button (button_id) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -44,7 +65,7 @@ function delete_button (button_id) {
|
|||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: { 'X-CSRFTOKEN': CSRF_TOKEN }
|
headers: { 'X-CSRFTOKEN': CSRF_TOKEN }
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
addMsg(gettext('Opener successfully deleted'), 'success')
|
addMsg(gettext('Friendship successfully deleted'), 'success')
|
||||||
$('#opener_table').load(location.pathname + ' #opener_table')
|
$('#opener_table').load(location.pathname + ' #opener_table')
|
||||||
}).fail(function (xhr, _textStatus, _error) {
|
}).fail(function (xhr, _textStatus, _error) {
|
||||||
errMsg(xhr.responseJSON)
|
errMsg(xhr.responseJSON)
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import include
|
from django.conf.urls import url, include
|
||||||
from django.urls import re_path
|
|
||||||
from rest_framework import routers
|
from rest_framework import routers
|
||||||
|
|
||||||
from .views import UserInformationView
|
from .views import UserInformationView
|
||||||
@ -48,7 +47,7 @@ app_name = 'api'
|
|||||||
# Wire up our API using automatic URL routing.
|
# Wire up our API using automatic URL routing.
|
||||||
# Additionally, we include login URLs for the browsable API.
|
# Additionally, we include login URLs for the browsable API.
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
re_path('^', include(router.urls)),
|
url('^', include(router.urls)),
|
||||||
re_path('^me/', UserInformationView.as_view()),
|
url('^me/', UserInformationView.as_view()),
|
||||||
re_path('^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
url('^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
||||||
]
|
]
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import io
|
import io
|
||||||
|
|
||||||
from bootstrap_datepicker_plus.widgets import DatePickerInput
|
from PIL import Image, ImageSequence
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.auth.forms import AuthenticationForm
|
from django.contrib.auth.forms import AuthenticationForm
|
||||||
@ -13,9 +13,8 @@ from django.forms import CheckboxSelectMultiple
|
|||||||
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 note.models import NoteSpecial, Alias
|
from note.models import NoteSpecial, Alias
|
||||||
from note_kfet.inputs import Autocomplete, AmountInput
|
from note_kfet.inputs import Autocomplete, AmountInput, DatePickerInput
|
||||||
from permission.models import PermissionMask, Role
|
from permission.models import PermissionMask, Role
|
||||||
from PIL import Image, ImageSequence
|
|
||||||
|
|
||||||
from .models import Profile, Club, Membership
|
from .models import Profile, Club, Membership
|
||||||
|
|
||||||
@ -33,7 +32,7 @@ class UserForm(forms.ModelForm):
|
|||||||
# Django usernames can only contain letters, numbers, @, ., +, - and _.
|
# Django usernames can only contain letters, numbers, @, ., +, - and _.
|
||||||
# We want to allow users to have uncommon and unpractical usernames:
|
# We want to allow users to have uncommon and unpractical usernames:
|
||||||
# That is their problem, and we have normalized aliases for us.
|
# That is their problem, and we have normalized aliases for us.
|
||||||
return super()._get_validation_exclusions() | {"username"}
|
return super()._get_validation_exclusions() + ["username"]
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = User
|
model = User
|
||||||
|
@ -42,12 +42,12 @@ class UserTable(tables.Table):
|
|||||||
"""
|
"""
|
||||||
alias = tables.Column()
|
alias = tables.Column()
|
||||||
|
|
||||||
section = tables.Column(accessor='profile__section', orderable=False)
|
section = tables.Column(accessor='profile__section')
|
||||||
|
|
||||||
# Override the column to let replace the URL
|
# Override the column to let replace the URL
|
||||||
email = tables.EmailColumn(linkify=lambda record: "mailto:{}".format(record.email))
|
email = tables.EmailColumn(linkify=lambda record: "mailto:{}".format(record.email))
|
||||||
|
|
||||||
balance = tables.Column(accessor='note__balance', verbose_name=_("Balance"), orderable=False)
|
balance = tables.Column(accessor='note__balance', verbose_name=_("Balance"))
|
||||||
|
|
||||||
def render_email(self, record, value):
|
def render_email(self, record, value):
|
||||||
# Replace the email by a dash if the user can't see the profile detail
|
# Replace the email by a dash if the user can't see the profile detail
|
||||||
|
@ -11,7 +11,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
{{ title }}
|
{{ title }}
|
||||||
</h3>
|
</h3>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note...">
|
<input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note…">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<label class="form-check-label" for="only_active">
|
<label class="form-check-label" for="only_active">
|
||||||
<input type="checkbox" class="checkboxinput form-check-input" id="only_active"
|
<input type="checkbox" class="checkboxinput form-check-input" id="only_active"
|
||||||
|
@ -166,7 +166,8 @@ class UserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, DetailView):
|
|||||||
# Display only the most recent membership
|
# Display only the most recent membership
|
||||||
club_list = club_list.distinct("club__name")\
|
club_list = club_list.distinct("club__name")\
|
||||||
if settings.DATABASES["default"]["ENGINE"] == 'django.db.backends.postgresql' else club_list
|
if settings.DATABASES["default"]["ENGINE"] == 'django.db.backends.postgresql' else club_list
|
||||||
membership_table = MembershipTable(data=club_list, prefix='membership-')
|
club_list_order_by = self.request.GET.getlist("membership-sort", ("club__name", "-date_start"))
|
||||||
|
membership_table = MembershipTable(data=club_list, prefix='membership-', order_by=club_list_order_by)
|
||||||
membership_table.paginate(per_page=10, page=self.request.GET.get("membership-page", 1))
|
membership_table.paginate(per_page=10, page=self.request.GET.get("membership-page", 1))
|
||||||
context['club_list'] = membership_table
|
context['club_list'] = membership_table
|
||||||
|
|
||||||
@ -476,7 +477,8 @@ class ClubDetailView(ProtectQuerysetMixin, LoginRequiredMixin, DetailView):
|
|||||||
managers = Membership.objects.filter(club=self.object, roles__name="Bureau de club",
|
managers = Membership.objects.filter(club=self.object, roles__name="Bureau de club",
|
||||||
date_start__lte=date.today(), date_end__gte=date.today())\
|
date_start__lte=date.today(), date_end__gte=date.today())\
|
||||||
.order_by('user__last_name').all()
|
.order_by('user__last_name').all()
|
||||||
context["managers"] = ClubManagerTable(data=managers, prefix="managers-")
|
managers_order_by = self.request.GET.getlist("managers-sort", ('user__last_name'))
|
||||||
|
context["managers"] = ClubManagerTable(data=managers, prefix="managers-", order_by=managers_order_by)
|
||||||
# transaction history
|
# transaction history
|
||||||
club_transactions = Transaction.objects.all().filter(Q(source=club.note) | Q(destination=club.note))\
|
club_transactions = Transaction.objects.all().filter(Q(source=club.note) | Q(destination=club.note))\
|
||||||
.filter(PermissionBackend.filter_queryset(self.request, Transaction, "view"))\
|
.filter(PermissionBackend.filter_queryset(self.request, Transaction, "view"))\
|
||||||
@ -494,7 +496,8 @@ class ClubDetailView(ProtectQuerysetMixin, LoginRequiredMixin, DetailView):
|
|||||||
club_member = club_member.distinct("user__username")\
|
club_member = club_member.distinct("user__username")\
|
||||||
if settings.DATABASES["default"]["ENGINE"] == 'django.db.backends.postgresql' else club_member
|
if settings.DATABASES["default"]["ENGINE"] == 'django.db.backends.postgresql' else club_member
|
||||||
|
|
||||||
membership_table = MembershipTable(data=club_member, prefix="membership-")
|
membership_order_by = self.request.GET.getlist("membership-sort", ("user__username", "-date_start"))
|
||||||
|
membership_table = MembershipTable(data=club_member, prefix="membership-", order_by=membership_order_by)
|
||||||
membership_table.paginate(per_page=5, page=self.request.GET.get('membership-page', 1))
|
membership_table.paginate(per_page=5, page=self.request.GET.get('membership-page', 1))
|
||||||
context['member_list'] = membership_table
|
context['member_list'] = membership_table
|
||||||
|
|
||||||
|
@ -183,10 +183,19 @@ class ConsumerViewSet(ReadOnlyProtectedModelViewSet):
|
|||||||
# We match first an alias if it is matched without normalization,
|
# We match first an alias if it is matched without normalization,
|
||||||
# then if the normalized pattern matches a normalized alias.
|
# then if the normalized pattern matches a normalized alias.
|
||||||
queryset = queryset.filter(
|
queryset = queryset.filter(
|
||||||
Q(**{f'name{suffix}': alias_prefix + alias})
|
**{f'name{suffix}': alias_prefix + alias}
|
||||||
| Q(**{f'normalized_name{suffix}': alias_prefix + Alias.normalize(alias)})
|
).union(
|
||||||
| Q(**{f'normalized_name{suffix}': alias_prefix + alias.lower()})
|
queryset.filter(
|
||||||
)
|
Q(**{f'normalized_name{suffix}': alias_prefix + Alias.normalize(alias)})
|
||||||
|
& ~Q(**{f'name{suffix}': alias_prefix + alias})
|
||||||
|
),
|
||||||
|
all=True).union(
|
||||||
|
queryset.filter(
|
||||||
|
Q(**{f'normalized_name{suffix}': alias_prefix + alias.lower()})
|
||||||
|
& ~Q(**{f'normalized_name{suffix}': alias_prefix + Alias.normalize(alias)})
|
||||||
|
& ~Q(**{f'name{suffix}': alias_prefix + alias})
|
||||||
|
),
|
||||||
|
all=True)
|
||||||
|
|
||||||
queryset = queryset if settings.DATABASES[queryset.db]["ENGINE"] == 'django.db.backends.postgresql' \
|
queryset = queryset if settings.DATABASES[queryset.db]["ENGINE"] == 'django.db.backends.postgresql' \
|
||||||
else queryset.order_by("name")
|
else queryset.order_by("name")
|
||||||
|
@ -2,13 +2,12 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from bootstrap_datepicker_plus.widgets import DateTimePickerInput
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.forms import CheckboxSelectMultiple
|
from django.forms import CheckboxSelectMultiple
|
||||||
from django.utils.timezone import make_aware
|
from django.utils.timezone import make_aware
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from note_kfet.inputs import Autocomplete, AmountInput
|
from note_kfet.inputs import Autocomplete, AmountInput, DateTimePickerInput
|
||||||
|
|
||||||
from .models import TransactionTemplate, NoteClub, Alias
|
from .models import TransactionTemplate, NoteClub, Alias
|
||||||
|
|
||||||
|
@ -260,13 +260,11 @@ class ButtonTable(tables.Table):
|
|||||||
text=_('edit'),
|
text=_('edit'),
|
||||||
accessor='pk',
|
accessor='pk',
|
||||||
verbose_name=_("Edit"),
|
verbose_name=_("Edit"),
|
||||||
orderable=False,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
hideshow = tables.Column(
|
hideshow = tables.Column(
|
||||||
verbose_name=_("Hide/Show"),
|
verbose_name=_("Hide/Show"),
|
||||||
accessor="pk",
|
accessor="pk",
|
||||||
orderable=False,
|
|
||||||
attrs={
|
attrs={
|
||||||
'td': {
|
'td': {
|
||||||
'class': 'col-sm-1',
|
'class': 'col-sm-1',
|
||||||
@ -278,8 +276,7 @@ class ButtonTable(tables.Table):
|
|||||||
delete_col = tables.TemplateColumn(template_code=DELETE_TEMPLATE,
|
delete_col = tables.TemplateColumn(template_code=DELETE_TEMPLATE,
|
||||||
extra_context={"delete_trans": _('delete')},
|
extra_context={"delete_trans": _('delete')},
|
||||||
attrs={'td': {'class': 'col-sm-1'}},
|
attrs={'td': {'class': 'col-sm-1'}},
|
||||||
verbose_name=_("Delete"),
|
verbose_name=_("Delete"), )
|
||||||
orderable=False, )
|
|
||||||
|
|
||||||
def render_amount(self, value):
|
def render_amount(self, value):
|
||||||
return pretty_money(value)
|
return pretty_money(value)
|
||||||
|
@ -9,7 +9,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
name="{{ widget.name }}"
|
name="{{ widget.name }}"
|
||||||
{# Other attributes are loaded #}
|
{# Other attributes are loaded #}
|
||||||
{% for name, value in widget.attrs.items %}
|
{% for name, value in widget.attrs.items %}
|
||||||
{% if value is not False %}{{ name }}{% if value is not True %}="{{ value|stringformat:'s' }}"{% endif %}{% endif %}
|
{% ifnotequal value False %}{{ name }}{% ifnotequal value True %}="{{ value|stringformat:'s' }}"{% endifnotequal %}{% endifnotequal %}
|
||||||
{% endfor %}>
|
{% endfor %}>
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<span class="input-group-text">€</span>
|
<span class="input-group-text">€</span>
|
||||||
|
@ -3167,12 +3167,12 @@
|
|||||||
"activity",
|
"activity",
|
||||||
"entry"
|
"entry"
|
||||||
],
|
],
|
||||||
"query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]]}",
|
"query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]], \"activity__open\": true, \"activity__activity_type__manage_entries\":true}",
|
||||||
"type": "view",
|
"type": "view",
|
||||||
"mask": 2,
|
"mask": 2,
|
||||||
"field": "",
|
"field": "",
|
||||||
"permanent": false,
|
"permanent": false,
|
||||||
"description": "Voir les entrées des activités dont l'utilisateur⋅rice est ouvreur⋅se"
|
"description": "Voir les entrées des activités ouvertes dont l'utilisateur⋅rice est ouvreur⋅se"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3183,12 +3183,12 @@
|
|||||||
"activity",
|
"activity",
|
||||||
"guest"
|
"guest"
|
||||||
],
|
],
|
||||||
"query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]]}",
|
"query": "{\"activity__pk__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]], \"activity__open\": true, \"activity__activity_type__manage_entries\":true}",
|
||||||
"type": "view",
|
"type": "view",
|
||||||
"mask": 2,
|
"mask": 2,
|
||||||
"field": "",
|
"field": "",
|
||||||
"permanent": false,
|
"permanent": false,
|
||||||
"description": "Voir les invité⋅es des activités dont l'utilisateur⋅rice est ouvreur⋅se"
|
"description": "Voir les invité⋅es des activités ouvertes dont l'utilisateur⋅rice est ouvreur⋅se"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -135,18 +135,18 @@ class Permission(models.Model):
|
|||||||
|
|
||||||
# A json encoded Q object with the following grammar
|
# A json encoded Q object with the following grammar
|
||||||
# query -> [] | {} (the empty query representing all objects)
|
# query -> [] | {} (the empty query representing all objects)
|
||||||
# query -> ["AND", query, ...] AND multiple queries
|
# query -> ["AND", query, …] AND multiple queries
|
||||||
# | ["OR", query, ...] OR multiple queries
|
# | ["OR", query, …] OR multiple queries
|
||||||
# | ["NOT", query] Opposite of query
|
# | ["NOT", query] Opposite of query
|
||||||
# query -> {key: value, ...} A list of fields and values of a Q object
|
# query -> {key: value, …} A list of fields and values of a Q object
|
||||||
# key -> string A field name
|
# key -> string A field name
|
||||||
# value -> int | string | bool | null Literal values
|
# value -> int | string | bool | null Literal values
|
||||||
# | [parameter, ...] A parameter. See compute_param for more details.
|
# | [parameter, …] A parameter. See compute_param for more details.
|
||||||
# | {"F": oper} An F object
|
# | {"F": oper} An F object
|
||||||
# oper -> [string, ...] A parameter. See compute_param for more details.
|
# oper -> [string, …] A parameter. See compute_param for more details.
|
||||||
# | ["ADD", oper, ...] Sum multiple F objects or literal
|
# | ["ADD", oper, …] Sum multiple F objects or literal
|
||||||
# | ["SUB", oper, oper] Substract two F objects or literal
|
# | ["SUB", oper, oper] Substract two F objects or literal
|
||||||
# | ["MUL", oper, ...] Multiply F objects or literals
|
# | ["MUL", oper, …] Multiply F objects or literals
|
||||||
# | int | string | bool | null Literal values
|
# | int | string | bool | null Literal values
|
||||||
# | ["F", string] A field
|
# | ["F", string] A field
|
||||||
#
|
#
|
||||||
|
@ -35,8 +35,6 @@ class PermissionScopes(BaseScopes):
|
|||||||
|
|
||||||
|
|
||||||
class PermissionOAuth2Validator(OAuth2Validator):
|
class PermissionOAuth2Validator(OAuth2Validator):
|
||||||
oidc_claim_scope = None # fix breaking change of django-oauth-toolkit 2.0.0
|
|
||||||
|
|
||||||
def validate_scopes(self, client_id, scopes, client, request, *args, **kwargs):
|
def validate_scopes(self, client_id, scopes, client, request, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
User can request as many scope as he wants, including invalid scopes,
|
User can request as many scope as he wants, including invalid scopes,
|
||||||
|
@ -37,7 +37,6 @@ class InvoiceTable(tables.Table):
|
|||||||
args=[A('id')],
|
args=[A('id')],
|
||||||
verbose_name=_("delete"),
|
verbose_name=_("delete"),
|
||||||
text=_("Delete"),
|
text=_("Delete"),
|
||||||
orderable=False,
|
|
||||||
attrs={
|
attrs={
|
||||||
'th': {
|
'th': {
|
||||||
'id': 'delete-membership-header'
|
'id': 'delete-membership-header'
|
||||||
@ -71,7 +70,6 @@ class RemittanceTable(tables.Table):
|
|||||||
verbose_name=_("View"),
|
verbose_name=_("View"),
|
||||||
args=[A("pk")],
|
args=[A("pk")],
|
||||||
text=_("View"),
|
text=_("View"),
|
||||||
orderable=False,
|
|
||||||
attrs={
|
attrs={
|
||||||
'a': {'class': 'btn btn-primary'}
|
'a': {'class': 'btn btn-primary'}
|
||||||
}, )
|
}, )
|
||||||
@ -99,7 +97,6 @@ class SpecialTransactionTable(tables.Table):
|
|||||||
verbose_name=_("Remittance"),
|
verbose_name=_("Remittance"),
|
||||||
args=[A("specialtransactionproxy__pk")],
|
args=[A("specialtransactionproxy__pk")],
|
||||||
text=_("Add"),
|
text=_("Add"),
|
||||||
orderable=False,
|
|
||||||
attrs={
|
attrs={
|
||||||
'a': {'class': 'btn btn-primary'}
|
'a': {'class': 'btn btn-primary'}
|
||||||
}, )
|
}, )
|
||||||
@ -108,7 +105,6 @@ class SpecialTransactionTable(tables.Table):
|
|||||||
verbose_name=_("Remittance"),
|
verbose_name=_("Remittance"),
|
||||||
args=[A("specialtransactionproxy__pk")],
|
args=[A("specialtransactionproxy__pk")],
|
||||||
text=_("Remove"),
|
text=_("Remove"),
|
||||||
orderable=False,
|
|
||||||
attrs={
|
attrs={
|
||||||
'a': {'class': 'btn btn-primary btn-danger'}
|
'a': {'class': 'btn btn-primary btn-danger'}
|
||||||
}, )
|
}, )
|
||||||
@ -134,12 +130,10 @@ class SogeCreditTable(tables.Table):
|
|||||||
|
|
||||||
amount = tables.Column(
|
amount = tables.Column(
|
||||||
verbose_name=_("Amount"),
|
verbose_name=_("Amount"),
|
||||||
orderable=False,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
valid = tables.Column(
|
valid = tables.Column(
|
||||||
verbose_name=_("Valid"),
|
verbose_name=_("Valid"),
|
||||||
orderable=False,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def render_amount(self, value):
|
def render_amount(self, value):
|
||||||
|
@ -109,7 +109,7 @@
|
|||||||
\renewcommand{\headrulewidth}{0pt}
|
\renewcommand{\headrulewidth}{0pt}
|
||||||
\cfoot{
|
\cfoot{
|
||||||
\small{\MonNom ~--~ \MonAdresseRue ~ \MonAdresseVille ~--~ Téléphone : +33(0)7 78 17 22 34\newline
|
\small{\MonNom ~--~ \MonAdresseRue ~ \MonAdresseVille ~--~ Téléphone : +33(0)7 78 17 22 34\newline
|
||||||
E-mail : tresorerie.bde@lists.crans.org ~--~ Numéro SIRET : 399 485 838 00029
|
Site web : bde.ens-cachan.fr ~--~ E-mail : tresorerie.bde@lists.crans.org \newline Numéro SIRET : 399 485 838 00029
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
# Copyright (C) 2018-2024 by BDE ENS Paris-Saclay
|
# Copyright (C) 2018-2024 by BDE ENS Paris-Saclay
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
from bootstrap_datepicker_plus.widgets import DatePickerInput
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.forms import CheckboxSelectMultiple
|
from django.forms import CheckboxSelectMultiple
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from note.models import NoteSpecial, NoteUser
|
from note.models import NoteSpecial, NoteUser
|
||||||
from note_kfet.inputs import AmountInput, Autocomplete, ColorWidget
|
from note_kfet.inputs import AmountInput, DatePickerInput, Autocomplete, ColorWidget
|
||||||
|
|
||||||
from ..models import WEIClub, WEIRegistration, Bus, BusTeam, WEIMembership, WEIRole
|
from ..models import WEIClub, WEIRegistration, Bus, BusTeam, WEIMembership, WEIRole
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ WORDS = {
|
|||||||
5: "La quoi ?"
|
5: "La quoi ?"
|
||||||
}],
|
}],
|
||||||
"kokarde": ["Qu'est-ce que le mot Kokarde t'évoque ?", {
|
"kokarde": ["Qu'est-ce que le mot Kokarde t'évoque ?", {
|
||||||
1: "Vraiment pas mon truc les soirées...",
|
1: "Vraiment pas mon truc les soirées…",
|
||||||
2: "Bof, je viens pour manger et je repars aussitôt",
|
2: "Bof, je viens pour manger et je repars aussitôt",
|
||||||
3: "Je kiffe, good vibes",
|
3: "Je kiffe, good vibes",
|
||||||
4: "Perso, je ne m'arrêterai pas de danser sur la piste !",
|
4: "Perso, je ne m'arrêterai pas de danser sur la piste !",
|
||||||
@ -117,15 +117,15 @@ WORDS = {
|
|||||||
5: "Je pourrais en faire à n'importe qui. Pourquoi ne pas créer le club Câl[ENS] ?"
|
5: "Je pourrais en faire à n'importe qui. Pourquoi ne pas créer le club Câl[ENS] ?"
|
||||||
}],
|
}],
|
||||||
"vomi": ["Quel est ton rapport au vomi ?", {
|
"vomi": ["Quel est ton rapport au vomi ?", {
|
||||||
1: "C'est compliqué...",
|
1: "C'est compliqué…",
|
||||||
2: "Jamais je ne vomis mais je nettoie quand mes potes vomissent",
|
2: "Jamais je ne vomis mais je nettoie quand mes potes vomissent",
|
||||||
3: "Jamais je ne vomis et jamais je ne nettoie celui de quelqu'un d'autre",
|
3: "Jamais je ne vomis et jamais je ne nettoie celui de quelqu'un d'autre",
|
||||||
4: "Je vomis quelquefois, ça arrive, faites pas cette tête, mais je fins toujours par nettoyer !",
|
4: "Je vomis quelquefois, ça arrive, faites pas cette tête, mais je fins toujours par nettoyer !",
|
||||||
5: "Je vomis à chaque soirée et ce n'est jamais moi qui nettoie"
|
5: "Je vomis à chaque soirée et ce n'est jamais moi qui nettoie"
|
||||||
}],
|
}],
|
||||||
"kfet": ["Qu'est ce que la Kfet t'évoque ?", {
|
"kfet": ["Qu'est ce que la Kfet t'évoque ?", {
|
||||||
1: "La Kfet, quel lieu de dépravé⋅es sérieux...",
|
1: "La Kfet, quel lieu de dépravé⋅es sérieux…",
|
||||||
2: "C'est un endroit à l'hygiène plus que douteuse...",
|
2: "C'est un endroit à l'hygiène plus que douteuse…",
|
||||||
3: "Téma les prix des boissons et des snacks, c'est aberrant !",
|
3: "Téma les prix des boissons et des snacks, c'est aberrant !",
|
||||||
4: "En vrai, c'est cool, petit billard, petit canapé, chill !",
|
4: "En vrai, c'est cool, petit billard, petit canapé, chill !",
|
||||||
5: "Banger, j'y reste jusqu'à la fin de mes jours"
|
5: "Banger, j'y reste jusqu'à la fin de mes jours"
|
||||||
@ -147,7 +147,7 @@ WORDS = {
|
|||||||
"scolarite": ["Comment tu vois ton cursus à l'ENS ?", {
|
"scolarite": ["Comment tu vois ton cursus à l'ENS ?", {
|
||||||
1: "La tranquillité et le travail",
|
1: "La tranquillité et le travail",
|
||||||
2: "On va s'amuser tout en bossant",
|
2: "On va s'amuser tout en bossant",
|
||||||
3: "Ça va profiter et réviser au dernier moment pour les exams...",
|
3: "Ça va profiter et réviser au dernier moment pour les exams…",
|
||||||
4: "Nous festoierons sans songer aux conséquences",
|
4: "Nous festoierons sans songer aux conséquences",
|
||||||
5: "Je ne vois qu'une seule issue : la débauche"
|
5: "Je ne vois qu'une seule issue : la débauche"
|
||||||
}]
|
}]
|
||||||
|
@ -439,7 +439,7 @@ class TestWEIRegistration(TestCase):
|
|||||||
emergency_contact_phone='+33123456789',
|
emergency_contact_phone='+33123456789',
|
||||||
))
|
))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertTrue("This user can't be in her/his first year since he/she has already participated to a WEI."
|
self.assertTrue("This user can't be in her/his first year since he/she has already participated to a WEI."
|
||||||
in str(response.context["form"].errors))
|
in str(response.context["form"].errors))
|
||||||
|
|
||||||
# Check that if the WEI is started, we can't register anyone
|
# Check that if the WEI is started, we can't register anyone
|
||||||
@ -635,7 +635,7 @@ class TestWEIRegistration(TestCase):
|
|||||||
))
|
))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertFalse(response.context["form"].is_valid())
|
self.assertFalse(response.context["form"].is_valid())
|
||||||
self.assertTrue("This team doesn't belong to the given bus." in str(response.context["form"].errors))
|
self.assertTrue("This team doesn't belong to the given bus." in str(response.context["form"].errors))
|
||||||
|
|
||||||
response = self.client.post(reverse("wei:validate_registration", kwargs=dict(pk=self.registration.pk)), dict(
|
response = self.client.post(reverse("wei:validate_registration", kwargs=dict(pk=self.registration.pk)), dict(
|
||||||
roles=[WEIRole.objects.get(name="GC WEI").id],
|
roles=[WEIRole.objects.get(name="GC WEI").id],
|
||||||
|
@ -32,7 +32,7 @@ Applications indispensables
|
|||||||
* `Note <note>`_ :
|
* `Note <note>`_ :
|
||||||
Les notes associées à des utilisateur⋅rices ou des clubs.
|
Les notes associées à des utilisateur⋅rices ou des clubs.
|
||||||
* `Activity <activity>`_ :
|
* `Activity <activity>`_ :
|
||||||
La gestion des activités (créations, gestion, entrées, ...)
|
La gestion des activités (créations, gestion, entrées,…)
|
||||||
* `Permission <permission>`_ :
|
* `Permission <permission>`_ :
|
||||||
Backend de droits, limites les pouvoirs des utilisateur⋅rices
|
Backend de droits, limites les pouvoirs des utilisateur⋅rices
|
||||||
* `API <../api>`_ :
|
* `API <../api>`_ :
|
||||||
@ -64,9 +64,9 @@ Applications facultatives
|
|||||||
* ``cas-server``
|
* ``cas-server``
|
||||||
Serveur central d'authentification, permet d'utiliser son compte de la NoteKfet2020 pour se connecter à d'autre application ayant intégrer un client.
|
Serveur central d'authentification, permet d'utiliser son compte de la NoteKfet2020 pour se connecter à d'autre application ayant intégrer un client.
|
||||||
* `Scripts <https://gitlab.crans.org/bde/nk20-scripts>`_
|
* `Scripts <https://gitlab.crans.org/bde/nk20-scripts>`_
|
||||||
Ensemble de commande `./manage.py` pour la gestion de la note: import de données, verification d'intégrité, etc...
|
Ensemble de commande `./manage.py` pour la gestion de la note: import de données, verification d'intégrité, etc…
|
||||||
* `Treasury <treasury>`_ :
|
* `Treasury <treasury>`_ :
|
||||||
Interface de gestion pour les trésorièr⋅es, émission de factures, remises de chèque, statistiques...
|
Interface de gestion pour les trésorièr⋅es, émission de factures, remises de chèque, statistiques ...
|
||||||
* `WEI <wei>`_ :
|
* `WEI <wei>`_ :
|
||||||
Interface de gestion du WEI.
|
Interface de gestion du WEI.
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ l'utilisateur⋅rice, utiles pour l'adhésion au BDE :
|
|||||||
* ``address`` : ``CharField``, adresse physique de l'utilisateur⋅rice
|
* ``address`` : ``CharField``, adresse physique de l'utilisateur⋅rice
|
||||||
* ``paid`` : ``BooleanField``, indique si l'utilisateur⋅rice normalien⋅ne est rémunéré⋅e ou non (utile pour différencier les montants d'adhésion aux clubs)
|
* ``paid`` : ``BooleanField``, indique si l'utilisateur⋅rice normalien⋅ne est rémunéré⋅e ou non (utile pour différencier les montants d'adhésion aux clubs)
|
||||||
* ``phone_number`` : ``CharField``, numéro de téléphone de l'utilisateur⋅rice
|
* ``phone_number`` : ``CharField``, numéro de téléphone de l'utilisateur⋅rice
|
||||||
* ``section`` : ``CharField``, section de l'ENS à laquelle appartient l'utilisateur⋅rice (exemple : 1A0, ...)
|
* ``section`` : ``CharField``, section de l'ENS à laquelle appartient l'utilisateur⋅rice (exemple : 1A0,…)
|
||||||
|
|
||||||
Clubs
|
Clubs
|
||||||
~~~~~
|
~~~~~
|
||||||
@ -101,7 +101,7 @@ Adhésions
|
|||||||
|
|
||||||
La Note Kfet offre la possibilité aux clubs de gérer l'adhésion de leurs membres. En plus de réguler les cotisations
|
La Note Kfet offre la possibilité aux clubs de gérer l'adhésion de leurs membres. En plus de réguler les cotisations
|
||||||
des adhérent⋅es, des permissions sont octroyées sur la note en fonction des rôles au sein des clubs. Un rôle est une
|
des adhérent⋅es, des permissions sont octroyées sur la note en fonction des rôles au sein des clubs. Un rôle est une
|
||||||
fonction occupée au sein d'un club (Trésorièr⋅e de club, président⋅e de club, GC Kfet, Res[pot], respo info, ...).
|
fonction occupée au sein d'un club (Trésorièr⋅e de club, président⋅e de club, GC Kfet, Res[pot], respo info,…).
|
||||||
Une adhésion attribue à un⋅e adhérent⋅e ses rôles. Les rôles fournissent les permissions. Par exemple, læ trésorièr⋅e d'un
|
Une adhésion attribue à un⋅e adhérent⋅e ses rôles. Les rôles fournissent les permissions. Par exemple, læ trésorièr⋅e d'un
|
||||||
club a le droit de faire des transferts de et vers la note du club, tant que la source reste au-dessus de -50 €.
|
club a le droit de faire des transferts de et vers la note du club, tant que la source reste au-dessus de -50 €.
|
||||||
Une adhésion est considérée comme valide si la date du jour est comprise (au sens large) entre les dates de début et
|
Une adhésion est considérée comme valide si la date du jour est comprise (au sens large) entre les dates de début et
|
||||||
|
@ -49,7 +49,7 @@ Une fois l'inscription validée, détail de ce qu'il se passe :
|
|||||||
lui octroyant un faible nombre de permissions de base, telles que la visualisation de son compte.
|
lui octroyant un faible nombre de permissions de base, telles que la visualisation de son compte.
|
||||||
* On adhère la personne au club Kfet si cela est demandé, l'adhésion commence aujourd'hui. Iel dispose d'un unique rôle :
|
* On adhère la personne au club Kfet si cela est demandé, l'adhésion commence aujourd'hui. Iel dispose d'un unique rôle :
|
||||||
« Adhérent⋅e Kfet » , lui octroyant un nombre un peu plus conséquent de permissions basiques, telles que la possibilité de
|
« Adhérent⋅e Kfet » , lui octroyant un nombre un peu plus conséquent de permissions basiques, telles que la possibilité de
|
||||||
faire des transactions, d'accéder aux activités, au WEI, ...
|
faire des transactions, d'accéder aux activités, au WEI,…
|
||||||
* Si læ nouvelleau membre a indiqué avoir ouvert un compte à la société générale, alors les transactions sont invalidées,
|
* Si læ nouvelleau membre a indiqué avoir ouvert un compte à la société générale, alors les transactions sont invalidées,
|
||||||
la note n'est pas débitée (commence alors à 0 €).
|
la note n'est pas débitée (commence alors à 0 €).
|
||||||
|
|
||||||
|
12
docs/faq.rst
12
docs/faq.rst
@ -177,13 +177,11 @@ Contributeur⋅rices
|
|||||||
|
|
||||||
Liste des contributeur⋅rices majeur⋅es, par ordre alphabétique :
|
Liste des contributeur⋅rices majeur⋅es, par ordre alphabétique :
|
||||||
|
|
||||||
* bleizi
|
* Pierre-André « PAC » COMBY
|
||||||
* erdnaxe
|
* Emmy « ÿnérant » D'ANELLO
|
||||||
* esum
|
* Benjamin « esum » GRAILLOT
|
||||||
* korenst1
|
* Alexandre « erdnaxe » IOOSS
|
||||||
* nicomarg
|
* Nicolas « nicomarg » MARGULIES
|
||||||
* PAC
|
|
||||||
* ÿnérant
|
|
||||||
|
|
||||||
|
|
||||||
Hébergement
|
Hébergement
|
||||||
|
@ -3431,8 +3431,8 @@ msgid "FAQ (FR)"
|
|||||||
msgstr "FAQ (FR)"
|
msgstr "FAQ (FR)"
|
||||||
|
|
||||||
#: note_kfet/templates/base_search.html:15
|
#: note_kfet/templates/base_search.html:15
|
||||||
msgid "Search by attribute such as name..."
|
msgid "Search by attribute such as name…"
|
||||||
msgstr "Suche nach Attributen wie Name..."
|
msgstr "Suche nach Attributen wie Name…"
|
||||||
|
|
||||||
#: note_kfet/templates/base_search.html:23
|
#: note_kfet/templates/base_search.html:23
|
||||||
msgid "There is no results."
|
msgid "There is no results."
|
||||||
|
@ -3381,8 +3381,8 @@ msgid "FAQ (FR)"
|
|||||||
msgstr "FAQ (FR)"
|
msgstr "FAQ (FR)"
|
||||||
|
|
||||||
#: note_kfet/templates/base_search.html:15
|
#: note_kfet/templates/base_search.html:15
|
||||||
msgid "Search by attribute such as name..."
|
msgid "Search by attribute such as name…"
|
||||||
msgstr "Buscar con atributo, como el nombre..."
|
msgstr "Buscar con atributo, como el nombre…"
|
||||||
|
|
||||||
#: note_kfet/templates/base_search.html:23
|
#: note_kfet/templates/base_search.html:23
|
||||||
msgid "There is no results."
|
msgid "There is no results."
|
||||||
|
@ -1671,8 +1671,8 @@ msgstr "Consommer"
|
|||||||
#: apps/note/templates/note/conso_form.html:43
|
#: apps/note/templates/note/conso_form.html:43
|
||||||
#: apps/note/templates/note/transaction_form.html:69
|
#: apps/note/templates/note/transaction_form.html:69
|
||||||
#: apps/note/templates/note/transaction_form.html:96
|
#: apps/note/templates/note/transaction_form.html:96
|
||||||
msgid "Name or alias..."
|
msgid "Name or alias…"
|
||||||
msgstr "Pseudo ou alias..."
|
msgstr "Pseudo ou alias…"
|
||||||
|
|
||||||
#: apps/note/templates/note/conso_form.html:53
|
#: apps/note/templates/note/conso_form.html:53
|
||||||
msgid "Select consumptions"
|
msgid "Select consumptions"
|
||||||
@ -1777,8 +1777,8 @@ msgid "Current price"
|
|||||||
msgstr "Prix actuel"
|
msgstr "Prix actuel"
|
||||||
|
|
||||||
#: apps/note/templates/note/transactiontemplate_list.html:13
|
#: apps/note/templates/note/transactiontemplate_list.html:13
|
||||||
msgid "Name of the button..."
|
msgid "Name of the button…"
|
||||||
msgstr "Nom du bouton..."
|
msgstr "Nom du bouton…"
|
||||||
|
|
||||||
#: apps/note/templates/note/transactiontemplate_list.html:15
|
#: apps/note/templates/note/transactiontemplate_list.html:15
|
||||||
msgid "New button"
|
msgid "New button"
|
||||||
@ -3130,8 +3130,8 @@ msgstr ""
|
|||||||
"coût d'adhésion."
|
"coût d'adhésion."
|
||||||
|
|
||||||
#: apps/wei/templates/wei/weimembership_list.html:27
|
#: apps/wei/templates/wei/weimembership_list.html:27
|
||||||
msgid "View unvalidated registrations..."
|
msgid "View unvalidated registrations…"
|
||||||
msgstr "Voir les inscriptions non validées..."
|
msgstr "Voir les inscriptions non validées…"
|
||||||
|
|
||||||
#: apps/wei/templates/wei/weiregistration_confirm_delete.html:16
|
#: apps/wei/templates/wei/weiregistration_confirm_delete.html:16
|
||||||
msgid "This registration is already validated and can't be deleted."
|
msgid "This registration is already validated and can't be deleted."
|
||||||
@ -3151,8 +3151,8 @@ msgid "There is no pre-registration found with this pattern."
|
|||||||
msgstr "Il n'y a pas de pré-inscription en attente avec cette entrée."
|
msgstr "Il n'y a pas de pré-inscription en attente avec cette entrée."
|
||||||
|
|
||||||
#: apps/wei/templates/wei/weiregistration_list.html:27
|
#: apps/wei/templates/wei/weiregistration_list.html:27
|
||||||
msgid "View validated membershipis..."
|
msgid "View validated memberships…"
|
||||||
msgstr "Voir les adhésions validées..."
|
msgstr "Voir les adhésions validées…"
|
||||||
|
|
||||||
#: apps/wei/views.py:58
|
#: apps/wei/views.py:58
|
||||||
msgid "Search WEI"
|
msgid "Search WEI"
|
||||||
@ -3413,8 +3413,8 @@ msgid "Charte Info (FR)"
|
|||||||
msgstr "Charte Info (FR)"
|
msgstr "Charte Info (FR)"
|
||||||
|
|
||||||
#: note_kfet/templates/base_search.html:15
|
#: note_kfet/templates/base_search.html:15
|
||||||
msgid "Search by attribute such as name..."
|
msgid "Search by attribute such as name…"
|
||||||
msgstr "Chercher par un attribut tel que le nom..."
|
msgstr "Chercher par un attribut tel que le nom…"
|
||||||
|
|
||||||
#: note_kfet/templates/base_search.html:23
|
#: note_kfet/templates/base_search.html:23
|
||||||
msgid "There is no results."
|
msgid "There is no results."
|
||||||
|
@ -17,14 +17,6 @@ msgstr ""
|
|||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
#: apps/member/static/member/js/alias.js:17
|
|
||||||
msgid "Opener successfully added"
|
|
||||||
msgstr "Ouvreureuse ajouté avec succès"
|
|
||||||
|
|
||||||
#: apps/member/static/member/js/alias.js:17
|
|
||||||
msgid "Opener successfully deleted"
|
|
||||||
msgstr "Ouvreureuse supprimé avec succès"
|
|
||||||
|
|
||||||
#: apps/member/static/member/js/alias.js:17
|
#: apps/member/static/member/js/alias.js:17
|
||||||
msgid "Alias successfully added"
|
msgid "Alias successfully added"
|
||||||
msgstr "Alias ajouté avec succès"
|
msgstr "Alias ajouté avec succès"
|
||||||
|
@ -25,8 +25,8 @@ admin_site.register(Site, SiteAdmin)
|
|||||||
|
|
||||||
# Add external apps model
|
# Add external apps model
|
||||||
if "oauth2_provider" in settings.INSTALLED_APPS:
|
if "oauth2_provider" in settings.INSTALLED_APPS:
|
||||||
from oauth2_provider.admin import ApplicationAdmin, GrantAdmin, AccessTokenAdmin, RefreshTokenAdmin
|
from oauth2_provider.admin import Application, ApplicationAdmin, Grant, \
|
||||||
from oauth2_provider.models import Application, Grant, AccessToken, RefreshToken
|
GrantAdmin, AccessToken, AccessTokenAdmin, RefreshToken, RefreshTokenAdmin
|
||||||
admin_site.register(Application, ApplicationAdmin)
|
admin_site.register(Application, ApplicationAdmin)
|
||||||
admin_site.register(Grant, GrantAdmin)
|
admin_site.register(Grant, GrantAdmin)
|
||||||
admin_site.register(AccessToken, AccessTokenAdmin)
|
admin_site.register(AccessToken, AccessTokenAdmin)
|
||||||
|
@ -68,3 +68,264 @@ class ColorWidget(Widget):
|
|||||||
def value_from_datadict(self, data, files, name):
|
def value_from_datadict(self, data, files, name):
|
||||||
val = super().value_from_datadict(data, files, name)
|
val = super().value_from_datadict(data, files, name)
|
||||||
return int(val[1:], 16)
|
return int(val[1:], 16)
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
The remaining of this file comes from the project `django-bootstrap-datepicker-plus` available on Github:
|
||||||
|
https://github.com/monim67/django-bootstrap-datepicker-plus
|
||||||
|
This is distributed under Apache License 2.0.
|
||||||
|
|
||||||
|
This adds datetime pickers with bootstrap.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""Contains Base Date-Picker input class for widgets of this package."""
|
||||||
|
|
||||||
|
|
||||||
|
class DatePickerDictionary:
|
||||||
|
"""Keeps track of all date-picker input classes."""
|
||||||
|
|
||||||
|
_i = 0
|
||||||
|
items = dict()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def generate_id(cls):
|
||||||
|
"""Return a unique ID for each date-picker input class."""
|
||||||
|
cls._i += 1
|
||||||
|
return 'dp_%s' % cls._i
|
||||||
|
|
||||||
|
|
||||||
|
class BasePickerInput(DateTimeBaseInput):
|
||||||
|
"""Base Date-Picker input class for widgets of this package."""
|
||||||
|
|
||||||
|
template_name = 'bootstrap_datepicker_plus/date-picker.html'
|
||||||
|
picker_type = 'DATE'
|
||||||
|
format = '%Y-%m-%d'
|
||||||
|
config = {}
|
||||||
|
_default_config = {
|
||||||
|
'id': None,
|
||||||
|
'picker_type': None,
|
||||||
|
'linked_to': None,
|
||||||
|
'options': {} # final merged options
|
||||||
|
}
|
||||||
|
options = {} # options extended by user
|
||||||
|
options_param = {} # options passed as parameter
|
||||||
|
_default_options = {
|
||||||
|
'showClose': True,
|
||||||
|
'showClear': True,
|
||||||
|
'showTodayButton': True,
|
||||||
|
"locale": "fr",
|
||||||
|
}
|
||||||
|
|
||||||
|
# source: https://github.com/tutorcruncher/django-bootstrap3-datetimepicker
|
||||||
|
# file: /blob/31fbb09/bootstrap3_datetime/widgets.py#L33
|
||||||
|
format_map = (
|
||||||
|
('DDD', r'%j'),
|
||||||
|
('DD', r'%d'),
|
||||||
|
('MMMM', r'%B'),
|
||||||
|
('MMM', r'%b'),
|
||||||
|
('MM', r'%m'),
|
||||||
|
('YYYY', r'%Y'),
|
||||||
|
('YY', r'%y'),
|
||||||
|
('HH', r'%H'),
|
||||||
|
('hh', r'%I'),
|
||||||
|
('mm', r'%M'),
|
||||||
|
('ss', r'%S'),
|
||||||
|
('a', r'%p'),
|
||||||
|
('ZZ', r'%z'),
|
||||||
|
)
|
||||||
|
|
||||||
|
class Media:
|
||||||
|
"""JS/CSS resources needed to render the date-picker calendar."""
|
||||||
|
|
||||||
|
js = (
|
||||||
|
'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/'
|
||||||
|
'moment-with-locales.min.js',
|
||||||
|
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/'
|
||||||
|
'4.17.47/js/bootstrap-datetimepicker.min.js',
|
||||||
|
'bootstrap_datepicker_plus/js/datepicker-widget.js'
|
||||||
|
)
|
||||||
|
css = {'all': (
|
||||||
|
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/'
|
||||||
|
'4.17.47/css/bootstrap-datetimepicker.css',
|
||||||
|
'bootstrap_datepicker_plus/css/datepicker-widget.css'
|
||||||
|
), }
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def format_py2js(cls, datetime_format):
|
||||||
|
"""Convert python datetime format to moment datetime format."""
|
||||||
|
for js_format, py_format in cls.format_map:
|
||||||
|
datetime_format = datetime_format.replace(py_format, js_format)
|
||||||
|
return datetime_format
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def format_js2py(cls, datetime_format):
|
||||||
|
"""Convert moment datetime format to python datetime format."""
|
||||||
|
for js_format, py_format in cls.format_map:
|
||||||
|
datetime_format = datetime_format.replace(js_format, py_format)
|
||||||
|
return datetime_format
|
||||||
|
|
||||||
|
def __init__(self, attrs=None, format=None, options=None):
|
||||||
|
"""Initialize the Date-picker widget."""
|
||||||
|
self.format_param = format
|
||||||
|
self.options_param = options if options else {}
|
||||||
|
self.config = self._default_config.copy()
|
||||||
|
self.config['id'] = DatePickerDictionary.generate_id()
|
||||||
|
self.config['picker_type'] = self.picker_type
|
||||||
|
self.config['options'] = self._calculate_options()
|
||||||
|
attrs = attrs if attrs else {}
|
||||||
|
if 'class' not in attrs:
|
||||||
|
attrs['class'] = 'form-control'
|
||||||
|
super().__init__(attrs, self._calculate_format())
|
||||||
|
|
||||||
|
def _calculate_options(self):
|
||||||
|
"""Calculate and Return the options."""
|
||||||
|
_options = self._default_options.copy()
|
||||||
|
_options.update(self.options)
|
||||||
|
if self.options_param:
|
||||||
|
_options.update(self.options_param)
|
||||||
|
return _options
|
||||||
|
|
||||||
|
def _calculate_format(self):
|
||||||
|
"""Calculate and Return the datetime format."""
|
||||||
|
_format = self.format_param if self.format_param else self.format
|
||||||
|
if self.config['options'].get('format'):
|
||||||
|
_format = self.format_js2py(self.config['options'].get('format'))
|
||||||
|
else:
|
||||||
|
self.config['options']['format'] = self.format_py2js(_format)
|
||||||
|
return _format
|
||||||
|
|
||||||
|
def get_context(self, name, value, attrs):
|
||||||
|
"""Return widget context dictionary."""
|
||||||
|
context = super().get_context(
|
||||||
|
name, value, attrs)
|
||||||
|
context['widget']['attrs']['dp_config'] = json_dumps(self.config)
|
||||||
|
return context
|
||||||
|
|
||||||
|
def start_of(self, event_id):
|
||||||
|
"""
|
||||||
|
Set Date-Picker as the start-date of a date-range.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
- event_id (string): User-defined unique id for linking two fields
|
||||||
|
"""
|
||||||
|
DatePickerDictionary.items[str(event_id)] = self
|
||||||
|
return self
|
||||||
|
|
||||||
|
def end_of(self, event_id, import_options=True):
|
||||||
|
"""
|
||||||
|
Set Date-Picker as the end-date of a date-range.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
- event_id (string): User-defined unique id for linking two fields
|
||||||
|
- import_options (bool): inherit options from start-date input,
|
||||||
|
default: TRUE
|
||||||
|
"""
|
||||||
|
event_id = str(event_id)
|
||||||
|
if event_id in DatePickerDictionary.items:
|
||||||
|
linked_picker = DatePickerDictionary.items[event_id]
|
||||||
|
self.config['linked_to'] = linked_picker.config['id']
|
||||||
|
if import_options:
|
||||||
|
backup_moment_format = self.config['options']['format']
|
||||||
|
self.config['options'].update(linked_picker.config['options'])
|
||||||
|
self.config['options'].update(self.options_param)
|
||||||
|
if self.format_param or 'format' in self.options_param:
|
||||||
|
self.config['options']['format'] = backup_moment_format
|
||||||
|
else:
|
||||||
|
self.format = linked_picker.format
|
||||||
|
# Setting useCurrent is necessary, see following issue
|
||||||
|
# https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1075
|
||||||
|
self.config['options']['useCurrent'] = False
|
||||||
|
self._link_to(linked_picker)
|
||||||
|
else:
|
||||||
|
raise KeyError(
|
||||||
|
'start-date not specified for event_id "%s"' % event_id)
|
||||||
|
return self
|
||||||
|
|
||||||
|
def _link_to(self, linked_picker):
|
||||||
|
"""
|
||||||
|
Executed when two date-inputs are linked together.
|
||||||
|
|
||||||
|
This method for sub-classes to override to customize the linking.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class DatePickerInput(BasePickerInput):
|
||||||
|
"""
|
||||||
|
Widget to display a Date-Picker Calendar on a DateField property.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
- attrs (dict): HTML attributes of rendered HTML input
|
||||||
|
- format (string): Python DateTime format eg. "%Y-%m-%d"
|
||||||
|
- options (dict): Options to customize the widget, see README
|
||||||
|
"""
|
||||||
|
|
||||||
|
picker_type = 'DATE'
|
||||||
|
format = '%Y-%m-%d'
|
||||||
|
format_key = 'DATE_INPUT_FORMATS'
|
||||||
|
|
||||||
|
|
||||||
|
class TimePickerInput(BasePickerInput):
|
||||||
|
"""
|
||||||
|
Widget to display a Time-Picker Calendar on a TimeField property.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
- attrs (dict): HTML attributes of rendered HTML input
|
||||||
|
- format (string): Python DateTime format eg. "%Y-%m-%d"
|
||||||
|
- options (dict): Options to customize the widget, see README
|
||||||
|
"""
|
||||||
|
|
||||||
|
picker_type = 'TIME'
|
||||||
|
format = '%H:%M'
|
||||||
|
format_key = 'TIME_INPUT_FORMATS'
|
||||||
|
template_name = 'bootstrap_datepicker_plus/time_picker.html'
|
||||||
|
|
||||||
|
|
||||||
|
class DateTimePickerInput(BasePickerInput):
|
||||||
|
"""
|
||||||
|
Widget to display a DateTime-Picker Calendar on a DateTimeField property.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
- attrs (dict): HTML attributes of rendered HTML input
|
||||||
|
- format (string): Python DateTime format eg. "%Y-%m-%d"
|
||||||
|
- options (dict): Options to customize the widget, see README
|
||||||
|
"""
|
||||||
|
|
||||||
|
picker_type = 'DATETIME'
|
||||||
|
format = '%Y-%m-%d %H:%M'
|
||||||
|
format_key = 'DATETIME_INPUT_FORMATS'
|
||||||
|
|
||||||
|
|
||||||
|
class MonthPickerInput(BasePickerInput):
|
||||||
|
"""
|
||||||
|
Widget to display a Month-Picker Calendar on a DateField property.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
- attrs (dict): HTML attributes of rendered HTML input
|
||||||
|
- format (string): Python DateTime format eg. "%Y-%m-%d"
|
||||||
|
- options (dict): Options to customize the widget, see README
|
||||||
|
"""
|
||||||
|
|
||||||
|
picker_type = 'MONTH'
|
||||||
|
format = '01/%m/%Y'
|
||||||
|
format_key = 'DATE_INPUT_FORMATS'
|
||||||
|
|
||||||
|
|
||||||
|
class YearPickerInput(BasePickerInput):
|
||||||
|
"""
|
||||||
|
Widget to display a Year-Picker Calendar on a DateField property.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
- attrs (dict): HTML attributes of rendered HTML input
|
||||||
|
- format (string): Python DateTime format eg. "%Y-%m-%d"
|
||||||
|
- options (dict): Options to customize the widget, see README
|
||||||
|
"""
|
||||||
|
|
||||||
|
picker_type = 'YEAR'
|
||||||
|
format = '01/01/%Y'
|
||||||
|
format_key = 'DATE_INPUT_FORMATS'
|
||||||
|
|
||||||
|
def _link_to(self, linked_picker):
|
||||||
|
"""Customize the options when linked with other date-time input"""
|
||||||
|
yformat = self.config['options']['format'].replace('-01-01', '-12-31')
|
||||||
|
self.config['options']['format'] = yformat
|
||||||
|
@ -40,9 +40,8 @@ INSTALLED_APPS = [
|
|||||||
# External apps
|
# External apps
|
||||||
'bootstrap_datepicker_plus',
|
'bootstrap_datepicker_plus',
|
||||||
'colorfield',
|
'colorfield',
|
||||||
'crispy_bootstrap4',
|
|
||||||
'crispy_forms',
|
'crispy_forms',
|
||||||
# 'django_htcpcp_tea',
|
'django_htcpcp_tea',
|
||||||
'django_tables2',
|
'django_tables2',
|
||||||
'mailer',
|
'mailer',
|
||||||
'phonenumber_field',
|
'phonenumber_field',
|
||||||
@ -91,14 +90,12 @@ MIDDLEWARE = [
|
|||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
'django.middleware.locale.LocaleMiddleware',
|
'django.middleware.locale.LocaleMiddleware',
|
||||||
'django.contrib.sites.middleware.CurrentSiteMiddleware',
|
'django.contrib.sites.middleware.CurrentSiteMiddleware',
|
||||||
|
'django_htcpcp_tea.middleware.HTCPCPTeaMiddleware',
|
||||||
'note_kfet.middlewares.SessionMiddleware',
|
'note_kfet.middlewares.SessionMiddleware',
|
||||||
'note_kfet.middlewares.LoginByIPMiddleware',
|
'note_kfet.middlewares.LoginByIPMiddleware',
|
||||||
'note_kfet.middlewares.TurbolinksMiddleware',
|
'note_kfet.middlewares.TurbolinksMiddleware',
|
||||||
'note_kfet.middlewares.ClacksMiddleware',
|
'note_kfet.middlewares.ClacksMiddleware',
|
||||||
]
|
]
|
||||||
if "django_htcpcp_tea" in INSTALLED_APPS:
|
|
||||||
MIDDLEWARE.append('django_htcpcp_tea.middleware.HTCPCPTeaMiddleware')
|
|
||||||
|
|
||||||
|
|
||||||
ROOT_URLCONF = 'note_kfet.urls'
|
ROOT_URLCONF = 'note_kfet.urls'
|
||||||
|
|
||||||
@ -264,7 +261,6 @@ OAUTH2_PROVIDER = {
|
|||||||
'SCOPES_BACKEND_CLASS': 'permission.scopes.PermissionScopes',
|
'SCOPES_BACKEND_CLASS': 'permission.scopes.PermissionScopes',
|
||||||
'OAUTH2_VALIDATOR_CLASS': "permission.scopes.PermissionOAuth2Validator",
|
'OAUTH2_VALIDATOR_CLASS': "permission.scopes.PermissionOAuth2Validator",
|
||||||
'REFRESH_TOKEN_EXPIRE_SECONDS': timedelta(days=14),
|
'REFRESH_TOKEN_EXPIRE_SECONDS': timedelta(days=14),
|
||||||
'PKCE_REQUIRED': False, # PKCE (fix a breaking change of django-oauth-toolkit 2.0.0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Take control on how widget templates are sourced
|
# Take control on how widget templates are sourced
|
||||||
@ -278,7 +274,6 @@ LOGIN_REDIRECT_URL = '/'
|
|||||||
SESSION_COOKIE_AGE = 60 * 60 * 3
|
SESSION_COOKIE_AGE = 60 * 60 * 3
|
||||||
|
|
||||||
# Use Crispy Bootstrap4 theme
|
# Use Crispy Bootstrap4 theme
|
||||||
CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap4'
|
|
||||||
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||||
|
|
||||||
# Use Django Table2 Bootstrap4 theme
|
# Use Django Table2 Bootstrap4 theme
|
||||||
@ -300,6 +295,3 @@ PHONENUMBER_DEFAULT_REGION = 'FR'
|
|||||||
|
|
||||||
# We add custom information to CAS, in order to give a normalized name to other services
|
# We add custom information to CAS, in order to give a normalized name to other services
|
||||||
CAS_AUTH_CLASS = 'member.auth.CustomAuthUser'
|
CAS_AUTH_CLASS = 'member.auth.CustomAuthUser'
|
||||||
|
|
||||||
# Default field for primary key
|
|
||||||
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
|
|
||||||
|
@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
{% if widget.value != None and widget.value != "" %}value="{{ widget.value }}"{% endif %}
|
{% if widget.value != None and widget.value != "" %}value="{{ widget.value }}"{% endif %}
|
||||||
name="{{ widget.name }}_name" autocomplete="off"
|
name="{{ widget.name }}_name" autocomplete="off"
|
||||||
{% for name, value in widget.attrs.items %}
|
{% for name, value in widget.attrs.items %}
|
||||||
{% if value is not False %}{{ name }}{% if value is not True %}="{{ value|stringformat:'s' }}"{% endif %}{% endif %}
|
{% ifnotequal value False %}{{ name }}{% ifnotequal value True %}="{{ value|stringformat:'s' }}"{% endifnotequal %}{% endifnotequal %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
aria-describedby="{{widget.attrs.id}}_tooltip">
|
aria-describedby="{{widget.attrs.id}}_tooltip">
|
||||||
{% if widget.resetable %}
|
{% if widget.resetable %}
|
||||||
|
@ -12,7 +12,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
</h3>
|
</h3>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<input id="searchbar" type="text" class="form-control"
|
<input id="searchbar" type="text" class="form-control"
|
||||||
placeholder="{% trans "Search by attribute such as name..." %}">
|
placeholder="{% trans "Search by attribute such as name…" %}">
|
||||||
</div>
|
</div>
|
||||||
<div id="dynamic-table">
|
<div id="dynamic-table">
|
||||||
{% if table.data %}
|
{% if table.data %}
|
||||||
|
@ -30,6 +30,9 @@ urlpatterns = [
|
|||||||
path('accounts/', include('django.contrib.auth.urls')),
|
path('accounts/', include('django.contrib.auth.urls')),
|
||||||
path('api/', include('api.urls')),
|
path('api/', include('api.urls')),
|
||||||
path('permission/', include('permission.urls')),
|
path('permission/', include('permission.urls')),
|
||||||
|
|
||||||
|
# Make coffee
|
||||||
|
path('coffee/', include('django_htcpcp_tea.urls')),
|
||||||
]
|
]
|
||||||
|
|
||||||
# During development, serve static and media files
|
# During development, serve static and media files
|
||||||
@ -54,11 +57,6 @@ if "debug_toolbar" in settings.INSTALLED_APPS:
|
|||||||
path('__debug__/', include(debug_toolbar.urls)),
|
path('__debug__/', include(debug_toolbar.urls)),
|
||||||
] + urlpatterns
|
] + urlpatterns
|
||||||
|
|
||||||
if "django_htcpcp_tea" in settings.INSTALLED_APPS:
|
|
||||||
# Make coffee
|
|
||||||
urlpatterns.append(
|
|
||||||
path('coffee/', include('django_htcpcp_tea.urls'))
|
|
||||||
)
|
|
||||||
|
|
||||||
handler400 = bad_request
|
handler400 = bad_request
|
||||||
handler403 = permission_denied
|
handler403 = permission_denied
|
||||||
|
@ -1,20 +1,19 @@
|
|||||||
beautifulsoup4~=4.12.3
|
beautifulsoup4~=4.7.1
|
||||||
crispy-bootstrap4~=2023.1
|
Django~=2.2.15
|
||||||
Django~=4.2.9
|
django-bootstrap-datepicker-plus~=3.0.5
|
||||||
django-bootstrap-datepicker-plus~=5.0.5
|
django-cas-server~=1.2.0
|
||||||
#django-cas-server~=2.0.0
|
django-colorfield~=0.3.2
|
||||||
django-colorfield~=0.11.0
|
django-crispy-forms~=1.7.2
|
||||||
django-crispy-forms~=2.1.0
|
django-extensions>=2.1.4
|
||||||
django-extensions>=3.2.3
|
django-filter~=2.1
|
||||||
django-filter~=23.5
|
django-htcpcp-tea~=0.3.1
|
||||||
#django-htcpcp-tea~=0.8.1
|
django-mailer~=2.0.1
|
||||||
django-mailer~=2.3.1
|
django-oauth-toolkit~=1.3.3
|
||||||
django-oauth-toolkit~=2.3.0
|
django-phonenumber-field~=5.0.0
|
||||||
django-phonenumber-field~=7.3.0
|
django-polymorphic>=2.0.3,<3.0.0
|
||||||
django-polymorphic~=3.1.0
|
djangorestframework>=3.9.0,<3.13.0
|
||||||
djangorestframework~=3.14.0
|
django-rest-polymorphic~=0.1.9
|
||||||
django-rest-polymorphic~=0.1.10
|
django-tables2~=2.3.1
|
||||||
django-tables2~=2.7.0
|
python-memcached~=1.59
|
||||||
python-memcached~=1.62
|
phonenumbers~=8.9.10
|
||||||
phonenumbers~=8.13.28
|
Pillow>=5.4.1
|
||||||
Pillow>=10.2.0
|
|
||||||
|
14
tox.ini
14
tox.ini
@ -1,13 +1,13 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
|
# Debian Buster Python
|
||||||
|
py37-django22
|
||||||
|
|
||||||
|
# Ubuntu 20.04 Python
|
||||||
|
py38-django22
|
||||||
|
|
||||||
# Debian Bullseye Python
|
# Debian Bullseye Python
|
||||||
py39-django42
|
py39-django22
|
||||||
|
|
||||||
# Ubuntu 22.04 Python
|
|
||||||
py310-django42
|
|
||||||
|
|
||||||
# Debian Bookworm Python
|
|
||||||
py311-django42
|
|
||||||
|
|
||||||
linters
|
linters
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
Reference in New Issue
Block a user