Skip to content

Commit

Permalink
Updated dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon committed Jul 26, 2024
1 parent 6e04232 commit d75a5c6
Show file tree
Hide file tree
Showing 7 changed files with 310 additions and 195 deletions.
11 changes: 5 additions & 6 deletions downtime/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.urls import path
from django.urls import path, re_path, include
from django.contrib import admin
from django.views.generic.base import TemplateView
from rest_framework.routers import DefaultRouter
Expand All @@ -37,10 +36,10 @@
)

urlpatterns = [
url(r'^$', DowntimeListView.as_view(), name='web-downtime-list'),
url(r'^api/', include(router.urls)),
url(r'^admin/', admin.site.urls),
url(r'^authprofile/', include(authprofile_urls)),
re_path(r'^$', DowntimeListView.as_view(), name='web-downtime-list'),
re_path(r'^api/', include(router.urls)),
re_path(r'^admin/', admin.site.urls),
re_path(r'^authprofile/', include(authprofile_urls)),
path('openapi/', schema_view, name='openapi-schema'),
path('redoc/', TemplateView.as_view(
template_name='redoc.html',
Expand Down
457 changes: 283 additions & 174 deletions poetry.lock

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[tool.poetry]
name = "downtime"
version = "2.4.1"
version = "2.4.3"
description = "Downtime API"
authors = ["OCS Authors"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.8"
django = ">=3.0,<3.3"
django-extensions = ">=3.1,<4.0"
django-filter = ">=2.2,<2.5"
django-bootstrap4 = ">21.1,<23.1"
django-cors-headers = ">=3.5,<3.8"
djangorestframework = ">=3.12.2,<3.13"
ocs-authentication = "0.1.0"
django = "^4"
django-extensions = "^3.2"
django-filter = "^24"
django-bootstrap4 = "^24"
django-cors-headers = "^4.4"
djangorestframework = "^3.15"
ocs-authentication = "^0.2"
requests = ">=2,<3"
whitenoise = ">=5.2,<6.0"
psycopg2-binary = ">=2.8,<2.9"
psycopg2-binary = ">=2.8,<2.10"
gunicorn = "20.0.4"
pyyaml = ">=6.0"
uritemplate = "3.0.1"
Expand Down
2 changes: 1 addition & 1 deletion schedule/configdb.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import requests
from django.core.cache import caches
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from django.conf import settings


Expand Down
2 changes: 1 addition & 1 deletion schedule/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.db import models
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _

from schedule.configdb import configdb

Expand Down
2 changes: 1 addition & 1 deletion schedule/serializers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rest_framework import serializers
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _

from schedule.models import Downtime
from schedule.configdb import configdb
Expand Down
13 changes: 10 additions & 3 deletions schedule/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,20 @@ def test_post_downtime_fails_if_not_logged_in(self):
self.client.post(reverse('downtime-list'), downtime)
self.assertEqual(Downtime.objects.count(), 0)

def test_post_downtime_fails_if_not_admin_user(self):
self.client.force_login(self.normal_user)