Skip to content

Commit

Permalink
add new config CONTACT_ADDRESS [CPCN-287] (#130)
Browse files Browse the repository at this point in the history
* add new config CONTACT_ADDRESS

* reformat code via black
  • Loading branch information
devketanpro authored Sep 8, 2023
1 parent d364255 commit 07e0666
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

SITE_NAME = "CP NewsPro"
COPYRIGHT_HOLDER = "CP"
CONTACT_ADDRESS = None

SERVICES = [
{"name": "Domestic Sport", "code": "t"},
Expand Down Expand Up @@ -78,23 +79,27 @@
# ``CLIENT_CONFIG`` references ``CLIENT_LOCALE_FORMATS`` by reference
# So we can safely update these dicts without needing to specify all formats
# And they will be all reflected in the ``CLIENT_CONFIG.locale_formats`` config
CLIENT_LOCALE_FORMATS["en"].update({
"TIME_FORMAT": "HH:mm",
"DATE_FORMAT": "MMM Do, YYYY",
"COVERAGE_DATE_FORMAT": "MMM Do, YYYY",
"COVERAGE_DATE_TIME_FORMAT": "HH:mm MMM Do, YYYY",
"DATE_FORMAT_HEADER": "long", # babel
})
CLIENT_LOCALE_FORMATS["fr_CA"].update({
"TIME_FORMAT": "HH:mm",
"DATE_FORMAT": "Do MMMM YYYY",
"COVERAGE_DATE_FORMAT": "LL",
"DATETIME_FORMAT": "HH:mm [le] Do MMMM YYYY",
"COVERAGE_DATE_TIME_FORMAT": "HH:mm [le] Do MMMM YYYY",
"DATE_FORMAT_HEADER": "d MMMM yyyy à H:mm zzz", # babel
"AGENDA_DATE_FORMAT_SHORT": "dddd, D MMMM",
"AGENDA_DATE_FORMAT_LONG": "dddd, D MMMM YYYY",
})
CLIENT_LOCALE_FORMATS["en"].update(
{
"TIME_FORMAT": "HH:mm",
"DATE_FORMAT": "MMM Do, YYYY",
"COVERAGE_DATE_FORMAT": "MMM Do, YYYY",
"COVERAGE_DATE_TIME_FORMAT": "HH:mm MMM Do, YYYY",
"DATE_FORMAT_HEADER": "long", # babel
}
)
CLIENT_LOCALE_FORMATS["fr_CA"].update(
{
"TIME_FORMAT": "HH:mm",
"DATE_FORMAT": "Do MMMM YYYY",
"COVERAGE_DATE_FORMAT": "LL",
"DATETIME_FORMAT": "HH:mm [le] Do MMMM YYYY",
"COVERAGE_DATE_TIME_FORMAT": "HH:mm [le] Do MMMM YYYY",
"DATE_FORMAT_HEADER": "d MMMM yyyy à H:mm zzz", # babel
"AGENDA_DATE_FORMAT_SHORT": "dddd, D MMMM",
"AGENDA_DATE_FORMAT_LONG": "dddd, D MMMM YYYY",
}
)

CLIENT_CONFIG.update(
{
Expand Down

0 comments on commit 07e0666

Please sign in to comment.