Skip to content

Commit

Permalink
hardocde cms
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace-Amondi committed Jul 5, 2023
1 parent f05ea13 commit 216f324
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions nmhs_cms/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.conf import settings
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.urls import include, path
from django.urls import include, path, re_path
from wagtail import urls as wagtail_urls
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls
Expand All @@ -23,10 +23,10 @@
path("cap/", include(cap_urls)),
path("search/", search_views.search, name="search"),

path("", include("geomanager.urls")),
path("", include("geomanager.urls"), name="geomanager"),
# path("", include("django_nextjs.urls")),
path("", include("wagtailsurveyjs.urls")),
path("", include(forecastmanager_urls)),
re_path("", include(forecastmanager_urls), name="forecast_api"),

]

Expand Down
4 changes: 2 additions & 2 deletions pages/home/static/js/forecast_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ $(document).ready(function () {
function setForecastData(forecast_date) {

// Make an HTTP GET request to the API endpoint
fetch(`/api/forecasts?forecast_date=${forecast_date}`)
fetch(`/cms/api/forecasts?forecast_date=${forecast_date}`)
.then(response => response.json()) // Parse the response as JSON
.then(data => {
// Process the retrieved data
Expand All @@ -103,7 +103,7 @@ $(document).ready(function () {
}

}
img.src = `${icon.properties.condition_icon}`
img.src = `/cms${icon.properties.condition_icon}`
return img.src

})
Expand Down
2 changes: 2 additions & 0 deletions pages/home/templates/home_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
{% endif %}

const temp_units = "{{settings.forecastmanager.ForecastSetting.get_temp_units_display}}"


</script>

<script type="text/javascript" src="{% static 'js/basemap.js' %}"></script>
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ filelock==3.12.0
filetype==1.2.0
Fiona==1.9.4.post1
fonttools==4.39.4
forecastmanager==0.0.4
forecastmanager @ https://github.com/wmo-raf/forecastmanager/archive/d44d63f86f050e0a77549d63add81a41b47762c7.zip
frozenlist==1.3.3
future==0.18.3
geomanager==0.0.1
Expand Down

0 comments on commit 216f324

Please sign in to comment.