Skip to content

Commit

Permalink
Merge pull request #263 from wmo-raf/dev
Browse files Browse the repository at this point in the history
Updates and Bug Fixes
  • Loading branch information
erick-otenyo authored Oct 10, 2024
2 parents 95a3cf9 + 5bd7407 commit ceb6d90
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions climweb/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ include-package-data = true
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
platforms = ["Linux"]

[project.scripts]
manage = "climweb.manage:main"

#[tool.setuptools.package-data]

[tool.setuptools.packages.find]
Expand Down
2 changes: 1 addition & 1 deletion climweb/src/climweb/config/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

INSTALLED_APPS = ["daphne"] + INSTALLED_APPS + ["wagtail.contrib.styleguide"]

STATICFILES_STORAGE = "base.storage.ManifestStaticFilesStorageNotStrict"
STATICFILES_STORAGE = "climweb.base.storage.ManifestStaticFilesStorageNotStrict"

SHOW_TOOLBAR_CALLBACK = False
SHOW_COLLAPSED = False
Expand Down
7 changes: 6 additions & 1 deletion climweb/src/climweb/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
import os
import sys

if __name__ == "__main__":

def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "climweb.config.settings.dev")

from django.core.management import execute_from_command_line

execute_from_command_line(sys.argv)


if __name__ == "__main__":
main()
3 changes: 2 additions & 1 deletion climweb/src/climweb/pages/cap/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from django.utils.xmlutils import SimplerXMLGenerator
from wagtail.models import Site


from climweb.base.cache import wagcache
from .models import (
CapAlertPage,
Expand Down Expand Up @@ -80,7 +81,7 @@ def add_root_elements(self, handler):

def add_item_elements(self, handler, item):
handler.addQuickElement("title", item["title"])
handler.addQuickElement("link", item["link"], attrs={"type": "application/cap+xml"})
handler.addQuickElement("link", item["link"])
if item["description"] is not None:
handler.addQuickElement("description", item["description"])

Expand Down
2 changes: 1 addition & 1 deletion climweb/src/climweb/pages/stations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def get_station_model(self):
attrs = {
**fields,
"managed": False,
"__module__": "pages.stations"
"__module__": "climweb.pages.stations"
}

station_model = type("Station", (models.Model,), attrs)
Expand Down

0 comments on commit ceb6d90

Please sign in to comment.