Skip to content
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

update django to 3.2 #52

Merged
merged 4 commits into from Mar 18, 2024
Merged

update django to 3.2 #52

merged 4 commits into from Mar 18, 2024

Conversation

eMBee
Copy link
Collaborator

@eMBee eMBee commented Mar 17, 2024

No description provided.

babel_locale = translation.get_language()
elif localedata.exists(translation.get_language()[:2]):
babel_locale = translation.get_language()[:2]
if translation.get_language():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using walrus operator to write less code:

if lang := translation.get_language():
    if localedata.exists(lang):
        babel_locale = lang
    elif localedata.exists(lang[:2]):
        babel_locale = lang[:2]

src/pretix/helpers/templatetags/jsonfield.py Show resolved Hide resolved
Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the feedback I think we can merge this. If you find any issues, please open a new issue on the tracker. Thanks

@mariobehling mariobehling merged commit 528da50 into fossasia:master Mar 18, 2024
1 of 6 checks passed
weblate pushed a commit that referenced this pull request Apr 19, 2024
* update requirements to django 3.2

* remove jsonfallback, pull in helper functions that are still used from
original jsonfallback code

* fix tests for django 3.2

* keep versions in sync with requirements

---------

Co-authored-by: Martin Bähr <martin@codingforafrica.at>
weblate pushed a commit that referenced this pull request Apr 19, 2024
* update requirements to django 3.2

* remove jsonfallback, pull in helper functions that are still used from
original jsonfallback code

* fix tests for django 3.2

* keep versions in sync with requirements

---------

Co-authored-by: Martin Bähr <martin@codingforafrica.at>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants