-
Notifications
You must be signed in to change notification settings - Fork 165
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
Migrate admin panel to django #502
Draft
laggron42
wants to merge
37
commits into
master
Choose a base branch
from
lagg/django/admin-panel
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+3,401
−20
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
laggron42
force-pushed
the
lagg/django/admin-panel
branch
from
January 13, 2025 11:11
ff6b42b
to
4c672c6
Compare
laggron42
force-pushed
the
lagg/django/admin-panel
branch
from
January 13, 2025 11:13
4c672c6
to
d498af7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The first brick of work that may be the full migration to Django and the ditch of Tortoise, Aerich and fastapi-admin.
fastapi-admin
is ditched, replaced by the much better django admin panel. It will enable much better forms, validation, permissions, logs, 2FA, Discord OAuth2, easy template customization and a wide range of extensions.As django is mostly compatible with its own ORM, a duplication of
models.py
has been generated and is marked as unmanaged, meaning Django will only look for existing tables and not attempt to make migrations on it (except for admin stuff). We will have to maintain two copies of the model files.Migrating to the django DB migration engine is highly considered in the future to ditch aerich, but a full migration to the Django ORM and the ditch of Tortoise is unlikely to arrive soon.
TODO
BallInstance
Regime
Economy
Ball
catch_names
to stripped lowercaseSpecial
Player
Trade
GuildConfig
admin-role-ids
androot-role-ids
DEBUG = False
for secure traffic over the internetadmin-panel
service in docker compose