-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pod v4 MAIN #1229
base: main
Are you sure you want to change the base?
Pod v4 MAIN #1229
Conversation
* Upgrade securtity dependances * Remove deprecated django-tagging * Add new django-tagulous * Elasticsearch default version is Now 8 (remove compatibility with ES 6) * Replace deprecated ugettext_lazy by gettext_lazy * Add some temporary deprecations Hacks for cas-client & Chunked-upload * Replace deprecated url() by re_path() * Disable all Pods apps by default * Correct error handling for ElasticSearch
# Conflicts: # pod/settings.py
* Replace some re_path() by path() * Replace remaining ugettext by gettext * Replace admin.site.register() call by @admin.register decorator * Replace HTTP_X_REQUESTED_WITH by `headers={"x-requested-with"` * Replace request.META by headers * Replace `assertQuerysetEqual` by `assertQuerySetEqual` * Replace force_text by force_str * Remove default_app_config in __init__.py
…select2 CSS calls) * Correct Enrichment form validation process
* Replace Django 3.2 by 4.2 in all links
# Conflicts: # pod/settings.py
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ionalError: database table is locked"
Correct CVE-2024-56374: Potential denial-of-service vulnerability in IPv6 validation
# Conflicts: # .env.dev-exemple # dockerfile-dev-with-volumes/README.adoc # pod/main/test_settings.py # pod/video/models.py # pod/video/utils.py # requirements.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bravo ! Vraiment, super boulot !
Pour ma part, j'ai bien compris les changements suivants :
- remplacement ugettext_lazy par gettext_lazy,
- remplacement urls par re_path
- remplacement force_text par force_str
- remplacement tagging par tagulous.models
- remplacement pour les asserts (ex: assertNotEquals par assertNotEqual)
- remplacement pour les requêtes AJAX, is_ajax(request)
- remplacement CKEditor
- les valeurs par défaut à False maintenant
- la gestion des header (referer, x-requested...)
- la gestion des @admin.register
- la modification vis-à-vis de la qualité du code (paramètres, espaces, refactor...)
- le script de réindexation ES des videos
- les modifications vis-à-vis d'Elasticsearch
- le fait de supprimer le deprecated USE_L10N
Par contre, je n'ai pas compris les modifications vis-à-vis de :
- Typing,
- la suppresion des short_description
- les modifications vis-à-vis de CustomFileModel
Par quoi ces dernières modifications se traduisent ?
Merci ;)
As-tu un exemple ? J'ai fait cette PR l'an dernier et j'ai une toute petite mémoire ^^.
As-tu des exemples pour me rafraichir la mémoire ? (n'hésites-pas à commenter directement dans les lignes de code sur Github) |
def clickable_email(self, obj): | ||
email = obj.email | ||
return format_html('<a href="mailto:{}">{}</a>', email, email) | ||
|
||
clickable_email.allow_tags = True | ||
clickable_email.short_description = _("Email") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai trouvé ! En fait les short_description
sont remplacés par un tag @admin.display(description=_("xxx"))
(cf authentication/admin.py)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci pour l'explication
Ah oui, je crois me rappeler que j'ai simplement mis "en pause" les CustomFileModel, car ils ne fonctionnent pas encore avec Pod V4. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, pour Le coup du typing, il a juste été supprimé ici car inutile dans ce fichier; mais il est toujours appelé ailleurs.
EN fait, j'avais peur qu'il y ait eu des modifications en lien avec Django 4, ce qui n'est pas le cas; donc nickel. Merci
This PR is here to compare changes mades from Pod V3 DEV to Pod V4.
Summary of changes:
Detailed changes:
USE_L10N
deprecated paramre_path()
bypath()
ugettext
bygettext
admin.site.register()
call by@admin.register
decoratorHTTP_X_REQUESTED_WITH
byheaders={"x-requested-with"
request.META
byheaders
assertQuerysetEqual
byassertQuerySetEqual
force_text
byforce_str
js_asset
bydjango.templatetags.static
, as js_asset is deprecatedUSE_CUT==True
USE_DRESSING==True
django-tagging
bydjango-tagulous