diff --git a/VIPSWeb/local_settings_sample.py b/VIPSWeb/local_settings_sample.py index 1e188004c735e83b1e649f4ef28815885daa5e34..7ed9ab8a66f6a3a11febb8a4c0b91341be72b2b0 100755 --- a/VIPSWeb/local_settings_sample.py +++ b/VIPSWeb/local_settings_sample.py @@ -25,7 +25,7 @@ ## Change these for every new instance of the app import os # MUST be lazy, otherwise the app crashes -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ DEBUG = True MAINTENANCE_MODE = False @@ -92,13 +92,13 @@ DATABASES = { } # Caching with memcached -#CACHES = { -# 'default': { -# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', -# 'LOCATION': 'unix:/tmp/memcached.sock', -# 'LOCATION': '127.0.0.1:11211', -# } -#} +# https://docs.djangoproject.com/en/3.2/topics/cache/ +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'LOCATION': '127.0.0.1:11211', + } +} # Site name - appears in header of all pages. HTML is allowed SITE_NAME = "Example site title" diff --git a/VIPSWeb/settings.py b/VIPSWeb/settings.py index ed6c09f7dee2e1c964ec15a7203f874a7c32f9b6..dfb0c4516ae1a71b33474aaa904f343c6e7dafce 100755 --- a/VIPSWeb/settings.py +++ b/VIPSWeb/settings.py @@ -31,6 +31,9 @@ LOCALE_PATHS = ( os.path.join(SITE_ROOT, 'locale'), ) +# New in Django 3.2 +# https://docs.djangoproject.com/en/4.1/releases/3.2/#what-s-new-in-django-3-2 +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' SITE_ID = 1 diff --git a/VIPSWeb/templatetags/template_helper.py b/VIPSWeb/templatetags/template_helper.py index 792005e11bbda37510c462ac755c4f911104cc61..0c3006ea621f0dd8c1fbd3e3d14a348d359ef1f2 100755 --- a/VIPSWeb/templatetags/template_helper.py +++ b/VIPSWeb/templatetags/template_helper.py @@ -1,6 +1,6 @@ # -*- coding: UTF-8 -*- from django import template -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.utils import translation from django.conf import settings from datetime import datetime diff --git a/VIPSWeb/urls.py b/VIPSWeb/urls.py index 681c5c57d12edf83cfd960e2c9a0de1dbb94db84..a518e33344c65225d7a3fd9d71ddeb59822cb690 100755 --- a/VIPSWeb/urls.py +++ b/VIPSWeb/urls.py @@ -16,7 +16,8 @@ # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import include, url + +from django.urls import re_path, path, include #from django.views.generic import TemplateView from django.views.static import serve from django.views.i18n import JavaScriptCatalog @@ -38,7 +39,7 @@ js_info_dict = { if settings.MAINTENANCE_MODE is True: urlpatterns = [ - url(r'^$', views.maintenance, name='maintenance') + re_path(r'^$', views.maintenance, name='maintenance') ] else: urlpatterns = [ @@ -49,31 +50,32 @@ else: # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), - url(r'^cydiapomonella/', include('cydiapomonella.urls')), - url(r'^forecasts/', include('forecasts.urls', namespace = "forecasts")), - url(r'^messages/', include('vips_messages.urls', namespace = "vips_messages")), - url(r'^organisms/', include('organisms.urls', namespace = "organisms")), - url(r'^observations/', include('observations.urls', namespace = "observations")), - url(r'^information/', include('information.urls', namespace = "information")), - url(r'^blotch/', include('cerealblotchmodels.urls', namespace = "cerealblotchmodels")), - url(r'^calculators/', include('calculators.urls', namespace = "calculators")), - url(r'^roughage/', include('roughage.urls', namespace = "roughage")), - url(r'^security/', include('security.urls', namespace = "security")), - url(r'^fusarium/', include('fusarium.urls', namespace = "fusarium")), - url(r'^applefruitmoth/', include('applefruitmoth.urls', namespace = "applefruitmoth")), - url(r'^mock/', include('mock.urls', namespace = "mock")), + re_path(r'^cydiapomonella/', include('cydiapomonella.urls')), + re_path(r'^forecasts/', include('forecasts.urls', namespace = "forecasts")), + re_path(r'^messages/', include('vips_messages.urls', namespace = "vips_messages")), + re_path(r'^organisms/', include('organisms.urls', namespace = "organisms")), + re_path(r'^observations/', include('observations.urls', namespace = "observations")), + re_path(r'^information/', include('information.urls', namespace = "information")), + re_path(r'^blotch/', include('cerealblotchmodels.urls', namespace = "cerealblotchmodels")), + re_path(r'^calculators/', include('calculators.urls', namespace = "calculators")), + re_path(r'^roughage/', include('roughage.urls', namespace = "roughage")), + re_path(r'^security/', include('security.urls', namespace = "security")), + re_path(r'^fusarium/', include('fusarium.urls', namespace = "fusarium")), + re_path(r'^applefruitmoth/', include('applefruitmoth.urls', namespace = "applefruitmoth")), + #re_path(r'^mock/', include('mock.urls', namespace = "mock")), # Uncomment the next line to enable the admin: - url(r'^admin/', admin.site.urls), - url(r'^tinymce/', include('tinymce.urls')), + re_path(r'^admin/', admin.site.urls), + re_path(r'^tinymce/', include('tinymce.urls')), # Static serving of media files - url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}), + re_path(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}), # Enabling translation in JavaScript files # See https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#internationalization-in-javascript-code - url(r'^jsi18n/$', JavaScriptCatalog.as_view(packages=js_info_dict['packages']), name='javascript-catalog'), - url(r'^i18n/', include('django.conf.urls.i18n')), - url(r'^settings.js', views.settings_js, name="views.settings_js"), - url(r'^vipslogicproxy/(?P<path>.*)$', views.vipslogicproxy), + path('jsi18n/', JavaScriptCatalog.as_view(packages=js_info_dict['packages']), name='javascript-catalog'), + #path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'), + re_path(r'^i18n/', include('django.conf.urls.i18n')), + path('settings.js', views.settings_js, name="views.settings_js"), + re_path(r'^vipslogicproxy/(?P<path>.*)$', views.vipslogicproxy), # Default view is index - url(r'^$', views.index, name='index'), + re_path(r'^$', views.index, name='index'), #url(r'^$', TemplateView.as_view(template_name="index.html")) ] diff --git a/applefruitmoth/urls.py b/applefruitmoth/urls.py index 92ccac728202b4f6ced03a8c72aedcbdd283f192..f694372d9ee5f0ea4b13168d2c3f43b10c8f3569 100755 --- a/applefruitmoth/urls.py +++ b/applefruitmoth/urls.py @@ -16,12 +16,11 @@ # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url - +from django.urls import re_path from applefruitmoth import views app_name = "applefruitmoth" urlpatterns = [ - url(r'^$', views.index, name='index'), + re_path(r'^$', views.index, name='index'), ] \ No newline at end of file diff --git a/calculators/urls.py b/calculators/urls.py index 1661f2f18d47108c08e4b144d20ff8bb8903cf41..6c1644cb7752a1bde6d101bc1f3073fbacf5c996 100755 --- a/calculators/urls.py +++ b/calculators/urls.py @@ -15,13 +15,14 @@ # You should have received a copy of the NIBIO Open Source License # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url + +from django.urls import re_path from calculators import views app_name = "calculators" urlpatterns = [ # ex: /forecasts/ - url(r'^$', views.index, name='index'), - url(r'eil/', views.eil, name='eil') + re_path(r'^$', views.index, name='index'), + re_path(r'eil/', views.eil, name='eil') ] \ No newline at end of file diff --git a/cerealblotchmodels/locale/nb/LC_MESSAGES/django.po b/cerealblotchmodels/locale/nb/LC_MESSAGES/django.po deleted file mode 100755 index f8feb0dd4d53bdefcf13f0afb8ec362fcb30c30e..0000000000000000000000000000000000000000 --- a/cerealblotchmodels/locale/nb/LC_MESSAGES/django.po +++ /dev/null @@ -1,457 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -<<<<<<< HEAD -"POT-Creation-Date: 2020-06-22 10:02+0200\n" -"PO-Revision-Date: 2020-06-22 10:02+0200\n" -======= -"POT-Creation-Date: 2020-09-30 10:35+0200\n" -"PO-Revision-Date: 2020-03-25 09:18+0100\n" ->>>>>>> epleviklerNewFeatures -"Last-Translator: \n" -"Language-Team: \n" -"Language: nb\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.0.6\n" - -#: templates/cerealblotchmodels/PPOmodelform.html:25 -#: templates/cerealblotchmodels/PPOmodelform.html:336 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:25 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:28 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:449 -msgid "Septoria humidity model" -msgstr "Fuktmodell bladflekksjukdommer i hvete" - -#: templates/cerealblotchmodels/PPOmodelform.html:28 -msgid "Plant Protection Online Model" -msgstr "Planteværn Online-modell" - -#: templates/cerealblotchmodels/PPOmodelform.html:32 -msgid "Input data" -msgstr "Input-data" - -#: templates/cerealblotchmodels/PPOmodelform.html:35 -msgid "Results" -msgstr "Resultater" - -#: templates/cerealblotchmodels/PPOmodelform.html:41 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:39 -msgid "Country" -msgstr "Land" - -#: templates/cerealblotchmodels/PPOmodelform.html:43 -#: templates/cerealblotchmodels/PPOmodelform.html:50 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:41 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:48 -msgid "Please select" -msgstr "Vennligst velg" - -#: templates/cerealblotchmodels/PPOmodelform.html:48 -#: templates/cerealblotchmodels/barleynetblotchform.html:49 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:46 -#: templates/cerealblotchmodels/wheatleafblotchform.html:51 -msgid "Weather station" -msgstr "Målestasjon" - -#: templates/cerealblotchmodels/PPOmodelform.html:56 -#: templates/cerealblotchmodels/wheatleafblotchform.html:46 -msgid "Growth stage" -msgstr "Vekststadium" - -#: templates/cerealblotchmodels/PPOmodelform.html:61 -msgid "Susceptibility" -msgstr "Mottakelighet" - -#: templates/cerealblotchmodels/PPOmodelform.html:68 -msgid "Severity" -msgstr "Alvorlighetsgrad" - -#: templates/cerealblotchmodels/PPOmodelform.html:80 -#: templates/cerealblotchmodels/barleynetblotchform.html:108 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:153 -#: templates/cerealblotchmodels/wheatleafblotchform.html:136 -msgid "Run model" -msgstr "Kjør modell" - -#: templates/cerealblotchmodels/PPOmodelform.html:122 -msgid "" -"WARNING: We suspect you are using Internet Explorer to view this site. VIPS " -"is not designed to work with Internet Explorer, you may experience errors " -"and missing features. Please use a different browser, like Mozilla Firefox, " -"Microsoft Edge or Google Chrome." -msgstr "" -"ADVARSEL: Det ser ut som du bruker Internet Explorer på denne websiden. VIPS " -"er ikke designet for å fungere med Internet Explorer, så du må forvente feil " -"og manglende funksjonalitet. Vennligst bruk en moderne nettleser som " -"Microsoft Edge, Firefox eller Google Chrome." - -#: templates/cerealblotchmodels/PPOmodelform.html:224 -#: templates/cerealblotchmodels/barleynetblotchform.html:281 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:316 -#: templates/cerealblotchmodels/wheatleafblotchform.html:344 -msgid "Select weather station" -msgstr "Velg målestasjon" - -#: templates/cerealblotchmodels/PPOmodelform.html:248 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:360 -msgid "The model is running, please wait" -msgstr "Modellen kjører, vennligst vent" - -#: templates/cerealblotchmodels/PPOmodelform.html:267 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:379 -msgid "Leaf wetness, hourly" -msgstr "Bladfukt, timesverdi" - -#: templates/cerealblotchmodels/PPOmodelform.html:268 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:380 -msgid "Rain, hourly" -msgstr "Regn, timeverdi" - -#: templates/cerealblotchmodels/PPOmodelform.html:269 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:381 -msgid "Relative humidity, hourly mean" -msgstr "Relativ luftfuktighet, timesgjennomsnitt" - -#: templates/cerealblotchmodels/PPOmodelform.html:270 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:382 -msgid "Humid hour (yes/no)" -msgstr "Fuktig time (ja/nei)" - -#: templates/cerealblotchmodels/PPOmodelform.html:271 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:383 -msgid "Humid period hour" -msgstr "Time nr i fuktig periode" - -#: templates/cerealblotchmodels/PPOmodelform.html:272 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:384 -msgid "Humid hour sum" -msgstr "Sum fuktige timer" - -#: templates/cerealblotchmodels/PPOmodelform.html:273 -#: templates/cerealblotchmodels/PPOmodelform.html:331 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:385 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:444 -msgid "Humid period hour outside protection period" -msgstr "Time nr x i fuktig periode utenfor sprøyteperiode" - -#: templates/cerealblotchmodels/PPOmodelform.html:280 -#: templates/cerealblotchmodels/barleynetblotchform.html:206 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:392 -#: templates/cerealblotchmodels/wheatleafblotchform.html:265 -msgid "Time" -msgstr "Tid" - -#: templates/cerealblotchmodels/PPOmodelform.html:287 -#: templates/cerealblotchmodels/barleynetblotchform.html:214 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:399 -#: templates/cerealblotchmodels/wheatleafblotchform.html:275 -msgid "Warning status" -msgstr "Varselstatus" - -#: templates/cerealblotchmodels/PPOmodelform.html:327 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:440 -msgid "Hours" -msgstr "Timer" - -#: templates/cerealblotchmodels/PPOmodelform.html:332 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:445 -msgid "Threshold humid period" -msgstr "Terskelverdier for fuktighet" - -#: templates/cerealblotchmodels/PPOmodelform.html:333 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:446 -msgid "Spraying protection period" -msgstr "Beskyttelse etter sprøyting" - -#: templates/cerealblotchmodels/barleynetblotchform.html:25 -#: templates/cerealblotchmodels/barleynetblotchform.html:34 -msgid "Barley net blotch" -msgstr "Byggbrunflekk" - -#: templates/cerealblotchmodels/barleynetblotchform.html:42 -msgid "Background data for the barley net blotch model" -msgstr "Bakgrunnsdata for byggbrunflekkmodellen" - -#: templates/cerealblotchmodels/barleynetblotchform.html:55 -#: templates/cerealblotchmodels/wheatleafblotchform.html:57 -msgid "Sowing date" -msgstr "Sådato" - -#: templates/cerealblotchmodels/barleynetblotchform.html:60 -msgid "Crop" -msgstr "Kultur" - -#: templates/cerealblotchmodels/barleynetblotchform.html:67 -msgid "Same crop as last season" -msgstr "Samme kultur som i fjor" - -#: templates/cerealblotchmodels/barleynetblotchform.html:72 -#: templates/cerealblotchmodels/wheatleafblotchform.html:74 -msgid "Plowed" -msgstr "Pløyd" - -#: templates/cerealblotchmodels/barleynetblotchform.html:78 -#: templates/cerealblotchmodels/wheatleafblotchform.html:78 -msgid "Observation date" -msgstr "Observasjonsdato" - -#: templates/cerealblotchmodels/barleynetblotchform.html:83 -#: templates/cerealblotchmodels/wheatleafblotchform.html:83 -msgid "% Infected leaves" -msgstr "% infiserte blad" - -#: templates/cerealblotchmodels/barleynetblotchform.html:88 -#: templates/cerealblotchmodels/wheatleafblotchform.html:94 -msgid "Spraying date" -msgstr "Sprøytedato" - -#: templates/cerealblotchmodels/barleynetblotchform.html:93 -msgid "Preparation" -msgstr "Plantevernmiddel" - -#: templates/cerealblotchmodels/barleynetblotchform.html:99 -#: templates/cerealblotchmodels/wheatleafblotchform.html:105 -#: templates/cerealblotchmodels/wheatleafblotchform.html:116 -#: templates/cerealblotchmodels/wheatleafblotchform.html:127 -msgid "Preparation dose" -msgstr "Dose" - -#: templates/cerealblotchmodels/barleynetblotchform.html:115 -#: templates/cerealblotchmodels/wheatleafblotchform.html:143 -msgid "Model is running, please wait" -msgstr "Modellen kjører, vennligst vent" - -#: templates/cerealblotchmodels/barleynetblotchform.html:126 -#: templates/cerealblotchmodels/wheatleafblotchform.html:154 -msgid "Scroll past chart by swiping the dotted line on the right" -msgstr "Rull forbi diagram ved å sveipe den prikkede linjen til høyre" - -#: templates/cerealblotchmodels/barleynetblotchform.html:152 -#: templates/cerealblotchmodels/wheatleafblotchform.html:180 -msgid "Missing observation information" -msgstr "Observasjonsinformasjon mangler" - -#: templates/cerealblotchmodels/barleynetblotchform.html:161 -#: templates/cerealblotchmodels/wheatleafblotchform.html:189 -msgid "Missing spraying information" -msgstr "Sprøyteinformasjon mangler" - -#: templates/cerealblotchmodels/barleynetblotchform.html:194 -#: templates/cerealblotchmodels/wheatleafblotchform.html:256 -msgid "Temperature, daily mean" -msgstr "Temperatur, døgngjennomsnitt" - -#: templates/cerealblotchmodels/barleynetblotchform.html:195 -msgid "Rain last 28 days" -msgstr "Regn siste 28 døgn" - -#: templates/cerealblotchmodels/barleynetblotchform.html:196 -msgid "Rain, daily" -msgstr "Regn, daglig" - -#: templates/cerealblotchmodels/barleynetblotchform.html:197 -msgid "Day degrees since sowing" -msgstr "Døgngrader siden såing" - -#: templates/cerealblotchmodels/barleynetblotchform.html:198 -#: templates/cerealblotchmodels/barleynetblotchform.html:265 -#: templates/cerealblotchmodels/wheatleafblotchform.html:257 -#: templates/cerealblotchmodels/wheatleafblotchform.html:328 -msgid "Threshold" -msgstr "Terskelverdi" - -#: templates/cerealblotchmodels/barleynetblotchform.html:199 -#: templates/cerealblotchmodels/barleynetblotchform.html:266 -#: templates/cerealblotchmodels/wheatleafblotchform.html:258 -#: templates/cerealblotchmodels/wheatleafblotchform.html:329 -msgid "Disease" -msgstr "Sykdom" - -#: templates/cerealblotchmodels/barleynetblotchform.html:249 -#: templates/cerealblotchmodels/wheatleafblotchform.html:312 -msgid "No data returned" -msgstr "Ingen data returnert" - -#: templates/cerealblotchmodels/barleynetblotchform.html:262 -#: templates/cerealblotchmodels/wheatleafblotchform.html:325 -msgid "Disease value" -msgstr "Sykdomsverdi" - -#: templates/cerealblotchmodels/barleynetblotchform.html:269 -msgid "Barley net blotch development" -msgstr "Utvikling av byggbrunflekk" - -#: templates/cerealblotchmodels/barleynetblotchform.html:307 -#: templates/cerealblotchmodels/wheatleafblotchform.html:373 -msgid "Select crop" -msgstr "Velg kultur" - -#: templates/cerealblotchmodels/barleynetblotchform.html:335 -#: templates/cerealblotchmodels/wheatleafblotchform.html:413 -msgid "Select preparation" -msgstr "Velg plantevernmiddel" - -#: templates/cerealblotchmodels/barleynetblotchform.html:364 -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:210 -#: templates/cerealblotchmodels/wheatleafblotchform.html:445 -msgid "" -"WARNING: We suspect you are using Internet Explorer to view this site. VIPS " -"is not designed to work with Internet Explorer, you may experience errors " -"and missing features. Please use a different browser, like Microsoft Edge or " -"Google Chrome." -msgstr "" -"ADVARSEL: Det ser ut som du bruker Internet Explorer på denne websiden. VIPS " -"er ikke designet for å fungere med Internet Explorer, så du må forvente feil " -"og manglende funksjonalitet. Vennligst bruk en moderne nettleser som " -"Microsoft Edge, Firefox eller Google Chrome." - -#: templates/cerealblotchmodels/index.html:25 -#: templates/cerealblotchmodels/index.html:27 -msgid "Cereal blotch models" -msgstr "Bladflekksjukdommer i korn" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:29 -msgid "" -"Fuktmodellen er et beslutningsstøtteverktøy, utviklet av <a href='https://" -"www.seges.dk/'>SEGES</a>, Danmark, for å kunne vurdere risiko for angrep av " -"hvetebladprikk i høsthvete under danske forhold. <a href='/forecasts/models/" -"SEPTORIAHU/' target='new'>Les mer</a>" -msgstr "" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:33 -msgid "Background data" -msgstr "Bakgrunnsdata" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:53 -msgid "Sprayings" -msgstr "Utførte sprøytinger" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:55 -msgid "Spraying 1" -msgstr "Sprøytedato 1" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:60 -msgid "Spraying 2" -msgstr "Sprøytedato 2" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:70 -msgid "Phenology" -msgstr "Dato for utviklingsstadium" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:72 -msgid "Growth stage 31" -msgstr "BBCH 31. Beg. strekning" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:77 -msgid "3rd upper leaf (gs 32)" -msgstr "BBCH 32. 2. leddknute synlig" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:82 -msgid "2nd upper leaf (gs 33)" -msgstr "BBCH 33. 3. leddknute synlig" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:87 -msgid "Upper leaf (gs 37-39)" -msgstr "BBCH 37-39. Flaggblad under utvikling" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:92 -msgid "All kernels fully developed (gs 75)" -msgstr "BBCH 75. Melkemodning" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:97 -msgid "Show advanced settings" -msgstr "Vis avanserte innstillinger" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:102 -msgid "Threshold values for humid hour" -msgstr "Terskelverdier for fuktighet" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:104 -msgid "Relative humidity" -msgstr "Relativ luftfuktighet" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:109 -msgid "Leaf wetness (min/hour)" -msgstr "Bladfukt (min/t)" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:114 -msgid "Precipitation" -msgstr "Nedbør" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:119 -msgid "Sliding hours past (hours)" -msgstr "Referanseperiode, bakover (timer)" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:124 -msgid "Sliding hours ahead (hours)" -msgstr "Prognoseperiode, fremover (timer)" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:132 -msgid "Other threshold values" -msgstr "Andre terskelverdier" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:134 -msgid "Number of consecutive 'humid hours'" -msgstr "Antall sammenhengende \"fuktige timer\"" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:139 -msgid "Spraying protection days" -msgstr "Forv. ant. dager beskyttelse etter sprøyting" - -#: templates/cerealblotchmodels/septoriahumiditymodelform.html:144 -msgid "Leaf life time (days)" -msgstr "Levetid for blad (dager)" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:25 -#: templates/cerealblotchmodels/wheatleafblotchform.html:34 -msgid "Wheat leaf blotch" -msgstr "Bladflekksjukdommer i hvete" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:39 -msgid "Background data for the wheat leaf blotch model" -msgstr "Bakgrunnsdata for bladflekksjukdomsmodellen" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:62 -msgid "Wheat variety" -msgstr "Hvetesort" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:69 -msgid "Previous crop was wheat" -msgstr "Fjorårets vekst var hvete" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:92 -msgid "Spraying" -msgstr "Sprøytinger" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:99 -msgid "Preparation 1" -msgstr "Plantevernmiddel 1" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:110 -msgid "Preparation 2" -msgstr "Plantevernmiddel 2" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:121 -msgid "Preparation 3" -msgstr "Plantevernmiddel 3" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:197 -msgid "Missing spraying information on second preparation" -msgstr "Sprøyteinformasjon mangler" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:208 -msgid "Too early to calculate risk" -msgstr "For tidlig å beregne risiko" - -#: templates/cerealblotchmodels/wheatleafblotchform.html:332 -msgid "Wheat leaf blotch development" -msgstr "Utvikling av bladflekksjukdom i hvete" diff --git a/cerealblotchmodels/urls.py b/cerealblotchmodels/urls.py index 375b0ccd0435ca8014d7f834ae6be8f8bcda0a25..e4368fe9d1603f1442fe5d7eb6050f19bada898e 100755 --- a/cerealblotchmodels/urls.py +++ b/cerealblotchmodels/urls.py @@ -15,14 +15,15 @@ # You should have received a copy of the NIBIO Open Source License # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url + +from django.urls import re_path from cerealblotchmodels import views app_name = "cerealblotchmodels" urlpatterns = [ # ex: /forecasts/ - url(r'^$', views.index, name='index'), - url(r'barleynetblotch/', views.barleynetblotchform, name='barleynetblotchform'), - url(r'septoriahumidity/', views.septoriahumidityform, name='septoriahumidityform') + re_path(r'^$', views.index, name='index'), + re_path(r'barleynetblotch/', views.barleynetblotchform, name='barleynetblotchform'), + re_path(r'septoriahumidity/', views.septoriahumidityform, name='septoriahumidityform') ] \ No newline at end of file diff --git a/cydiapomonella/urls.py b/cydiapomonella/urls.py index f5a4c4f6c80ba749dc9d50059cca79bb76120295..5005bba0554d72f317d49fab6a4214057d665fc5 100644 --- a/cydiapomonella/urls.py +++ b/cydiapomonella/urls.py @@ -1,9 +1,10 @@ -from django.conf.urls import url + +from django.urls import re_path from . import views urlpatterns = [ - url(r'^$', views.index,name='index'), + re_path(r'^$', views.index,name='index'), ] diff --git a/forecasts/models.py b/forecasts/models.py index 731375b52c052088033265b52c1cd231b4dc4878..cf56d7542afa24a628cd6da3012929a73cac375b 100755 --- a/forecasts/models.py +++ b/forecasts/models.py @@ -22,7 +22,7 @@ import requests import json from decimal import Decimal, InvalidOperation -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.conf import settings from django.db import models from django.utils import translation diff --git a/forecasts/urls.py b/forecasts/urls.py index ef8c0bb0d33bd68f5f977ea1d82cd288c3b06158..9c3499ec655f14f1c02dd877988c9951d3198eea 100755 --- a/forecasts/urls.py +++ b/forecasts/urls.py @@ -15,7 +15,8 @@ # You should have received a copy of the NIBIO Open Source License # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url + +from django.urls import re_path from django.views.decorators.cache import cache_page from forecasts import views @@ -24,16 +25,16 @@ app_name="forecasts" urlpatterns = [ # ex: /forecasts/ - url(r'^$', views.index, name='index'), + re_path(r'^$', views.index, name='index'), # ex: /forecasts/5/ #url(r'^(?P<forecast_id>\d+)/detail_highcharts_json/$', cache_page(60 * 15)(views.detail_highcharts_json), name='detail_highcharts_json'), - url(r'^(?P<forecast_id>-?\d+)/detail_highcharts_json/$', views.detail_highcharts_json, name='detail_highcharts_json'), + re_path(r'^(?P<forecast_id>-?\d+)/detail_highcharts_json/$', views.detail_highcharts_json, name='detail_highcharts_json'), #url(r'^(?P<forecast_id>\d+)/$', cache_page(60 * 15)(views.detail), name='detail'), - url(r'^(?P<forecast_id>-?\d+)/$', (views.detail), name='detail'), - url(r'^(?P<forecast_id>-?\d+)/(?P<latest_days>\d+)/$', (views.detail_latest_days), name='detail_latest_days'), - url(r'^models/test/$', views.models_detail_test, name='models_detail_test'), - url(r'^models/(?P<model_id>\w+)/$', views.models_detail, name='models_detail'), - url(r'^models/js/modelLocalNames.js', cache_page(60 * 30)(views.model_local_names_js), name='model_local_names_js'), - url(r'^models/$', views.models_index, name='models_index'), + re_path(r'^(?P<forecast_id>-?\d+)/$', (views.detail), name='detail'), + re_path(r'^(?P<forecast_id>-?\d+)/(?P<latest_days>\d+)/$', (views.detail_latest_days), name='detail_latest_days'), + re_path(r'^models/test/$', views.models_detail_test, name='models_detail_test'), + re_path(r'^models/(?P<model_id>\w+)/$', views.models_detail, name='models_detail'), + re_path(r'^models/js/modelLocalNames.js', cache_page(60 * 30)(views.model_local_names_js), name='model_local_names_js'), + re_path(r'^models/$', views.models_index, name='models_index'), ] \ No newline at end of file diff --git a/fusarium/urls.py b/fusarium/urls.py index e7b9cc8e48776a47e7771c8b163dde4813c5bb75..9fb1f77f68c7553c518ba04bc2e8512e632b1345 100755 --- a/fusarium/urls.py +++ b/fusarium/urls.py @@ -16,12 +16,11 @@ # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url - +from django.urls import re_path from fusarium import views app_name = "fusarium" urlpatterns = [ - url(r'^$', views.index, name='index'), + re_path(r'^$', views.index, name='index'), ] \ No newline at end of file diff --git a/information/models.py b/information/models.py index 6594c756b70db36f6bbf1a057b1eb5b7efacdde2..1911f446918a8b466d6cd48c126bb53b41220115 100755 --- a/information/models.py +++ b/information/models.py @@ -1,4 +1,4 @@ -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.db import models from tinymce import models as tinymce_models from django.conf import settings diff --git a/information/urls.py b/information/urls.py index cbbea48875ea001a90f86ba14a4eb089ead9215c..c13d2d73615216771a0bd2aaf81741523ec3d767 100755 --- a/information/urls.py +++ b/information/urls.py @@ -16,15 +16,14 @@ # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url - +from django.urls import re_path from information import views app_name = "information" urlpatterns = [ # ex: /messages/ - url(r'^$', views.index, name='index'), + re_path(r'^$', views.index, name='index'), # ex: /messages/5/ - url(r'^(?P<information_id>\d+)/$', views.detail, name='detail'), + re_path(r'^(?P<information_id>\d+)/$', views.detail, name='detail'), ] \ No newline at end of file diff --git a/mock/urls.py b/mock/urls.py index 76901112a6860351b8028b43b081c6f01b4c2106..c30c0dd0f53185d7d1aee1b8906a19f3d05557a2 100644 --- a/mock/urls.py +++ b/mock/urls.py @@ -16,11 +16,11 @@ # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url +from django.urls import re_path from mock import views app_name = "mock" urlpatterns = [ - url(r'^zymogridmapclient/$', views.zymogridmapclient, name='zymogridmapclient'), + re_path(r'^zymogridmapclient/$', views.zymogridmapclient, name='zymogridmapclient'), ] diff --git a/observations/urls.py b/observations/urls.py index 256641870add185a2fb11dd6ca3a79138a090706..09e94d6fc4de20141c21e7fc16c5f04a0c1c706a 100755 --- a/observations/urls.py +++ b/observations/urls.py @@ -15,7 +15,8 @@ # You should have received a copy of the NIBIO Open Source License # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url +#from django.conf.urls import url +from django.urls import re_path #from django.views.decorators.cache import cache_page from observations import views @@ -24,8 +25,8 @@ app_name = "observations" urlpatterns = [ # ex: /forecasts/ - url(r'^$', views.index, name='index'), - url(r'old', views.index_old, name='index_old'), + re_path(r'^$', views.index, name='index'), + re_path(r'old', views.index_old, name='index_old'), # ex: /observations/5/ - url(r'^(?P<observation_id>\d+)/$', (views.detail), name='detail'), + re_path(r'^(?P<observation_id>\d+)/$', (views.detail), name='detail'), ] \ No newline at end of file diff --git a/organisms/urls.py b/organisms/urls.py index 5055042aa86db69e5cadfd2155738c001357f041..b597deb886cc0205166f4086ea661056aca62731 100755 --- a/organisms/urls.py +++ b/organisms/urls.py @@ -16,7 +16,7 @@ # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url +from django.urls import re_path from organisms import views @@ -24,7 +24,7 @@ app_name = "organisms" urlpatterns = [ # ex: /organisms/ - url(r'^$', views.index, name='index'), + re_path(r'^$', views.index, name='index'), # ex: /organisms/5/ #url(r'^(?P<organism_id>\d+)/$', views.detail, name='detail'), ] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index daa73cc54fc3dc48a307d56699b0a1bafda54b8b..607d193b5b25c5d79d0ebf848d119bd3fa4e9973 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # -# Copyright (c) 2016 NIBIO <http://www.nibio.no/>. +# Copyright (c) 2023 NIBIO <http://www.nibio.no/>. # # This file is part of VIPSWeb. # VIPSWeb is free software: you can redistribute it and/or modify @@ -18,11 +18,12 @@ # Please add requirements here # Read docs for how this works: http://www.pip-installer.org/en/latest/cookbook.html -Django==3.1.3 +Django==4.1.5 Pillow -requests==2.25.0 -django-tinymce==2.8.0 -python-dateutil==2.8.1 +requests==2.28.1 +django-tinymce==3.5.0 +python-dateutil==2.8.2 django-extensions selenium -python-memcached +#python-memcached +pymemcache diff --git a/roughage/urls.py b/roughage/urls.py index 36a7163778fba5225c80ed79fd08176b72f8ad93..d5b771515ca2f0b21ea190945c3cf21a2b884150 100755 --- a/roughage/urls.py +++ b/roughage/urls.py @@ -16,13 +16,13 @@ # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url +from django.urls import re_path from roughage import views app_name = "roughage" urlpatterns = [ - url(r'^nutrition/calibration/$', views.nutrition_calibration), - url(r'^nutrition/$', views.nutrition) + re_path(r'^nutrition/calibration/$', views.nutrition_calibration), + re_path(r'^nutrition/$', views.nutrition) ] \ No newline at end of file diff --git a/security/urls.py b/security/urls.py index 4e2f775711b99529740b961d85d8c4fa3f2a3a52..88849498a7b6a84943824f0fceab6f264c900ad1 100755 --- a/security/urls.py +++ b/security/urls.py @@ -16,14 +16,14 @@ # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url +from django.urls import re_path from security import views app_name = "security" urlpatterns = [ - url(r'^login/(?P<user_uuid>[^/]+)/$', views.login_user_uuid), - url(r'^login/$', views.login_form), - url(r'^logout/$', views.logout) + re_path(r'^login/(?P<user_uuid>[^/]+)/$', views.login_user_uuid), + re_path(r'^login/$', views.login_form), + re_path(r'^logout/$', views.logout) ] \ No newline at end of file diff --git a/vips_messages/models.py b/vips_messages/models.py index 16803ab6314b9590a858f01e9d8482a7c1d214b5..f4724ace674d330d263953b5c0c3e3d5939b3ab1 100755 --- a/vips_messages/models.py +++ b/vips_messages/models.py @@ -19,7 +19,7 @@ import requests from django.conf import settings from django.db import models -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from datetime import datetime class MessageTag: diff --git a/vips_messages/urls.py b/vips_messages/urls.py index 38f1f499a52386887390998b318fc32b7ff3200a..4a42a90ea5a07cb6523afc33f0220fa1c2f6dce1 100755 --- a/vips_messages/urls.py +++ b/vips_messages/urls.py @@ -16,7 +16,7 @@ # along with VIPSWeb. If not, see <http://www.nibio.no/licenses/>. # -from django.conf.urls import url +from django.urls import re_path from vips_messages import views @@ -24,8 +24,8 @@ app_name="vips_messages" urlpatterns = [ # ex: /messages/ - url(r'^$', views.index, name='index'), + re_path(r'^$', views.index, name='index'), # ex: /messages/5/ - url(r'^(?P<message_id>\d+)/$', views.detail, name='detail'), - url(r'^by_tag/json', views.messages_by_tag_json, name='messages_by_tag_json'), + re_path(r'^(?P<message_id>\d+)/$', views.detail, name='detail'), + re_path(r'^by_tag/json', views.messages_by_tag_json, name='messages_by_tag_json'), ] \ No newline at end of file