feature/adminpanel #6

Open
ali wants to merge 3 commits from feature/adminpanel into master
Collaborator
No description provided.
ali added 3 commits 2026-08-23 10:46:39 -04:00
Adds GET /api/v2/promotions/admin/promotions/ and .../referrals/, listing
every Promotion (type derived from Plan.processor) and referral activity
(invited_by = resolved payee, invited_user = raw event.data['user'] --
there's no dedicated referral model or referral_code field in this
codebase). Follows the existing _user/_application file-suffix convention
with a new _admin suffix, backed by real django-filter FilterSets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Restructures the admin promotions/referrals endpoints to match the
admin/users folder split used by the sibling advertising service
(apps/crm, apps/escrow, apps/stores there): views/admin/, serializers/admin/,
and a shared urls/router.py with the two resources as GenericViewSets
registered on one DefaultRouter, instead of flat _admin-suffixed modules
with separate ListAPIView/RetrieveAPIView classes.

Scoped to the admin slice only -- the pre-existing user-token/
application-token views, urls, and serializers keep their original
_user/_application file layout and URL namespaces, since converting
those too would rename routes tests.py and external callers depend on.
filters.py stays a single flat file, matching how advertising's own
filters.py is not split into subfolders either.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
These were dropped from the prior restructuring commit by a failed
multi-pathspec git add (one invalid path aborted the whole call).
Wires up filters.py's Admin*Filter classes, mounts apps.promotions.urls
(the new router package) instead of the deleted urls_admin module, and
brings docs/adminpanel_technical.md in sync with the new layout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This pull request has changes conflicting with the target branch.
  • apps/promotions/serializers.py
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/adminpanel:feature/adminpanel
git checkout feature/adminpanel

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout master
git merge --no-ff feature/adminpanel
git checkout feature/adminpanel
git rebase master
git checkout master
git merge --ff-only feature/adminpanel
git checkout feature/adminpanel
git rebase master
git checkout master
git merge --no-ff feature/adminpanel
git checkout master
git merge --squash feature/adminpanel
git checkout master
git merge --ff-only feature/adminpanel
git checkout master
git merge feature/adminpanel
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: addwin/promotions#6
No description provided.