-
Notifications
You must be signed in to change notification settings - Fork 0
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
Key results for detail panel #65
Conversation
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.
Thx for this feature!
If you think it's worth to wait for the ion fix (and it's expected to come), we can give it a couple of more days. But if this solution is ok for you and the other wouldn't be much slicker, go for it.
BTW, currently the app doesn't start at my end:
Traceback (most recent call last):
File "/app/manage.py", line 32, in <module>
execute_from_command_line(sys.argv)
File "/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 416, in execute
django.setup()
File "/venv/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/venv/lib/python3.9/site-packages/django/apps/registry.py", line 124, in populate
app_config.ready()
File "/app/digiplan/map/apps.py", line 21, in ready
from digiplan.map import hooks as digiplan_hooks
File "/app/digiplan/map/hooks.py", line 10, in <module>
from digiplan.map import config, datapackage, forms
File "/app/digiplan/map/forms.py", line 65, in <module>
class PanelForm(TemplateExtraContentForm): # noqa: D101
File "/app/digiplan/map/forms.py", line 91, in PanelForm
def generate_fields(self, parameters: dict, additional_parameters: dict | None = None) -> dict:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
I merged the dev
which included #59 but this shouldn't be the problem?!
Or maybe it's simply not finished? :D |
This is due to your python version - seems outdated. |
Fixed it with future annotation |
Great, error vanished. |
Ok, as there's no progress at ion, please implement using ajax. |
Unfortunately ionrangeslider seems not to work with HTMX yet. See opened issue here: IonDen/ion.rangeSlider#792
ff75e57
to
6418264
Compare
Implemented AJAX calls. |
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 rebuilt the docker but I'm getting ModuleNotFoundError: No module named 'template_partials'
here..
@@ -1175,6 +1189,24 @@ files = [ | |||
Django = ">=2.2" | |||
redis = ">=3.0.0" | |||
|
|||
[[package]] |
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.
Strange? Cause django-template-partials
is added in poetry.locks...
Can't explain right now
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.
Hey @henhuy, great feature nicely integrated!
I fixed the calculations, values are correct now. I have 2 questions:
- wind_2024 (
s_w_6
): the slider value must be divided by its max value, I did this in bb090f8. Is it ok this way or should the max value rather be obtained from context ? - PV roof potential: you used the capacity, however, in the current implementation areas must be used. I changed this in ede4085. Unfortunately in the pipeline I had used sqm not sqkm like for the other technologies. Therefore I changed the pipeline to get everything in line. You'll need the latest
potentialarea_pv_roof_area_stats_muns.csv
from the wolke to make it work.
If you're fine with my changes, please go ahead and merge..
PS: BTW, the fct calculate_potential_shares
seems to be outdated..
Your fixes are working. Reading max wind from energy settings panel is totally fine. |
Closes #52
Waits for ionrangeslider fix or shall I do it using AJAX?