-
Notifications
You must be signed in to change notification settings - Fork 167
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
Merged
Merged
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
2 times, most recently
from
January 13, 2025 11:13
4c672c6
to
d498af7
Compare
laggron42
force-pushed
the
lagg/django/admin-panel
branch
from
January 21, 2025 10:27
f76fee3
to
a8ee154
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
Show trade historyThe player page is already very cluttered, let's keep the normal trade searchTrade
GuildConfig
Look into ditching aerich and moving to the Django migration engineWill be done in a future PRadmin-role-ids
androot-role-ids
Have multiple pipelines for role assignment to customize them (currently it's all grouped in a single one)Not technically doable, there is no way to stop the pipeline mid-way if higher roles were assignedDEBUG = False
for secure traffic over the internetadmin-panel
service in docker composeWrite a custom home page ?Maybe laterAdd some custom CSS, make it easy to change colors maybeMaybe laterfastapi-admin