-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2821] Implement provisionary configuration for OpenKlant2 service
- Loading branch information
Showing
4 changed files
with
49 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from dataclasses import dataclass | ||
from urllib.parse import urljoin | ||
|
||
|
||
@dataclass | ||
class OpenKlant2Config: | ||
api_root: str | ||
api_path: str | ||
api_token: str | ||
|
||
# Question/Answer settings | ||
mijn_vragen_kanaal: str # e.g. "oip_mijn_vragen" | ||
mijn_vragen_organisatie_naam: str # e.g. "Open Inwoner Platform", | ||
|
||
@property | ||
def api_url(self): | ||
return urljoin(self.api_root, self.api_path) | ||
|
||
@classmethod | ||
def from_django_settings(cls): | ||
from django.conf import settings | ||
|
||
return cls(**settings.OPENKLANT2_CONFIG) |