Skip to content

Commit

Permalink
Merge pull request #198 from VNG-Realisatie/fix/notifications-flag
Browse files Browse the repository at this point in the history
feat: adds notification env flag
  • Loading branch information
joerivrij authored Mar 13, 2023
2 parents 690b1a7 + e43fe62 commit c279db7
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
Wijzigingen
===========

1.2.3 (2022-03-01)
===========

Implementation changes
----------------------

* Added ``ENV`` variable to turn off Notifications when running in a Container

1.2.2 (2022-02-22)
===========

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Documenten API
==============

:Version: 1.2.2
:Version: 1.2.3
:Source: https://github.com/VNG-Realisatie/documenten-api
:Keywords: zaken, zaakgericht werken, GEMMA, RGBZ, DRC

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drc",
"version": "1.2.2",
"version": "1.2.3",
"description": "drc referentie implementatie API",
"main": "src/index.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion src/drc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import re
from collections import namedtuple

__version__ = "1.2.2"
__version__ = "1.2.3"
__author__ = "VNG Realisatie"
__homepage__ = "https://github.com/VNG-Realisatie/documenten-api"
__docformat__ = "restructuredtext"
Expand Down
2 changes: 1 addition & 1 deletion src/drc/api/tests/test_dso_api_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_api_19_documentation_version_yaml(self):
@override_settings(ROOT_URLCONF="drc.api.tests.test_urls")
def test_api_24_version_header(self):
response = self.client.get("/test-view")
self.assertEqual(response["API-version"], "1.2.2")
self.assertEqual(response["API-version"], "1.2.3")


class DSOApi50Tests(APITestCase):
Expand Down
2 changes: 1 addition & 1 deletion src/drc/conf/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from vng_api_common.conf.api import * # noqa - imports white-listed

API_VERSION = "1.2.2"
API_VERSION = "1.2.3"

REST_FRAMEWORK = BASE_REST_FRAMEWORK.copy()
REST_FRAMEWORK["PAGE_SIZE"] = 100
Expand Down
3 changes: 3 additions & 0 deletions src/drc/conf/dev.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os
import sys

from .docker import getenv # noqa isort:skip

os.environ.setdefault(
"SECRET_KEY", "%jp_t1u42ldzeb4s2d4tqj3ythtm)2)^ph%-b71#$*7_=&-(!g"
)
Expand Down Expand Up @@ -58,6 +60,7 @@
# Custom settings
#
ENVIRONMENT = "development"
NOTIFICATIONS_DISABLED = bool(getenv("NOTIFICATIONS_DISABLED", False))

#
# Library settings
Expand Down
3 changes: 3 additions & 0 deletions src/drc/conf/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def getenv(key, default=None, required=False, split=False):
# Additional Django settings
#

# turn off notifications in containers
NOTIFICATIONS_DISABLED = bool(getenv("NOTIFICATIONS_DISABLED", False))

# Disable security measures for development
SESSION_COOKIE_SECURE = getenv("SESSION_COOKIE_SECURE", False)
SESSION_COOKIE_HTTPONLY = getenv("SESSION_COOKIE_HTTPONLY", False)
Expand Down
2 changes: 1 addition & 1 deletion src/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: Documenten API
version: 1.2.2
version: 1.2.3
description:
"Een API om een documentregistratiecomponent (DRC) te benaderen.\n\n\
In een documentregistratiecomponent worden INFORMATIEOBJECTen opgeslagen. Een\n\
Expand Down

0 comments on commit c279db7

Please sign in to comment.