-
Notifications
You must be signed in to change notification settings - Fork 15
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
First set of fixes to revive Django-based GUI code #695
Merged
christophertubbs
merged 9 commits into
NOAA-OWP:master
from
robertbartel:f/revise_django_gui/fix_broken_1
Sep 6, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0c0edd3
Deprecate non-working communication pkg funcs.
robertbartel 9ed1d85
Bump communication version to 0.21.1.
robertbartel 14564a0
Fix GUI config for django.contrib.staticfiles.
robertbartel 7b72d01
Adding required daphne dependency for GUI.
robertbartel 94bda9b
Have base maas GUI template use new CSS standard.
robertbartel e0a6706
Adjust banner of ngen config GUI view.
robertbartel 2f398b2
Fix out-of-date GUI classes to add URLs back.
robertbartel f969bc1
Fix first Django MaaS app migration.
robertbartel 208e190
Add running of migrations back to GUI entrypoint.
robertbartel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ class Migration(migrations.Migration): | |
def create_superuser(apps, schema_editor): | ||
from django.contrib.auth.models import User | ||
|
||
SU_NAME = os.environ.get('DMOD_SU_NAME') | ||
SU_EMAIL = os.environ.get('DMOD_SU_EMAIL') | ||
SU_PASSWORD = os.environ.get('DMOD_SU_PASSWORD') | ||
SU_NAME = os.environ.get('DMOD_SU_NAME', "dmod_admin") | ||
SU_EMAIL = os.environ.get('DMOD_SU_EMAIL', "[email protected]") | ||
SU_PASSWORD = os.environ.get('DMOD_SU_PASSWORD', f"{SU_NAME}{os.environ.get('SQL_PASSWORD')}") | ||
|
||
superuser = User.objects.create_superuser( | ||
username=SU_NAME, | ||
|
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,5 +134,4 @@ | |
|
||
STATIC_URL = '/static/' | ||
STATICFILES_DIRS = [ | ||
BASE_DIRECTORY / "static" | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.21.0' | ||
__version__ = '0.21.1' |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be careful - this is mixing and matching resources.
css/master.css
is the stylesheet for the root levelmaster.html
template.common/css/base.css
is the stylesheet forbase.html
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in this case that is what I wanted to do here, though I appreciate the cautious eye. I felt like we should start from the same styling throughout, so I was trying to move to that in this template base. That said, I could be talked into deferring on this if we think it's problematic to do it until it's also time to clean up some of the redundant files (which I was avoiding at the moment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be better off changing to base template to
master.html
on the other templates rather than altering what cssbase.html
is referencing. I haven't made the switch, so it might be fine, but both css files and templates are making assumptions based on what page elements are present.You have the right idea, though. Switching what template you're inheriting from might work better here, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, if I'm remembering correctly, I started off by switching the base template, but moving from base.html caused some problem with pages' scripts. Swapping in the CSS change ended up being easier to follow along with and appeared to have fewer immediate side effects than carefully tweaking what seemed to be a good chunk of the Javascript setup (and hoping there wasn't something else needed after that).
Regardless, there isn't going to be a clean fix until we overhaul a good chunk of things. My goal at moment is to be minimalist and do just enough to get things working again, albeit with some attention paid to not laying any seriously traps for us to fall into later.