mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
Minimal working version
* Upgrade dependencies * Fix ugettext * Fix bad urls
This commit is contained in:
parent
dee24fbc9c
commit
98bfc308a7
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,7 +5,6 @@ db.sqlite3
|
||||
*__pycache__*
|
||||
.DS_Store
|
||||
pyrightconfig.json
|
||||
poetry.lock
|
||||
dist/
|
||||
.vscode/
|
||||
env/
|
||||
|
@ -27,7 +27,7 @@ from django.core.exceptions import ValidationError
|
||||
from django.core import validators
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.template import defaultfilters
|
||||
|
||||
from phonenumber_field.modelfields import PhoneNumberField
|
||||
|
@ -25,7 +25,7 @@
|
||||
from django.views.generic import ListView, DetailView
|
||||
from django.views.generic.edit import UpdateView, CreateView, DeleteView, FormView
|
||||
from django.urls import reverse_lazy, reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.forms.models import modelform_factory
|
||||
from django.core.exceptions import PermissionDenied, ValidationError
|
||||
from django.forms import HiddenInput
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from django.conf import settings
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from ajax_select.fields import AutoCompleteSelectField, AutoCompleteSelectMultipleField
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
from django.db import models
|
||||
from django.core import validators
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.exceptions import ValidationError, ObjectDoesNotExist
|
||||
from django.db import transaction
|
||||
from django.urls import reverse
|
||||
|
@ -25,7 +25,7 @@
|
||||
from django.conf import settings
|
||||
from django.test import TestCase
|
||||
from django.utils import timezone, html
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
from django.urls import reverse
|
||||
from django.core.management import call_command
|
||||
from django.core.exceptions import ValidationError, NON_FIELD_ERRORS
|
||||
|
@ -39,8 +39,8 @@ from django.http import (
|
||||
)
|
||||
from django.urls import reverse, reverse_lazy
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ugettext as _t
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import gettext as _t
|
||||
from django.core.exceptions import PermissionDenied, ValidationError, NON_FIELD_ERRORS
|
||||
from django.core.paginator import Paginator, InvalidPage
|
||||
from django.shortcuts import get_object_or_404, redirect
|
||||
|
@ -26,11 +26,11 @@
|
||||
from django.shortcuts import render
|
||||
from django.db import models, transaction
|
||||
from django.db.models import Q
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils import timezone
|
||||
from django.urls import reverse
|
||||
from django.conf import settings
|
||||
from django.contrib.staticfiles.templatetags.staticfiles import static
|
||||
from django.templatetags.static import static
|
||||
from django.core.mail import EmailMultiAlternatives
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
|
@ -27,7 +27,7 @@ from django.conf import settings
|
||||
from django.urls import reverse
|
||||
from django.core.management import call_command
|
||||
from django.utils import html
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
|
||||
from core.models import User, RealGroup
|
||||
|
@ -28,7 +28,7 @@ from django.http import HttpResponseRedirect
|
||||
from django.views.generic import ListView, DetailView, View
|
||||
from django.views.generic.edit import UpdateView, CreateView, DeleteView
|
||||
from django.views.generic.detail import SingleObjectMixin
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.urls import reverse, reverse_lazy
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.utils import timezone
|
||||
|
@ -21,5 +21,3 @@
|
||||
# Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
#
|
||||
|
||||
default_app_config = "core.apps.SithConfig"
|
||||
|
@ -34,7 +34,7 @@ from django.contrib.auth.models import (
|
||||
GroupManager as AuthGroupManager,
|
||||
AnonymousUser as AuthAnonymousUser,
|
||||
)
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils import timezone
|
||||
from django.core import validators
|
||||
from django.core.exceptions import ValidationError, PermissionDenied
|
||||
|
@ -25,9 +25,9 @@
|
||||
|
||||
import os
|
||||
import sass
|
||||
from urllib.parse import urljoin
|
||||
from django.utils.encoding import force_bytes, iri_to_uri
|
||||
from django.core.files.base import ContentFile
|
||||
from django.utils.six.moves.urllib.parse import urljoin
|
||||
from django.templatetags.static import static
|
||||
from django.conf import settings
|
||||
from core.scss.storage import ScssFileStorage, find_file
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
from django.urls import re_path
|
||||
from django.urls import re_path, path
|
||||
|
||||
from core.views import *
|
||||
|
||||
@ -60,8 +60,8 @@ urlpatterns = [
|
||||
SithPasswordResetDoneView.as_view(),
|
||||
name="password_reset_done",
|
||||
),
|
||||
re_path(
|
||||
r"^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$",
|
||||
path(
|
||||
r"reset/<str:uidb64>/<str:token>/",
|
||||
SithPasswordResetConfirmView.as_view(),
|
||||
name="password_reset_confirm",
|
||||
),
|
||||
|
@ -29,7 +29,7 @@ from django.views.generic.edit import UpdateView, FormMixin, DeleteView
|
||||
from django.views.generic.detail import SingleObjectMixin
|
||||
from django.forms.models import modelform_factory
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.http import HttpResponse
|
||||
from wsgiref.util import FileWrapper
|
||||
from django.urls import reverse
|
||||
@ -147,7 +147,7 @@ class FileListView(ListView):
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs = super(FileListView, self).get_context_data(**kwargs)
|
||||
kwargs["popup"] = ""
|
||||
if self.kwargs["popup"]:
|
||||
if self.kwargs.get("popup") is not None:
|
||||
kwargs["popup"] = "popup"
|
||||
return kwargs
|
||||
|
||||
@ -165,7 +165,7 @@ class FileEditView(CanEditMixin, UpdateView):
|
||||
return modelform_factory(SithFile, fields=fields)
|
||||
|
||||
def get_success_url(self):
|
||||
if self.kwargs["popup"]:
|
||||
if self.kwargs.get("popup") is not None:
|
||||
return reverse(
|
||||
"core:file_detail", kwargs={"file_id": self.object.id, "popup": "popup"}
|
||||
)
|
||||
@ -176,7 +176,7 @@ class FileEditView(CanEditMixin, UpdateView):
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs = super(FileEditView, self).get_context_data(**kwargs)
|
||||
kwargs["popup"] = ""
|
||||
if self.kwargs["popup"]:
|
||||
if self.kwargs.get("popup") is not None:
|
||||
kwargs["popup"] = "popup"
|
||||
return kwargs
|
||||
|
||||
@ -217,13 +217,13 @@ class FileEditPropView(CanEditPropMixin, UpdateView):
|
||||
def get_success_url(self):
|
||||
return reverse(
|
||||
"core:file_detail",
|
||||
kwargs={"file_id": self.object.id, "popup": self.kwargs["popup"] or ""},
|
||||
kwargs={"file_id": self.object.id, "popup": self.kwargs.get("popup", "")},
|
||||
)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs = super(FileEditPropView, self).get_context_data(**kwargs)
|
||||
kwargs["popup"] = ""
|
||||
if self.kwargs["popup"]:
|
||||
if self.kwargs.get("popup") is not None:
|
||||
kwargs["popup"] = "popup"
|
||||
return kwargs
|
||||
|
||||
@ -301,14 +301,14 @@ class FileView(CanViewMixin, DetailView, FormMixin):
|
||||
def get_success_url(self):
|
||||
return reverse(
|
||||
"core:file_detail",
|
||||
kwargs={"file_id": self.object.id, "popup": self.kwargs["popup"] or ""},
|
||||
kwargs={"file_id": self.object.id, "popup": self.kwargs.get("popup", "")},
|
||||
)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs = super(FileView, self).get_context_data(**kwargs)
|
||||
kwargs["popup"] = ""
|
||||
kwargs["form"] = self.form
|
||||
if self.kwargs["popup"]:
|
||||
if self.kwargs.get("popup") is not None:
|
||||
kwargs["popup"] = "popup"
|
||||
kwargs["clipboard"] = SithFile.objects.filter(
|
||||
id__in=self.request.session["clipboard"]
|
||||
@ -328,20 +328,20 @@ class FileDeleteView(CanEditPropMixin, DeleteView):
|
||||
return self.request.GET["next"]
|
||||
if self.object.parent is None:
|
||||
return reverse(
|
||||
"core:file_list", kwargs={"popup": self.kwargs["popup"] or ""}
|
||||
"core:file_list", kwargs={"popup": self.kwargs.get("popup", "")}
|
||||
)
|
||||
return reverse(
|
||||
"core:file_detail",
|
||||
kwargs={
|
||||
"file_id": self.object.parent.id,
|
||||
"popup": self.kwargs["popup"] or "",
|
||||
"popup": self.kwargs.get("popup", ""),
|
||||
},
|
||||
)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs = super(FileDeleteView, self).get_context_data(**kwargs)
|
||||
kwargs["popup"] = ""
|
||||
if self.kwargs["popup"]:
|
||||
if self.kwargs.get("popup") is not None:
|
||||
kwargs["popup"] = "popup"
|
||||
return kwargs
|
||||
|
||||
|
@ -37,8 +37,8 @@ from django.forms import (
|
||||
DateTimeInput,
|
||||
Textarea,
|
||||
)
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ugettext
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import gettext
|
||||
from phonenumber_field.widgets import PhoneNumberInternationalFallbackWidget
|
||||
from ajax_select.fields import AutoCompleteSelectField
|
||||
from ajax_select import make_ajax_field
|
||||
@ -118,19 +118,16 @@ class SelectFile(TextInput):
|
||||
attrs["class"] = "select_file"
|
||||
else:
|
||||
attrs = {"class": "select_file"}
|
||||
output = (
|
||||
'%(content)s<div name="%(name)s" class="choose_file_widget" title="%(title)s"></div>'
|
||||
% {
|
||||
output = '%(content)s<div name="%(name)s" class="choose_file_widget" title="%(title)s"></div>' % {
|
||||
"content": super(SelectFile, self).render(name, value, attrs, renderer),
|
||||
"title": _("Choose file"),
|
||||
"name": name,
|
||||
}
|
||||
)
|
||||
output += (
|
||||
'<span name="'
|
||||
+ name
|
||||
+ '" class="choose_file_button">'
|
||||
+ ugettext("Choose file")
|
||||
+ gettext("Choose file")
|
||||
+ "</span>"
|
||||
)
|
||||
return output
|
||||
@ -142,19 +139,16 @@ class SelectUser(TextInput):
|
||||
attrs["class"] = "select_user"
|
||||
else:
|
||||
attrs = {"class": "select_user"}
|
||||
output = (
|
||||
'%(content)s<div name="%(name)s" class="choose_user_widget" title="%(title)s"></div>'
|
||||
% {
|
||||
output = '%(content)s<div name="%(name)s" class="choose_user_widget" title="%(title)s"></div>' % {
|
||||
"content": super(SelectUser, self).render(name, value, attrs, renderer),
|
||||
"title": _("Choose user"),
|
||||
"name": name,
|
||||
}
|
||||
)
|
||||
output += (
|
||||
'<span name="'
|
||||
+ name
|
||||
+ '" class="choose_user_button">'
|
||||
+ ugettext("Choose user")
|
||||
+ gettext("Choose user")
|
||||
+ "</span>"
|
||||
)
|
||||
return output
|
||||
|
@ -31,7 +31,7 @@ from django.views.generic import ListView
|
||||
from django.views.generic.edit import FormView
|
||||
from django.urls import reverse_lazy
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django import forms
|
||||
|
||||
from ajax_select.fields import AutoCompleteSelectMultipleField
|
||||
|
@ -27,7 +27,7 @@
|
||||
from django.shortcuts import render, redirect, get_object_or_404
|
||||
from django.contrib.auth import views
|
||||
from django.contrib.auth.forms import PasswordChangeForm
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
from django.urls import reverse
|
||||
from django.core.exceptions import PermissionDenied, ValidationError
|
||||
from django.http import Http404, HttpResponse
|
||||
|
@ -22,5 +22,3 @@
|
||||
# Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
#
|
||||
|
||||
default_app_config = "counter.app.CounterConfig"
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class CounterConfig(AppConfig):
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.db import migrations, models
|
||||
from django.conf import settings
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
from sith.settings import SITH_COUNTER_OFFICES, SITH_MAIN_CLUB
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils import timezone
|
||||
from django.conf import settings
|
||||
from django.urls import reverse
|
||||
|
@ -41,7 +41,7 @@ from django.urls import reverse_lazy, reverse
|
||||
from django.http import HttpResponseRedirect, HttpResponse, JsonResponse
|
||||
from django.utils import timezone
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.conf import settings
|
||||
from django.db import DataError, transaction, models
|
||||
|
||||
|
@ -12,7 +12,7 @@ Pour modifier les cotisations disponnibles, tout se gère dans la configuration
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
SITH_SUBSCRIPTIONS = {
|
||||
# Voici un échantillon de la véritable configuration à l'heure de l'écriture.
|
||||
|
@ -20,7 +20,7 @@ Nous allons présenter ici les deux techniques. Dans un premier temps nous allon
|
||||
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from core.views import *
|
||||
from core.models import User, Group
|
||||
@ -63,7 +63,7 @@ Voici maintenant comment faire en définissant des fonctions personnalisées. Ce
|
||||
.. code-block:: python
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from core.views import *
|
||||
from core.models import User, Group
|
||||
|
@ -14,7 +14,7 @@ Si le mot est dans le code Python :
|
||||
|
||||
.. sourcecode:: python
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# ...
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
from django.db import models, DataError
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.functional import cached_property
|
||||
from django.conf import settings
|
||||
|
||||
|
@ -33,7 +33,7 @@ from django.views.generic import TemplateView, View
|
||||
from django.http import HttpResponse, HttpResponseRedirect
|
||||
from django.core.exceptions import SuspiciousOperation
|
||||
from django.db import transaction, DataError
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
from django.conf import settings
|
||||
|
||||
from counter.models import Customer, Counter, ProductType, Selling
|
||||
|
@ -1,6 +1,6 @@
|
||||
from django.db import models
|
||||
from ordered_model.models import OrderedModel
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils import timezone
|
||||
|
||||
from core.models import User, Group
|
||||
|
@ -3,7 +3,7 @@ from django.views.generic import ListView, DetailView
|
||||
from django.views.generic.edit import UpdateView, CreateView
|
||||
from django.views.generic.edit import DeleteView, FormView
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.db import transaction
|
||||
from django.forms import CheckboxSelectMultiple
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
|
@ -27,7 +27,7 @@ from django.shortcuts import get_object_or_404
|
||||
from django.views.generic import ListView, DetailView, RedirectView
|
||||
from django.views.generic.edit import UpdateView, CreateView, DeleteView
|
||||
from django.views.generic.detail import SingleObjectMixin
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils import timezone, html
|
||||
from django.conf import settings
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
from django.db import models, DataError
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.conf import settings
|
||||
from django.urls import reverse
|
||||
|
||||
|
@ -28,7 +28,7 @@ import pytz
|
||||
|
||||
from django.views.generic import ListView, DetailView, TemplateView
|
||||
from django.views.generic.edit import UpdateView, CreateView, DeleteView, BaseFormView
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
from django.utils import dateparse, timezone
|
||||
from django.urls import reverse_lazy
|
||||
from django.conf import settings
|
||||
|
@ -26,7 +26,7 @@ from enum import Enum
|
||||
|
||||
from django.views.generic import ListView, View
|
||||
from django.views.generic.edit import FormView
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.generic.detail import SingleObjectMixin
|
||||
from django.http.response import HttpResponseRedirect
|
||||
from django.urls import reverse
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.forms.widgets import Widget
|
||||
from django.templatetags.static import static
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils import timezone
|
||||
from django.core import validators
|
||||
from django.conf import settings
|
||||
|
@ -25,7 +25,7 @@
|
||||
from django.conf import settings
|
||||
from django.test import TestCase
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.management import call_command
|
||||
|
||||
from core.models import User, Notification
|
||||
|
1370
poetry.lock
generated
Normal file
1370
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -20,29 +20,29 @@ license = "GPL-3.0-only"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.8"
|
||||
Django = "^2.2"
|
||||
Django = "^3.2"
|
||||
Pillow = "^8.3.2"
|
||||
mistune = "^0.8.4"
|
||||
django-jinja = "^2.9.1"
|
||||
django-jinja = "^2.10"
|
||||
cryptography = "36.0.2"
|
||||
pyOpenSSL = "^21.0.0"
|
||||
pytz = "^2021.1"
|
||||
djangorestframework = "^3.12.4"
|
||||
djangorestframework = "^3.13"
|
||||
django-phonenumber-field = "^5.2.0"
|
||||
phonenumbers = "^8.12.33"
|
||||
django-ajax-selects = "^2.1.0"
|
||||
reportlab = "^3.6.1"
|
||||
django-haystack = "^3.1.1"
|
||||
xapian-haystack = "^2.1.1"
|
||||
django-haystack = "^3.2.1"
|
||||
xapian-haystack = "^3.0.1"
|
||||
xapian-bindings = "^0.1.0"
|
||||
libsass = "^0.21.0"
|
||||
django-ordered-model = "^3.4.3"
|
||||
django-simple-captcha = "^0.5.14"
|
||||
python-dateutil = "^2.8.2"
|
||||
psycopg2-binary = "2.8.6"
|
||||
psycopg2-binary = "2.9.3"
|
||||
sentry-sdk = "^1.4.3"
|
||||
pygraphviz = "^1.9"
|
||||
Jinja2 = "<=3.0.3"
|
||||
Jinja2 = "^3.1"
|
||||
|
||||
# Extra optional dependencies
|
||||
mysqlclient = { version = "^2.0.3", optional = true }
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic.edit import FormView
|
||||
from django.views.generic import ListView
|
||||
from django.urls import reverse
|
||||
|
@ -26,7 +26,7 @@ from django.db import models
|
||||
from django.urls import reverse
|
||||
from django.core.cache import cache
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils import timezone
|
||||
|
||||
from PIL import Image
|
||||
|
@ -28,7 +28,7 @@ from django.urls import reverse_lazy, reverse
|
||||
from core.views.forms import SelectDate
|
||||
from django.views.generic import DetailView, TemplateView
|
||||
from django.views.generic.edit import UpdateView, FormMixin, FormView
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.conf import settings
|
||||
from django import forms
|
||||
from django.core.exceptions import PermissionDenied
|
||||
|
@ -41,7 +41,7 @@ import sys
|
||||
import binascii
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.django import DjangoIntegration
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
@ -132,9 +132,7 @@ TEMPLATES = [
|
||||
"extensions": [
|
||||
"jinja2.ext.do",
|
||||
"jinja2.ext.loopcontrols",
|
||||
"jinja2.ext.with_",
|
||||
"jinja2.ext.i18n",
|
||||
"jinja2.ext.autoescape",
|
||||
"django_jinja.builtins.extensions.CsrfExtension",
|
||||
"django_jinja.builtins.extensions.CacheExtension",
|
||||
"django_jinja.builtins.extensions.TimezoneExtension",
|
||||
|
62
sith/urls.py
62
sith/urls.py
@ -37,13 +37,15 @@ Including another URLconf
|
||||
1. Add an import: from blog import urls as blog_urls
|
||||
2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls))
|
||||
"""
|
||||
from django.urls import include, re_path
|
||||
from django.urls import include, path
|
||||
from django.contrib import admin
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.views.i18n import JavaScriptCatalog
|
||||
from ajax_select import urls as ajax_select_urls
|
||||
|
||||
import core.urls
|
||||
|
||||
js_info_dict = {"packages": ("sith",)}
|
||||
|
||||
handler403 = "core.views.forbidden"
|
||||
@ -51,43 +53,37 @@ handler404 = "core.views.not_found"
|
||||
handler500 = "core.views.internal_servor_error"
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r"^", include(("core.urls", "core"), namespace="core")),
|
||||
re_path(
|
||||
r"^rootplace/", include(("rootplace.urls", "rootplace"), namespace="rootplace")
|
||||
),
|
||||
re_path(
|
||||
r"^subscription/",
|
||||
path("", include(("core.urls", "core"), namespace="core")),
|
||||
path("rootplace/", include(("rootplace.urls", "rootplace"), namespace="rootplace")),
|
||||
path(
|
||||
"subscription/",
|
||||
include(("subscription.urls", "subscription"), namespace="subscription"),
|
||||
),
|
||||
re_path(r"^com/", include(("com.urls", "com"), namespace="com")),
|
||||
re_path(r"^club/", include(("club.urls", "club"), namespace="club")),
|
||||
re_path(r"^counter/", include(("counter.urls", "counter"), namespace="counter")),
|
||||
re_path(r"^stock/", include(("stock.urls", "stock"), namespace="stock")),
|
||||
re_path(
|
||||
r"^accounting/",
|
||||
path("com/", include(("com.urls", "com"), namespace="com")),
|
||||
path("club/", include(("club.urls", "club"), namespace="club")),
|
||||
path("counter/", include(("counter.urls", "counter"), namespace="counter")),
|
||||
path("stock/", include(("stock.urls", "stock"), namespace="stock")),
|
||||
path(
|
||||
"accounting/",
|
||||
include(("accounting.urls", "accounting"), namespace="accounting"),
|
||||
),
|
||||
re_path(r"^eboutic/", include(("eboutic.urls", "eboutic"), namespace="eboutic")),
|
||||
re_path(
|
||||
r"^launderette/",
|
||||
path("eboutic/", include(("eboutic.urls", "eboutic"), namespace="eboutic")),
|
||||
path(
|
||||
"launderette/",
|
||||
include(("launderette.urls", "launderette"), namespace="launderette"),
|
||||
),
|
||||
re_path(r"^sas/", include(("sas.urls", "sas"), namespace="sas")),
|
||||
re_path(r"^api/v1/", include(("api.urls", "api"), namespace="api")),
|
||||
re_path(
|
||||
r"^election/", include(("election.urls", "election"), namespace="election")
|
||||
),
|
||||
re_path(r"^forum/", include(("forum.urls", "forum"), namespace="forum")),
|
||||
re_path(r"^trombi/", include(("trombi.urls", "trombi"), namespace="trombi")),
|
||||
re_path(r"^matmatronch/", include(("matmat.urls", "matmat"), namespace="matmat")),
|
||||
re_path(
|
||||
r"^pedagogy/", include(("pedagogy.urls", "pedagogy"), namespace="pedagogy")
|
||||
),
|
||||
re_path(r"^admin/", admin.site.urls),
|
||||
re_path(r"^ajax_select/", include(ajax_select_urls)),
|
||||
re_path(r"^i18n/", include("django.conf.urls.i18n")),
|
||||
re_path(r"^jsi18n/$", JavaScriptCatalog.as_view(), name="javascript-catalog"),
|
||||
re_path(r"^captcha/", include("captcha.urls")),
|
||||
path("sas/", include(("sas.urls", "sas"), namespace="sas")),
|
||||
path("api/v1/", include(("api.urls", "api"), namespace="api")),
|
||||
path("election/", include(("election.urls", "election"), namespace="election")),
|
||||
path("forum/", include(("forum.urls", "forum"), namespace="forum")),
|
||||
path("trombi/", include(("trombi.urls", "trombi"), namespace="trombi")),
|
||||
path("matmatronch/", include(("matmat.urls", "matmat"), namespace="matmat")),
|
||||
path("pedagogy/", include(("pedagogy.urls", "pedagogy"), namespace="pedagogy")),
|
||||
path("admin/", admin.site.urls),
|
||||
path("ajax_select/", include(ajax_select_urls)),
|
||||
path("i18n/", include("django.conf.urls.i18n")),
|
||||
path("jsi18n/$", JavaScriptCatalog.as_view(), name="javascript-catalog"),
|
||||
path("captcha/", include("captcha.urls")),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
@ -95,4 +91,4 @@ if settings.DEBUG:
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
import debug_toolbar
|
||||
|
||||
urlpatterns += [re_path(r"^__debug__/", include(debug_toolbar.urls))]
|
||||
urlpatterns += [path("__debug__/", include(debug_toolbar.urls))]
|
||||
|
@ -24,7 +24,7 @@
|
||||
#
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.urls import reverse
|
||||
from django.conf import settings
|
||||
|
||||
|
@ -37,7 +37,7 @@ from django.views.generic.edit import (
|
||||
FormMixin,
|
||||
BaseFormView,
|
||||
)
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django import forms
|
||||
from django.http import HttpResponseRedirect, HttpResponse
|
||||
from django.forms.models import modelform_factory
|
||||
|
@ -25,7 +25,7 @@
|
||||
from datetime import date, timedelta
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.urls import reverse
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
from django.views.generic.edit import CreateView, FormView
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.exceptions import PermissionDenied, ValidationError
|
||||
from django.urls import reverse_lazy
|
||||
from django import forms
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.urls import reverse
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ValidationError
|
||||
|
@ -28,7 +28,7 @@ from django.shortcuts import get_object_or_404, redirect
|
||||
from django.urls import reverse_lazy, reverse
|
||||
from django.views.generic import DetailView, RedirectView, TemplateView, View
|
||||
from django.views.generic.edit import UpdateView, CreateView, DeleteView
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.forms.models import modelform_factory
|
||||
|
Loading…
Reference in New Issue
Block a user