- 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
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
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
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
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
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.
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)
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
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