Commit Graph

9319 Commits

Author SHA1 Message Date
Roland Geider
a84a467b18 Also sync the user's profile 2026-05-22 19:07:55 +02:00
Roland Geider
5d3e6bd103 Correctly generate absolute paths for exercise images 2026-05-22 12:22:54 +02:00
Roland Geider
1f7f40539f Merge branch 'master' into fix/ingredient-thumbnails 2026-05-22 12:22:26 +02:00
Roland Geider
bbae9f45e2 Also expose the exercise thumbnails over the API 2026-05-22 11:32:44 +02:00
Roland Geider
0732612836 Add translation files for Uzbek and Vietnamese
These already exist in the react component
2026-05-22 11:23:44 +02:00
Roland Geider
aa51ff64e7 Add Catalan to (db) list of languages 2026-05-22 11:23:44 +02:00
Roland Geider
2ad2dec5a1 Add translation file for Macedonian
There is already some translation made for the frontend
2026-05-22 11:23:44 +02:00
Roland Geider
4bb74414c8 Add Romanian to language fixture
The translation already existed...
2026-05-22 11:23:44 +02:00
Roland Geider
5f03b31ce0 Merge pull request #2348 from wger-project/dependabot/uv/django-allauth-65.17.0
Bump django-allauth from 65.16.1 to 65.17.0
2026-05-22 09:32:12 +02:00
Ewin7
fcb14a8ecb style: clarify docs and adjust long-number test input 2026-05-22 01:41:46 +02:00
Ewin7
e8b02d0348 feat: trigger Open Food Facts lookup on barcode text search
- Added logic to `search_name_fulltext` to detect 8,12,13,14 digit numeric strings
- Searches through the existing `search_barcode` method
- Fallback to standard full-text search if no barcode match is found
- Added unit tests
2026-05-22 01:31:01 +02:00
Roland Geider
bd825e2558 Properly check the validity of the "next" parameter in the login view 2026-05-21 09:30:36 +02:00
Roland Geider
48a9aa18dd Always generate the absolute urls for exercise images and videos
When pre-warming the exercise cache via celery, we have no request to build the
absolute url from. In these cases, fall back to the SITE_URL settings, or just
return the relative path otherwise

See https://github.com/wger-project/flutter/issues/1193
2026-05-21 09:30:36 +02:00
dependabot[bot]
4de7138437 Bump gevent from 26.4.0 to 26.5.0
Bumps [gevent](https://github.com/gevent/gevent) from 26.4.0 to 26.5.0.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst)
- [Commits](https://github.com/gevent/gevent/compare/26.4.0...26.5.0)

---
updated-dependencies:
- dependency-name: gevent
  dependency-version: 26.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-21 00:53:06 +00:00
dependabot[bot]
0823c65379 Bump django-allauth from 65.16.1 to 65.17.0
Bumps [django-allauth](https://github.com/sponsors/pennersr) from 65.16.1 to 65.17.0.
- [Commits](https://github.com/sponsors/pennersr/commits)

---
updated-dependencies:
- dependency-name: django-allauth
  dependency-version: 65.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-21 00:52:45 +00:00
Roland Geider
c7142915cb Merge pull request #2347 from wger-project/dependabot/uv/idna-3.15
Bump idna from 3.13 to 3.15
2026-05-20 20:48:50 +02:00
Roland Geider
a4d631a82d Merge pull request #2346 from wger-project/dependabot/uv/django-formtools-2.6.1
Bump django-formtools from 2.5.1 to 2.6.1
2026-05-20 20:45:46 +02:00
Roland Geider
f31bf0c86f Test the app on python 3.14
Still leaving 3.10 as it's the version found e.g. in ubuntu 22.04
2026-05-20 20:42:38 +02:00
Roland Geider
b0ce2a544d Wrap custom delete-and-replace exercise logic in a transaction 2026-05-20 20:21:30 +02:00
Roland Geider
3c82b0ec71 Properly handle unexisting or malformed IDs
get_object returns a 404 if the pk doesn't exist (or isn't an integer)
2026-05-20 20:09:37 +02:00
Roland Geider
650676f6ee Remove unused imports and variables 2026-05-20 19:50:20 +02:00
Roland Geider
167f10867e Properly handle deletion of users
Previously it could happen that deleting a user caused an exception, since when logs
are deleted the trophies are re-calculated and the system could try to award a trophy
to a user that was already deleted by that point
2026-05-20 19:15:34 +02:00
Roland Geider
a3c5fe189d Properly handle thumbnail errors 2026-05-20 19:15:34 +02:00
Github-actions
0a75eb0e75 Automatic linting 2026-05-20 17:12:44 +00:00
Roland Geider
f9f5376c40 Merge pull request #2344 from birjd002/feature/username-suggestion-system
Feature/username suggestion system
2026-05-20 19:11:46 +02:00
Roland Geider
5c1489f0ac Fix edge case when grouping exercises 2026-05-20 18:30:01 +02:00
birjd002
6c906754e9 Chore move clean_username logic to validate_username function
Creates /wger/core/validators.py
2026-05-20 16:27:26 +09:30
birjd002
2e6e018a50 Update handle empty string input
Also added a test for this case
2026-05-20 16:13:07 +09:30
birjd002
2ac52860e8 Fix enforce case sensitivity on user object 2026-05-20 15:54:09 +09:30
birjd002
5685b115d3 Chore remove UniqueValidator import 2026-05-20 15:44:47 +09:30
dependabot[bot]
4ba0d8ae1b Bump idna from 3.13 to 3.15
Bumps [idna](https://github.com/kjd/idna) from 3.13 to 3.15.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md)
- [Commits](https://github.com/kjd/idna/compare/v3.13...v3.15)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.15'
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-19 23:30:10 +00:00
dependabot[bot]
f7c1425972 Bump django-formtools from 2.5.1 to 2.6.1
Bumps [django-formtools](https://github.com/jazzband/django-formtools) from 2.5.1 to 2.6.1.
- [Changelog](https://github.com/jazzband/django-formtools/blob/master/docs/changelog.rst)
- [Commits](https://github.com/jazzband/django-formtools/compare/2.5.1...2.6.1)

---
updated-dependencies:
- dependency-name: django-formtools
  dependency-version: 2.6.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-19 09:22:16 +00:00
Roland Geider
8e409eb8a7 Read nonce sent from the mobile app to login 2026-05-18 23:07:05 +02:00
Roland Geider
bfbc350448 Add app-handoff endpoint
This is needed to use social login, etc. in the app via the browser
2026-05-18 18:51:21 +02:00
Roland Geider
97750ac282 Update changelog 2026-05-18 17:07:16 +02:00
Roland Geider
190ef83391 Update CHANGELOG.md 2026-05-18 17:07:16 +02:00
Roland Geider
556c43d0ad Consolidate JWT Keys 2026-05-18 17:07:16 +02:00
Roland Geider
3fb5128243 Remove the /api/v2/token endpoint
Creating tokens is now done manually via the api keys page
2026-05-18 17:07:15 +02:00
Roland Geider
a88b556365 Remove the /api/v2/login endpoint
Creating URLs is now done manually via the api keys page
2026-05-18 17:07:15 +02:00
Roland Geider
2015824450 Remove SOCIALACCOUNT_PROVIDERS, this is configured in the DB 2026-05-18 17:07:15 +02:00
Roland Geider
79fe03c855 Remove dj-rest-auth, this wasn't used anymore 2026-05-18 17:07:15 +02:00
Roland Geider
3431ea5fba Fix tests and post-rebase cleanup 2026-05-18 17:07:15 +02:00
Roland Geider
a21223a807 Allow users to manually generate JWT tokens 2026-05-18 17:05:00 +02:00
Roland Geider
0473afe7c6 Start adding the allauth headless app for API authentication 2026-05-18 17:05:00 +02:00
Roland Geider
e48a6460dc Cleanup and refactor the social auth login code
Provider settings live now completely in the SocialApp.settings field, which
makes this much more flexible as local administrators can choose which providers
they want to support without us having to keep a list in the settings.

The `USE_SOCIAL_AUTH` setting was removed in favor of the WGER_SOCIAL_PROVIDERS
list, which simply contains the desired list of providers.

The setup_social_oauth.py management command was deleted, users are referred to
the documentation, which explains how to save the different entries
2026-05-18 17:05:00 +02:00
pankaj-basnet
f86045a4cc Fix(oauth): fix setup_social_oauth command for Google login, and cleanup/typos in other files
Remove GitHub and Facebook support from the command (Google only for
   this PR). Providers will be added to the command in future PRs.

Also add a docstring pointing users to Django admin for full CRUD
operations on SocialApp records, addressing maintainer feedback.

Files changed:
- wger/core/management/commands/setup_social_oauth.py: Google-only
2026-05-18 17:05:00 +02:00
pankaj-basnet
f9c07064e0 fix(oauth): Remove GitHub and Facebook button blocks in social_login.html template
use_social_auth guard on the Google button. This matches the context processor and
allows per-provider button control.

Remove GitHub and Facebook button blocks — these will be re-added
in future PRs when those providers are implemented.
2026-05-18 17:05:00 +02:00
pankaj-basnet
dfcd9dc6ba fix(oauth): use_social_auth for Google oauth in template context processor, remove use_github_auth and use_facebook_auth
The login template (social_login.html) needs a per-provider flag to
control which buttons to show.

This also fixes the pattern for future providers: use_github_auth and
use_facebook_auth can be added here when those PRs land.

Files changed:
- wger/utils/context_processor.py: add use_google_auth to context dict,
  remove use_github_auth and use_facebook_auth (out of scope for this PR)
2026-05-18 17:05:00 +02:00
pankaj-basnet
b3044dad07 feat(oauth): add USE_GOOGLE_AUTH setting for allauth, auto-derive USE_SOCIAL_AUTH
As suggested by maintainer rolandgeider, add a dedicated USE_GOOGLE_AUTH
setting. USE_SOCIAL_AUTH is now auto-derived (True if any provider is
enabled) rather than being set manually.

This pattern scales cleanly when GitHub and Facebook are added in future
PRs — each provider gets its own flag, and USE_SOCIAL_AUTH stays in sync.

Files changed:
- settings/settings_global.py: add USE_GOOGLE_AUTH to WGER_SETTINGS
  defaults, remove USE_GITHUB_AUTH/USE_FACEBOOK_AUTH, auto-derive
  USE_SOCIAL_AUTH from provider flags
- settings/main.py: read USE_GOOGLE_AUTH from env, remove
  USE_GITHUB_AUTH/USE_FACEBOOK_AUTH env reads, add auto-derive logic
- settings/local_dev.py: set USE_GOOGLE_AUTH=True, remove github/facebook
  flags, add auto-derive logic
- settings/ci.py: set USE_GOOGLE_AUTH=False, remove github/facebook flags
2026-05-18 17:05:00 +02:00
pankaj-basnet
cd44264f65 feat(oauth): fix url for allauth, removed dj-rest-auth Google, GitHub and Facebook URL patterns from urls.py
Removes the conditional URL patterns for /auth/google/ ,  /auth/github/ and /auth/facebook/
REST endpoints. These will be re-added in a future PR.

Also fixes the allauth URL include: use allauth.urls (full set) instead
of allauth.socialaccount.urls to resolve the NoReverseMatch error for
'google_login' reported by maintainer rolandgeider.

Files changed:
- wger/urls.py: remove github/facebook URL blocks, fix allauth.urls include
2026-05-18 17:05:00 +02:00