Refs #33476 -- Reformatted code with Black.

This commit is contained in:
django-bot 2022-02-03 20:24:19 +01:00 committed by Mariusz Felisiak
parent f68fa8b45d
commit 9c19aff7c7
1992 changed files with 139577 additions and 96284 deletions

View File

@ -1,6 +1,6 @@
from django.utils.version import get_version from django.utils.version import get_version
VERSION = (4, 1, 0, 'alpha', 0) VERSION = (4, 1, 0, "alpha", 0)
__version__ = get_version(VERSION) __version__ = get_version(VERSION)
@ -19,6 +19,6 @@ def setup(set_prefix=True):
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
if set_prefix: if set_prefix:
set_script_prefix( set_script_prefix(
'/' if settings.FORCE_SCRIPT_NAME is None else settings.FORCE_SCRIPT_NAME "/" if settings.FORCE_SCRIPT_NAME is None else settings.FORCE_SCRIPT_NAME
) )
apps.populate(settings.INSTALLED_APPS) apps.populate(settings.INSTALLED_APPS)

View File

@ -1,4 +1,4 @@
from .config import AppConfig from .config import AppConfig
from .registry import apps from .registry import apps
__all__ = ['AppConfig', 'apps'] __all__ = ["AppConfig", "apps"]

View File

@ -6,8 +6,8 @@ from django.core.exceptions import ImproperlyConfigured
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.module_loading import import_string, module_has_submodule from django.utils.module_loading import import_string, module_has_submodule
APPS_MODULE_NAME = 'apps' APPS_MODULE_NAME = "apps"
MODELS_MODULE_NAME = 'models' MODELS_MODULE_NAME = "models"
class AppConfig: class AppConfig:
@ -30,7 +30,7 @@ class AppConfig:
# Last component of the Python path to the application e.g. 'admin'. # Last component of the Python path to the application e.g. 'admin'.
# This value must be unique across a Django project. # This value must be unique across a Django project.
if not hasattr(self, 'label'): if not hasattr(self, "label"):
self.label = app_name.rpartition(".")[2] self.label = app_name.rpartition(".")[2]
if not self.label.isidentifier(): if not self.label.isidentifier():
raise ImproperlyConfigured( raise ImproperlyConfigured(
@ -38,12 +38,12 @@ class AppConfig:
) )
# Human-readable name for the application e.g. "Admin". # Human-readable name for the application e.g. "Admin".
if not hasattr(self, 'verbose_name'): if not hasattr(self, "verbose_name"):
self.verbose_name = self.label.title() self.verbose_name = self.label.title()
# Filesystem path to the application directory e.g. # Filesystem path to the application directory e.g.
# '/path/to/django/contrib/admin'. # '/path/to/django/contrib/admin'.
if not hasattr(self, 'path'): if not hasattr(self, "path"):
self.path = self._path_from_module(app_module) self.path = self._path_from_module(app_module)
# Module containing models e.g. <module 'django.contrib.admin.models' # Module containing models e.g. <module 'django.contrib.admin.models'
@ -56,11 +56,12 @@ class AppConfig:
self.models = None self.models = None
def __repr__(self): def __repr__(self):
return '<%s: %s>' % (self.__class__.__name__, self.label) return "<%s: %s>" % (self.__class__.__name__, self.label)
@cached_property @cached_property
def default_auto_field(self): def default_auto_field(self):
from django.conf import settings from django.conf import settings
return settings.DEFAULT_AUTO_FIELD return settings.DEFAULT_AUTO_FIELD
@property @property
@ -72,9 +73,9 @@ class AppConfig:
# See #21874 for extended discussion of the behavior of this method in # See #21874 for extended discussion of the behavior of this method in
# various cases. # various cases.
# Convert to list because __path__ may not support indexing. # Convert to list because __path__ may not support indexing.
paths = list(getattr(module, '__path__', [])) paths = list(getattr(module, "__path__", []))
if len(paths) != 1: if len(paths) != 1:
filename = getattr(module, '__file__', None) filename = getattr(module, "__file__", None)
if filename is not None: if filename is not None:
paths = [os.path.dirname(filename)] paths = [os.path.dirname(filename)]
else: else:
@ -85,12 +86,14 @@ class AppConfig:
raise ImproperlyConfigured( raise ImproperlyConfigured(
"The app module %r has multiple filesystem locations (%r); " "The app module %r has multiple filesystem locations (%r); "
"you must configure this app with an AppConfig subclass " "you must configure this app with an AppConfig subclass "
"with a 'path' class attribute." % (module, paths)) "with a 'path' class attribute." % (module, paths)
)
elif not paths: elif not paths:
raise ImproperlyConfigured( raise ImproperlyConfigured(
"The app module %r has no filesystem location, " "The app module %r has no filesystem location, "
"you must configure this app with an AppConfig subclass " "you must configure this app with an AppConfig subclass "
"with a 'path' class attribute." % module) "with a 'path' class attribute." % module
)
return paths[0] return paths[0]
@classmethod @classmethod
@ -116,7 +119,7 @@ class AppConfig:
# If the apps module defines more than one AppConfig subclass, # If the apps module defines more than one AppConfig subclass,
# the default one can declare default = True. # the default one can declare default = True.
if module_has_submodule(app_module, APPS_MODULE_NAME): if module_has_submodule(app_module, APPS_MODULE_NAME):
mod_path = '%s.%s' % (entry, APPS_MODULE_NAME) mod_path = "%s.%s" % (entry, APPS_MODULE_NAME)
mod = import_module(mod_path) mod = import_module(mod_path)
# Check if there's exactly one AppConfig candidate, # Check if there's exactly one AppConfig candidate,
# excluding those that explicitly define default = False. # excluding those that explicitly define default = False.
@ -124,9 +127,9 @@ class AppConfig:
(name, candidate) (name, candidate)
for name, candidate in inspect.getmembers(mod, inspect.isclass) for name, candidate in inspect.getmembers(mod, inspect.isclass)
if ( if (
issubclass(candidate, cls) and issubclass(candidate, cls)
candidate is not cls and and candidate is not cls
getattr(candidate, 'default', True) and getattr(candidate, "default", True)
) )
] ]
if len(app_configs) == 1: if len(app_configs) == 1:
@ -137,13 +140,13 @@ class AppConfig:
app_configs = [ app_configs = [
(name, candidate) (name, candidate)
for name, candidate in app_configs for name, candidate in app_configs
if getattr(candidate, 'default', False) if getattr(candidate, "default", False)
] ]
if len(app_configs) > 1: if len(app_configs) > 1:
candidates = [repr(name) for name, _ in app_configs] candidates = [repr(name) for name, _ in app_configs]
raise RuntimeError( raise RuntimeError(
'%r declares more than one default AppConfig: ' "%r declares more than one default AppConfig: "
'%s.' % (mod_path, ', '.join(candidates)) "%s." % (mod_path, ", ".join(candidates))
) )
elif len(app_configs) == 1: elif len(app_configs) == 1:
app_config_class = app_configs[0][1] app_config_class = app_configs[0][1]
@ -165,7 +168,7 @@ class AppConfig:
# If the last component of entry starts with an uppercase letter, # If the last component of entry starts with an uppercase letter,
# then it was likely intended to be an app config class; if not, # then it was likely intended to be an app config class; if not,
# an app module. Provide a nice error message in both cases. # an app module. Provide a nice error message in both cases.
mod_path, _, cls_name = entry.rpartition('.') mod_path, _, cls_name = entry.rpartition(".")
if mod_path and cls_name[0].isupper(): if mod_path and cls_name[0].isupper():
# We could simply re-trigger the string import exception, but # We could simply re-trigger the string import exception, but
# we're going the extra mile and providing a better error # we're going the extra mile and providing a better error
@ -178,9 +181,12 @@ class AppConfig:
for name, candidate in inspect.getmembers(mod, inspect.isclass) for name, candidate in inspect.getmembers(mod, inspect.isclass)
if issubclass(candidate, cls) and candidate is not cls if issubclass(candidate, cls) and candidate is not cls
] ]
msg = "Module '%s' does not contain a '%s' class." % (mod_path, cls_name) msg = "Module '%s' does not contain a '%s' class." % (
mod_path,
cls_name,
)
if candidates: if candidates:
msg += ' Choices are: %s.' % ', '.join(candidates) msg += " Choices are: %s." % ", ".join(candidates)
raise ImportError(msg) raise ImportError(msg)
else: else:
# Re-trigger the module import exception. # Re-trigger the module import exception.
@ -189,8 +195,7 @@ class AppConfig:
# Check for obvious errors. (This check prevents duck typing, but # Check for obvious errors. (This check prevents duck typing, but
# it could be removed if it became a problem in practice.) # it could be removed if it became a problem in practice.)
if not issubclass(app_config_class, AppConfig): if not issubclass(app_config_class, AppConfig):
raise ImproperlyConfigured( raise ImproperlyConfigured("'%s' isn't a subclass of AppConfig." % entry)
"'%s' isn't a subclass of AppConfig." % entry)
# Obtain app name here rather than in AppClass.__init__ to keep # Obtain app name here rather than in AppClass.__init__ to keep
# all error checking for entries in INSTALLED_APPS in one place. # all error checking for entries in INSTALLED_APPS in one place.
@ -198,16 +203,15 @@ class AppConfig:
try: try:
app_name = app_config_class.name app_name = app_config_class.name
except AttributeError: except AttributeError:
raise ImproperlyConfigured( raise ImproperlyConfigured("'%s' must supply a name attribute." % entry)
"'%s' must supply a name attribute." % entry
)
# Ensure app_name points to a valid module. # Ensure app_name points to a valid module.
try: try:
app_module = import_module(app_name) app_module = import_module(app_name)
except ImportError: except ImportError:
raise ImproperlyConfigured( raise ImproperlyConfigured(
"Cannot import '%s'. Check that '%s.%s.name' is correct." % ( "Cannot import '%s'. Check that '%s.%s.name' is correct."
% (
app_name, app_name,
app_config_class.__module__, app_config_class.__module__,
app_config_class.__qualname__, app_config_class.__qualname__,
@ -231,7 +235,8 @@ class AppConfig:
return self.models[model_name.lower()] return self.models[model_name.lower()]
except KeyError: except KeyError:
raise LookupError( raise LookupError(
"App '%s' doesn't have a '%s' model." % (self.label, model_name)) "App '%s' doesn't have a '%s' model." % (self.label, model_name)
)
def get_models(self, include_auto_created=False, include_swapped=False): def get_models(self, include_auto_created=False, include_swapped=False):
""" """
@ -260,7 +265,7 @@ class AppConfig:
self.models = self.apps.all_models[self.label] self.models = self.apps.all_models[self.label]
if module_has_submodule(self.module, MODELS_MODULE_NAME): if module_has_submodule(self.module, MODELS_MODULE_NAME):
models_module_name = '%s.%s' % (self.name, MODELS_MODULE_NAME) models_module_name = "%s.%s" % (self.name, MODELS_MODULE_NAME)
self.models_module = import_module(models_module_name) self.models_module = import_module(models_module_name)
def ready(self): def ready(self):

View File

@ -21,7 +21,7 @@ class Apps:
# installed_apps is set to None when creating the master registry # installed_apps is set to None when creating the master registry
# because it cannot be populated at that point. Other registries must # because it cannot be populated at that point. Other registries must
# provide a list of installed apps and are populated immediately. # provide a list of installed apps and are populated immediately.
if installed_apps is None and hasattr(sys.modules[__name__], 'apps'): if installed_apps is None and hasattr(sys.modules[__name__], "apps"):
raise RuntimeError("You must supply an installed_apps argument.") raise RuntimeError("You must supply an installed_apps argument.")
# Mapping of app labels => model names => model classes. Every time a # Mapping of app labels => model names => model classes. Every time a
@ -92,20 +92,22 @@ class Apps:
if app_config.label in self.app_configs: if app_config.label in self.app_configs:
raise ImproperlyConfigured( raise ImproperlyConfigured(
"Application labels aren't unique, " "Application labels aren't unique, "
"duplicates: %s" % app_config.label) "duplicates: %s" % app_config.label
)
self.app_configs[app_config.label] = app_config self.app_configs[app_config.label] = app_config
app_config.apps = self app_config.apps = self
# Check for duplicate app names. # Check for duplicate app names.
counts = Counter( counts = Counter(
app_config.name for app_config in self.app_configs.values()) app_config.name for app_config in self.app_configs.values()
duplicates = [ )
name for name, count in counts.most_common() if count > 1] duplicates = [name for name, count in counts.most_common() if count > 1]
if duplicates: if duplicates:
raise ImproperlyConfigured( raise ImproperlyConfigured(
"Application names aren't unique, " "Application names aren't unique, "
"duplicates: %s" % ", ".join(duplicates)) "duplicates: %s" % ", ".join(duplicates)
)
self.apps_ready = True self.apps_ready = True
@ -201,7 +203,7 @@ class Apps:
self.check_apps_ready() self.check_apps_ready()
if model_name is None: if model_name is None:
app_label, model_name = app_label.split('.') app_label, model_name = app_label.split(".")
app_config = self.get_app_config(app_label) app_config = self.get_app_config(app_label)
@ -217,17 +219,22 @@ class Apps:
model_name = model._meta.model_name model_name = model._meta.model_name
app_models = self.all_models[app_label] app_models = self.all_models[app_label]
if model_name in app_models: if model_name in app_models:
if (model.__name__ == app_models[model_name].__name__ and if (
model.__module__ == app_models[model_name].__module__): model.__name__ == app_models[model_name].__name__
and model.__module__ == app_models[model_name].__module__
):
warnings.warn( warnings.warn(
"Model '%s.%s' was already registered. " "Model '%s.%s' was already registered. "
"Reloading models is not advised as it can lead to inconsistencies, " "Reloading models is not advised as it can lead to inconsistencies, "
"most notably with related models." % (app_label, model_name), "most notably with related models." % (app_label, model_name),
RuntimeWarning, stacklevel=2) RuntimeWarning,
stacklevel=2,
)
else: else:
raise RuntimeError( raise RuntimeError(
"Conflicting '%s' models in application '%s': %s and %s." % "Conflicting '%s' models in application '%s': %s and %s."
(model_name, app_label, app_models[model_name], model)) % (model_name, app_label, app_models[model_name], model)
)
app_models[model_name] = model app_models[model_name] = model
self.do_pending_operations(model) self.do_pending_operations(model)
self.clear_cache() self.clear_cache()
@ -254,8 +261,8 @@ class Apps:
candidates = [] candidates = []
for app_config in self.app_configs.values(): for app_config in self.app_configs.values():
if object_name.startswith(app_config.name): if object_name.startswith(app_config.name):
subpath = object_name[len(app_config.name):] subpath = object_name[len(app_config.name) :]
if subpath == '' or subpath[0] == '.': if subpath == "" or subpath[0] == ".":
candidates.append(app_config) candidates.append(app_config)
if candidates: if candidates:
return sorted(candidates, key=lambda ac: -len(ac.name))[0] return sorted(candidates, key=lambda ac: -len(ac.name))[0]
@ -270,8 +277,7 @@ class Apps:
""" """
model = self.all_models[app_label].get(model_name.lower()) model = self.all_models[app_label].get(model_name.lower())
if model is None: if model is None:
raise LookupError( raise LookupError("Model '%s.%s' not registered." % (app_label, model_name))
"Model '%s.%s' not registered." % (app_label, model_name))
return model return model
@functools.lru_cache(maxsize=None) @functools.lru_cache(maxsize=None)
@ -403,6 +409,7 @@ class Apps:
def apply_next_model(model): def apply_next_model(model):
next_function = partial(apply_next_model.func, model) next_function = partial(apply_next_model.func, model)
self.lazy_model_operation(next_function, *more_models) self.lazy_model_operation(next_function, *more_models)
apply_next_model.func = function apply_next_model.func = function
# If the model has already been imported and registered, partially # If the model has already been imported and registered, partially

View File

@ -23,20 +23,20 @@ ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE"
# RemovedInDjango50Warning # RemovedInDjango50Warning
USE_DEPRECATED_PYTZ_DEPRECATED_MSG = ( USE_DEPRECATED_PYTZ_DEPRECATED_MSG = (
'The USE_DEPRECATED_PYTZ setting, and support for pytz timezones is ' "The USE_DEPRECATED_PYTZ setting, and support for pytz timezones is "
'deprecated in favor of the stdlib zoneinfo module. Please update your ' "deprecated in favor of the stdlib zoneinfo module. Please update your "
'code to use zoneinfo and remove the USE_DEPRECATED_PYTZ setting.' "code to use zoneinfo and remove the USE_DEPRECATED_PYTZ setting."
) )
USE_L10N_DEPRECATED_MSG = ( USE_L10N_DEPRECATED_MSG = (
'The USE_L10N setting is deprecated. Starting with Django 5.0, localized ' "The USE_L10N setting is deprecated. Starting with Django 5.0, localized "
'formatting of data will always be enabled. For example Django will ' "formatting of data will always be enabled. For example Django will "
'display numbers and dates using the format of the current locale.' "display numbers and dates using the format of the current locale."
) )
CSRF_COOKIE_MASKED_DEPRECATED_MSG = ( CSRF_COOKIE_MASKED_DEPRECATED_MSG = (
'The CSRF_COOKIE_MASKED transitional setting is deprecated. Support for ' "The CSRF_COOKIE_MASKED transitional setting is deprecated. Support for "
'it will be removed in Django 5.0.' "it will be removed in Django 5.0."
) )
@ -45,6 +45,7 @@ class SettingsReference(str):
String subclass which references a current settings value. It's treated as String subclass which references a current settings value. It's treated as
the value in memory but serializes to a settings.NAME attribute reference. the value in memory but serializes to a settings.NAME attribute reference.
""" """
def __new__(self, value, setting_name): def __new__(self, value, setting_name):
return str.__new__(self, value) return str.__new__(self, value)
@ -58,6 +59,7 @@ class LazySettings(LazyObject):
The user can manually configure settings prior to using them. Otherwise, The user can manually configure settings prior to using them. Otherwise,
Django uses the settings module pointed to by DJANGO_SETTINGS_MODULE. Django uses the settings module pointed to by DJANGO_SETTINGS_MODULE.
""" """
def _setup(self, name=None): def _setup(self, name=None):
""" """
Load the settings module pointed to by the environment variable. This Load the settings module pointed to by the environment variable. This
@ -71,16 +73,17 @@ class LazySettings(LazyObject):
"Requested %s, but settings are not configured. " "Requested %s, but settings are not configured. "
"You must either define the environment variable %s " "You must either define the environment variable %s "
"or call settings.configure() before accessing settings." "or call settings.configure() before accessing settings."
% (desc, ENVIRONMENT_VARIABLE)) % (desc, ENVIRONMENT_VARIABLE)
)
self._wrapped = Settings(settings_module) self._wrapped = Settings(settings_module)
def __repr__(self): def __repr__(self):
# Hardcode the class name as otherwise it yields 'Settings'. # Hardcode the class name as otherwise it yields 'Settings'.
if self._wrapped is empty: if self._wrapped is empty:
return '<LazySettings [Unevaluated]>' return "<LazySettings [Unevaluated]>"
return '<LazySettings "%(settings_module)s">' % { return '<LazySettings "%(settings_module)s">' % {
'settings_module': self._wrapped.SETTINGS_MODULE, "settings_module": self._wrapped.SETTINGS_MODULE,
} }
def __getattr__(self, name): def __getattr__(self, name):
@ -91,9 +94,9 @@ class LazySettings(LazyObject):
# Special case some settings which require further modification. # Special case some settings which require further modification.
# This is done here for performance reasons so the modified value is cached. # This is done here for performance reasons so the modified value is cached.
if name in {'MEDIA_URL', 'STATIC_URL'} and val is not None: if name in {"MEDIA_URL", "STATIC_URL"} and val is not None:
val = self._add_script_prefix(val) val = self._add_script_prefix(val)
elif name == 'SECRET_KEY' and not val: elif name == "SECRET_KEY" and not val:
raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
self.__dict__[name] = val self.__dict__[name] = val
@ -104,7 +107,7 @@ class LazySettings(LazyObject):
Set the value of setting. Clear all cached values if _wrapped changes Set the value of setting. Clear all cached values if _wrapped changes
(@override_settings does this) or clear single values when set. (@override_settings does this) or clear single values when set.
""" """
if name == '_wrapped': if name == "_wrapped":
self.__dict__.clear() self.__dict__.clear()
else: else:
self.__dict__.pop(name, None) self.__dict__.pop(name, None)
@ -122,11 +125,11 @@ class LazySettings(LazyObject):
argument must support attribute access (__getattr__)). argument must support attribute access (__getattr__)).
""" """
if self._wrapped is not empty: if self._wrapped is not empty:
raise RuntimeError('Settings already configured.') raise RuntimeError("Settings already configured.")
holder = UserSettingsHolder(default_settings) holder = UserSettingsHolder(default_settings)
for name, value in options.items(): for name, value in options.items():
if not name.isupper(): if not name.isupper():
raise TypeError('Setting %r must be uppercase.' % name) raise TypeError("Setting %r must be uppercase." % name)
setattr(holder, name, value) setattr(holder, name, value)
self._wrapped = holder self._wrapped = holder
@ -139,10 +142,11 @@ class LazySettings(LazyObject):
subpath to STATIC_URL and MEDIA_URL in settings is inconvenient. subpath to STATIC_URL and MEDIA_URL in settings is inconvenient.
""" """
# Don't apply prefix to absolute paths and URLs. # Don't apply prefix to absolute paths and URLs.
if value.startswith(('http://', 'https://', '/')): if value.startswith(("http://", "https://", "/")):
return value return value
from django.urls import get_script_prefix from django.urls import get_script_prefix
return '%s%s' % (get_script_prefix(), value)
return "%s%s" % (get_script_prefix(), value)
@property @property
def configured(self): def configured(self):
@ -161,14 +165,14 @@ class LazySettings(LazyObject):
RemovedInDjango50Warning, RemovedInDjango50Warning,
stacklevel=2, stacklevel=2,
) )
return self.__getattr__('USE_L10N') return self.__getattr__("USE_L10N")
# RemovedInDjango50Warning. # RemovedInDjango50Warning.
@property @property
def _USE_L10N_INTERNAL(self): def _USE_L10N_INTERNAL(self):
# Special hook to avoid checking a traceback in internal use on hot # Special hook to avoid checking a traceback in internal use on hot
# paths. # paths.
return self.__getattr__('USE_L10N') return self.__getattr__("USE_L10N")
class Settings: class Settings:
@ -184,7 +188,7 @@ class Settings:
mod = importlib.import_module(self.SETTINGS_MODULE) mod = importlib.import_module(self.SETTINGS_MODULE)
tuple_settings = ( tuple_settings = (
'ALLOWED_HOSTS', "ALLOWED_HOSTS",
"INSTALLED_APPS", "INSTALLED_APPS",
"TEMPLATE_DIRS", "TEMPLATE_DIRS",
"LOCALE_PATHS", "LOCALE_PATHS",
@ -195,39 +199,42 @@ class Settings:
if setting.isupper(): if setting.isupper():
setting_value = getattr(mod, setting) setting_value = getattr(mod, setting)
if (setting in tuple_settings and if setting in tuple_settings and not isinstance(
not isinstance(setting_value, (list, tuple))): setting_value, (list, tuple)
raise ImproperlyConfigured("The %s setting must be a list or a tuple." % setting) ):
raise ImproperlyConfigured(
"The %s setting must be a list or a tuple." % setting
)
setattr(self, setting, setting_value) setattr(self, setting, setting_value)
self._explicit_settings.add(setting) self._explicit_settings.add(setting)
if self.USE_TZ is False and not self.is_overridden('USE_TZ'): if self.USE_TZ is False and not self.is_overridden("USE_TZ"):
warnings.warn( warnings.warn(
'The default value of USE_TZ will change from False to True ' "The default value of USE_TZ will change from False to True "
'in Django 5.0. Set USE_TZ to False in your project settings ' "in Django 5.0. Set USE_TZ to False in your project settings "
'if you want to keep the current default behavior.', "if you want to keep the current default behavior.",
category=RemovedInDjango50Warning, category=RemovedInDjango50Warning,
) )
if self.is_overridden('USE_DEPRECATED_PYTZ'): if self.is_overridden("USE_DEPRECATED_PYTZ"):
warnings.warn(USE_DEPRECATED_PYTZ_DEPRECATED_MSG, RemovedInDjango50Warning) warnings.warn(USE_DEPRECATED_PYTZ_DEPRECATED_MSG, RemovedInDjango50Warning)
if self.is_overridden('CSRF_COOKIE_MASKED'): if self.is_overridden("CSRF_COOKIE_MASKED"):
warnings.warn(CSRF_COOKIE_MASKED_DEPRECATED_MSG, RemovedInDjango50Warning) warnings.warn(CSRF_COOKIE_MASKED_DEPRECATED_MSG, RemovedInDjango50Warning)
if hasattr(time, 'tzset') and self.TIME_ZONE: if hasattr(time, "tzset") and self.TIME_ZONE:
# When we can, attempt to validate the timezone. If we can't find # When we can, attempt to validate the timezone. If we can't find
# this file, no check happens and it's harmless. # this file, no check happens and it's harmless.
zoneinfo_root = Path('/usr/share/zoneinfo') zoneinfo_root = Path("/usr/share/zoneinfo")
zone_info_file = zoneinfo_root.joinpath(*self.TIME_ZONE.split('/')) zone_info_file = zoneinfo_root.joinpath(*self.TIME_ZONE.split("/"))
if zoneinfo_root.exists() and not zone_info_file.exists(): if zoneinfo_root.exists() and not zone_info_file.exists():
raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE) raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)
# Move the time zone info into os.environ. See ticket #2315 for why # Move the time zone info into os.environ. See ticket #2315 for why
# we don't do this unconditionally (breaks Windows). # we don't do this unconditionally (breaks Windows).
os.environ['TZ'] = self.TIME_ZONE os.environ["TZ"] = self.TIME_ZONE
time.tzset() time.tzset()
if self.is_overridden('USE_L10N'): if self.is_overridden("USE_L10N"):
warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning) warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning)
def is_overridden(self, setting): def is_overridden(self, setting):
@ -235,13 +242,14 @@ class Settings:
def __repr__(self): def __repr__(self):
return '<%(cls)s "%(settings_module)s">' % { return '<%(cls)s "%(settings_module)s">' % {
'cls': self.__class__.__name__, "cls": self.__class__.__name__,
'settings_module': self.SETTINGS_MODULE, "settings_module": self.SETTINGS_MODULE,
} }
class UserSettingsHolder: class UserSettingsHolder:
"""Holder for user configured settings.""" """Holder for user configured settings."""
# SETTINGS_MODULE doesn't make much sense in the manually configured # SETTINGS_MODULE doesn't make much sense in the manually configured
# (standalone) case. # (standalone) case.
SETTINGS_MODULE = None SETTINGS_MODULE = None
@ -251,7 +259,7 @@ class UserSettingsHolder:
Requests for configuration variables not in this class are satisfied Requests for configuration variables not in this class are satisfied
from the module specified in default_settings (if possible). from the module specified in default_settings (if possible).
""" """
self.__dict__['_deleted'] = set() self.__dict__["_deleted"] = set()
self.default_settings = default_settings self.default_settings = default_settings
def __getattr__(self, name): def __getattr__(self, name):
@ -261,12 +269,12 @@ class UserSettingsHolder:
def __setattr__(self, name, value): def __setattr__(self, name, value):
self._deleted.discard(name) self._deleted.discard(name)
if name == 'USE_L10N': if name == "USE_L10N":
warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning) warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning)
if name == 'CSRF_COOKIE_MASKED': if name == "CSRF_COOKIE_MASKED":
warnings.warn(CSRF_COOKIE_MASKED_DEPRECATED_MSG, RemovedInDjango50Warning) warnings.warn(CSRF_COOKIE_MASKED_DEPRECATED_MSG, RemovedInDjango50Warning)
super().__setattr__(name, value) super().__setattr__(name, value)
if name == 'USE_DEPRECATED_PYTZ': if name == "USE_DEPRECATED_PYTZ":
warnings.warn(USE_DEPRECATED_PYTZ_DEPRECATED_MSG, RemovedInDjango50Warning) warnings.warn(USE_DEPRECATED_PYTZ_DEPRECATED_MSG, RemovedInDjango50Warning)
def __delattr__(self, name): def __delattr__(self, name):
@ -276,19 +284,22 @@ class UserSettingsHolder:
def __dir__(self): def __dir__(self):
return sorted( return sorted(
s for s in [*self.__dict__, *dir(self.default_settings)] s
for s in [*self.__dict__, *dir(self.default_settings)]
if s not in self._deleted if s not in self._deleted
) )
def is_overridden(self, setting): def is_overridden(self, setting):
deleted = (setting in self._deleted) deleted = setting in self._deleted
set_locally = (setting in self.__dict__) set_locally = setting in self.__dict__
set_on_default = getattr(self.default_settings, 'is_overridden', lambda s: False)(setting) set_on_default = getattr(
self.default_settings, "is_overridden", lambda s: False
)(setting)
return deleted or set_locally or set_on_default return deleted or set_locally or set_on_default
def __repr__(self): def __repr__(self):
return '<%(cls)s>' % { return "<%(cls)s>" % {
'cls': self.__class__.__name__, "cls": self.__class__.__name__,
} }

View File

@ -38,7 +38,7 @@ ALLOWED_HOSTS = []
# https://en.wikipedia.org/wiki/List_of_tz_zones_by_name (although not all # https://en.wikipedia.org/wiki/List_of_tz_zones_by_name (although not all
# systems may support all possibilities). When USE_TZ is True, this is # systems may support all possibilities). When USE_TZ is True, this is
# interpreted as the default user time zone. # interpreted as the default user time zone.
TIME_ZONE = 'America/Chicago' TIME_ZONE = "America/Chicago"
# If you set this to True, Django will use timezone-aware datetimes. # If you set this to True, Django will use timezone-aware datetimes.
USE_TZ = False USE_TZ = False
@ -50,107 +50,107 @@ USE_DEPRECATED_PYTZ = False
# Language code for this installation. All choices can be found here: # Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html # http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = "en-us"
# Languages we provide translations for, out of the box. # Languages we provide translations for, out of the box.
LANGUAGES = [ LANGUAGES = [
('af', gettext_noop('Afrikaans')), ("af", gettext_noop("Afrikaans")),
('ar', gettext_noop('Arabic')), ("ar", gettext_noop("Arabic")),
('ar-dz', gettext_noop('Algerian Arabic')), ("ar-dz", gettext_noop("Algerian Arabic")),
('ast', gettext_noop('Asturian')), ("ast", gettext_noop("Asturian")),
('az', gettext_noop('Azerbaijani')), ("az", gettext_noop("Azerbaijani")),
('bg', gettext_noop('Bulgarian')), ("bg", gettext_noop("Bulgarian")),
('be', gettext_noop('Belarusian')), ("be", gettext_noop("Belarusian")),
('bn', gettext_noop('Bengali')), ("bn", gettext_noop("Bengali")),
('br', gettext_noop('Breton')), ("br", gettext_noop("Breton")),
('bs', gettext_noop('Bosnian')), ("bs", gettext_noop("Bosnian")),
('ca', gettext_noop('Catalan')), ("ca", gettext_noop("Catalan")),
('cs', gettext_noop('Czech')), ("cs", gettext_noop("Czech")),
('cy', gettext_noop('Welsh')), ("cy", gettext_noop("Welsh")),
('da', gettext_noop('Danish')), ("da", gettext_noop("Danish")),
('de', gettext_noop('German')), ("de", gettext_noop("German")),
('dsb', gettext_noop('Lower Sorbian')), ("dsb", gettext_noop("Lower Sorbian")),
('el', gettext_noop('Greek')), ("el", gettext_noop("Greek")),
('en', gettext_noop('English')), ("en", gettext_noop("English")),
('en-au', gettext_noop('Australian English')), ("en-au", gettext_noop("Australian English")),
('en-gb', gettext_noop('British English')), ("en-gb", gettext_noop("British English")),
('eo', gettext_noop('Esperanto')), ("eo", gettext_noop("Esperanto")),
('es', gettext_noop('Spanish')), ("es", gettext_noop("Spanish")),
('es-ar', gettext_noop('Argentinian Spanish')), ("es-ar", gettext_noop("Argentinian Spanish")),
('es-co', gettext_noop('Colombian Spanish')), ("es-co", gettext_noop("Colombian Spanish")),
('es-mx', gettext_noop('Mexican Spanish')), ("es-mx", gettext_noop("Mexican Spanish")),
('es-ni', gettext_noop('Nicaraguan Spanish')), ("es-ni", gettext_noop("Nicaraguan Spanish")),
('es-ve', gettext_noop('Venezuelan Spanish')), ("es-ve", gettext_noop("Venezuelan Spanish")),
('et', gettext_noop('Estonian')), ("et", gettext_noop("Estonian")),
('eu', gettext_noop('Basque')), ("eu", gettext_noop("Basque")),
('fa', gettext_noop('Persian')), ("fa", gettext_noop("Persian")),
('fi', gettext_noop('Finnish')), ("fi", gettext_noop("Finnish")),
('fr', gettext_noop('French')), ("fr", gettext_noop("French")),
('fy', gettext_noop('Frisian')), ("fy", gettext_noop("Frisian")),
('ga', gettext_noop('Irish')), ("ga", gettext_noop("Irish")),
('gd', gettext_noop('Scottish Gaelic')), ("gd", gettext_noop("Scottish Gaelic")),
('gl', gettext_noop('Galician')), ("gl", gettext_noop("Galician")),
('he', gettext_noop('Hebrew')), ("he", gettext_noop("Hebrew")),
('hi', gettext_noop('Hindi')), ("hi", gettext_noop("Hindi")),
('hr', gettext_noop('Croatian')), ("hr", gettext_noop("Croatian")),
('hsb', gettext_noop('Upper Sorbian')), ("hsb", gettext_noop("Upper Sorbian")),
('hu', gettext_noop('Hungarian')), ("hu", gettext_noop("Hungarian")),
('hy', gettext_noop('Armenian')), ("hy", gettext_noop("Armenian")),
('ia', gettext_noop('Interlingua')), ("ia", gettext_noop("Interlingua")),
('id', gettext_noop('Indonesian')), ("id", gettext_noop("Indonesian")),
('ig', gettext_noop('Igbo')), ("ig", gettext_noop("Igbo")),
('io', gettext_noop('Ido')), ("io", gettext_noop("Ido")),
('is', gettext_noop('Icelandic')), ("is", gettext_noop("Icelandic")),
('it', gettext_noop('Italian')), ("it", gettext_noop("Italian")),
('ja', gettext_noop('Japanese')), ("ja", gettext_noop("Japanese")),
('ka', gettext_noop('Georgian')), ("ka", gettext_noop("Georgian")),
('kab', gettext_noop('Kabyle')), ("kab", gettext_noop("Kabyle")),
('kk', gettext_noop('Kazakh')), ("kk", gettext_noop("Kazakh")),
('km', gettext_noop('Khmer')), ("km", gettext_noop("Khmer")),
('kn', gettext_noop('Kannada')), ("kn", gettext_noop("Kannada")),
('ko', gettext_noop('Korean')), ("ko", gettext_noop("Korean")),
('ky', gettext_noop('Kyrgyz')), ("ky", gettext_noop("Kyrgyz")),
('lb', gettext_noop('Luxembourgish')), ("lb", gettext_noop("Luxembourgish")),
('lt', gettext_noop('Lithuanian')), ("lt", gettext_noop("Lithuanian")),
('lv', gettext_noop('Latvian')), ("lv", gettext_noop("Latvian")),
('mk', gettext_noop('Macedonian')), ("mk", gettext_noop("Macedonian")),
('ml', gettext_noop('Malayalam')), ("ml", gettext_noop("Malayalam")),
('mn', gettext_noop('Mongolian')), ("mn", gettext_noop("Mongolian")),
('mr', gettext_noop('Marathi')), ("mr", gettext_noop("Marathi")),
('ms', gettext_noop('Malay')), ("ms", gettext_noop("Malay")),
('my', gettext_noop('Burmese')), ("my", gettext_noop("Burmese")),
('nb', gettext_noop('Norwegian Bokmål')), ("nb", gettext_noop("Norwegian Bokmål")),
('ne', gettext_noop('Nepali')), ("ne", gettext_noop("Nepali")),
('nl', gettext_noop('Dutch')), ("nl", gettext_noop("Dutch")),
('nn', gettext_noop('Norwegian Nynorsk')), ("nn", gettext_noop("Norwegian Nynorsk")),
('os', gettext_noop('Ossetic')), ("os", gettext_noop("Ossetic")),
('pa', gettext_noop('Punjabi')), ("pa", gettext_noop("Punjabi")),
('pl', gettext_noop('Polish')), ("pl", gettext_noop("Polish")),
('pt', gettext_noop('Portuguese')), ("pt", gettext_noop("Portuguese")),
('pt-br', gettext_noop('Brazilian Portuguese')), ("pt-br", gettext_noop("Brazilian Portuguese")),
('ro', gettext_noop('Romanian')), ("ro", gettext_noop("Romanian")),
('ru', gettext_noop('Russian')), ("ru", gettext_noop("Russian")),
('sk', gettext_noop('Slovak')), ("sk", gettext_noop("Slovak")),
('sl', gettext_noop('Slovenian')), ("sl", gettext_noop("Slovenian")),
('sq', gettext_noop('Albanian')), ("sq", gettext_noop("Albanian")),
('sr', gettext_noop('Serbian')), ("sr", gettext_noop("Serbian")),
('sr-latn', gettext_noop('Serbian Latin')), ("sr-latn", gettext_noop("Serbian Latin")),
('sv', gettext_noop('Swedish')), ("sv", gettext_noop("Swedish")),
('sw', gettext_noop('Swahili')), ("sw", gettext_noop("Swahili")),
('ta', gettext_noop('Tamil')), ("ta", gettext_noop("Tamil")),
('te', gettext_noop('Telugu')), ("te", gettext_noop("Telugu")),
('tg', gettext_noop('Tajik')), ("tg", gettext_noop("Tajik")),
('th', gettext_noop('Thai')), ("th", gettext_noop("Thai")),
('tk', gettext_noop('Turkmen')), ("tk", gettext_noop("Turkmen")),
('tr', gettext_noop('Turkish')), ("tr", gettext_noop("Turkish")),
('tt', gettext_noop('Tatar')), ("tt", gettext_noop("Tatar")),
('udm', gettext_noop('Udmurt')), ("udm", gettext_noop("Udmurt")),
('uk', gettext_noop('Ukrainian')), ("uk", gettext_noop("Ukrainian")),
('ur', gettext_noop('Urdu')), ("ur", gettext_noop("Urdu")),
('uz', gettext_noop('Uzbek')), ("uz", gettext_noop("Uzbek")),
('vi', gettext_noop('Vietnamese')), ("vi", gettext_noop("Vietnamese")),
('zh-hans', gettext_noop('Simplified Chinese')), ("zh-hans", gettext_noop("Simplified Chinese")),
('zh-hant', gettext_noop('Traditional Chinese')), ("zh-hant", gettext_noop("Traditional Chinese")),
] ]
# Languages using BiDi (right-to-left) layout # Languages using BiDi (right-to-left) layout
@ -162,10 +162,10 @@ USE_I18N = True
LOCALE_PATHS = [] LOCALE_PATHS = []
# Settings for language cookie # Settings for language cookie
LANGUAGE_COOKIE_NAME = 'django_language' LANGUAGE_COOKIE_NAME = "django_language"
LANGUAGE_COOKIE_AGE = None LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_PATH = '/' LANGUAGE_COOKIE_PATH = "/"
LANGUAGE_COOKIE_SECURE = False LANGUAGE_COOKIE_SECURE = False
LANGUAGE_COOKIE_HTTPONLY = False LANGUAGE_COOKIE_HTTPONLY = False
LANGUAGE_COOKIE_SAMESITE = None LANGUAGE_COOKIE_SAMESITE = None
@ -181,10 +181,10 @@ MANAGERS = ADMINS
# Default charset to use for all HttpResponse objects, if a MIME type isn't # Default charset to use for all HttpResponse objects, if a MIME type isn't
# manually specified. It's used to construct the Content-Type header. # manually specified. It's used to construct the Content-Type header.
DEFAULT_CHARSET = 'utf-8' DEFAULT_CHARSET = "utf-8"
# Email address that error messages come from. # Email address that error messages come from.
SERVER_EMAIL = 'root@localhost' SERVER_EMAIL = "root@localhost"
# Database connection info. If left empty, will default to the dummy backend. # Database connection info. If left empty, will default to the dummy backend.
DATABASES = {} DATABASES = {}
@ -196,10 +196,10 @@ DATABASE_ROUTERS = []
# The default is to use the SMTP backend. # The default is to use the SMTP backend.
# Third-party backends can be specified by providing a Python path # Third-party backends can be specified by providing a Python path
# to a module that defines an EmailBackend class. # to a module that defines an EmailBackend class.
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
# Host for sending email. # Host for sending email.
EMAIL_HOST = 'localhost' EMAIL_HOST = "localhost"
# Port for sending email. # Port for sending email.
EMAIL_PORT = 25 EMAIL_PORT = 25
@ -208,8 +208,8 @@ EMAIL_PORT = 25
EMAIL_USE_LOCALTIME = False EMAIL_USE_LOCALTIME = False
# Optional SMTP authentication information for EMAIL_HOST. # Optional SMTP authentication information for EMAIL_HOST.
EMAIL_HOST_USER = '' EMAIL_HOST_USER = ""
EMAIL_HOST_PASSWORD = '' EMAIL_HOST_PASSWORD = ""
EMAIL_USE_TLS = False EMAIL_USE_TLS = False
EMAIL_USE_SSL = False EMAIL_USE_SSL = False
EMAIL_SSL_CERTFILE = None EMAIL_SSL_CERTFILE = None
@ -222,15 +222,15 @@ INSTALLED_APPS = []
TEMPLATES = [] TEMPLATES = []
# Default form rendering class. # Default form rendering class.
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates' FORM_RENDERER = "django.forms.renderers.DjangoTemplates"
# Default email address to use for various automated correspondence from # Default email address to use for various automated correspondence from
# the site managers. # the site managers.
DEFAULT_FROM_EMAIL = 'webmaster@localhost' DEFAULT_FROM_EMAIL = "webmaster@localhost"
# Subject-line prefix for email messages send with django.core.mail.mail_admins # Subject-line prefix for email messages send with django.core.mail.mail_admins
# or ...mail_managers. Make sure to include the trailing space. # or ...mail_managers. Make sure to include the trailing space.
EMAIL_SUBJECT_PREFIX = '[Django] ' EMAIL_SUBJECT_PREFIX = "[Django] "
# Whether to append trailing slashes to URLs. # Whether to append trailing slashes to URLs.
APPEND_SLASH = True APPEND_SLASH = True
@ -270,22 +270,22 @@ IGNORABLE_404_URLS = []
# A secret key for this particular Django installation. Used in secret-key # A secret key for this particular Django installation. Used in secret-key
# hashing algorithms. Set this in your settings, or Django will complain # hashing algorithms. Set this in your settings, or Django will complain
# loudly. # loudly.
SECRET_KEY = '' SECRET_KEY = ""
# List of secret keys used to verify the validity of signatures. This allows # List of secret keys used to verify the validity of signatures. This allows
# secret key rotation. # secret key rotation.
SECRET_KEY_FALLBACKS = [] SECRET_KEY_FALLBACKS = []
# Default file storage mechanism that holds media. # Default file storage mechanism that holds media.
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' DEFAULT_FILE_STORAGE = "django.core.files.storage.FileSystemStorage"
# Absolute filesystem path to the directory that will hold user-uploaded files. # Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/var/www/example.com/media/" # Example: "/var/www/example.com/media/"
MEDIA_ROOT = '' MEDIA_ROOT = ""
# URL that handles the media served from MEDIA_ROOT. # URL that handles the media served from MEDIA_ROOT.
# Examples: "http://example.com/media/", "http://media.example.com/" # Examples: "http://example.com/media/", "http://media.example.com/"
MEDIA_URL = '' MEDIA_URL = ""
# Absolute path to the directory static files should be collected to. # Absolute path to the directory static files should be collected to.
# Example: "/var/www/example.com/static/" # Example: "/var/www/example.com/static/"
@ -297,8 +297,8 @@ STATIC_URL = None
# List of upload handler classes to be applied in order. # List of upload handler classes to be applied in order.
FILE_UPLOAD_HANDLERS = [ FILE_UPLOAD_HANDLERS = [
'django.core.files.uploadhandler.MemoryFileUploadHandler', "django.core.files.uploadhandler.MemoryFileUploadHandler",
'django.core.files.uploadhandler.TemporaryFileUploadHandler', "django.core.files.uploadhandler.TemporaryFileUploadHandler",
] ]
# Maximum size, in bytes, of a request before it will be streamed to the # Maximum size, in bytes, of a request before it will be streamed to the
@ -335,51 +335,51 @@ FORMAT_MODULE_PATH = None
# Default formatting for date objects. See all available format strings here: # Default formatting for date objects. See all available format strings here:
# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'N j, Y' DATE_FORMAT = "N j, Y"
# Default formatting for datetime objects. See all available format strings here: # Default formatting for datetime objects. See all available format strings here:
# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATETIME_FORMAT = 'N j, Y, P' DATETIME_FORMAT = "N j, Y, P"
# Default formatting for time objects. See all available format strings here: # Default formatting for time objects. See all available format strings here:
# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
TIME_FORMAT = 'P' TIME_FORMAT = "P"
# Default formatting for date objects when only the year and month are relevant. # Default formatting for date objects when only the year and month are relevant.
# See all available format strings here: # See all available format strings here:
# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
# Default formatting for date objects when only the month and day are relevant. # Default formatting for date objects when only the month and day are relevant.
# See all available format strings here: # See all available format strings here:
# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
MONTH_DAY_FORMAT = 'F j' MONTH_DAY_FORMAT = "F j"
# Default short formatting for date objects. See all available format strings here: # Default short formatting for date objects. See all available format strings here:
# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
SHORT_DATE_FORMAT = 'm/d/Y' SHORT_DATE_FORMAT = "m/d/Y"
# Default short formatting for datetime objects. # Default short formatting for datetime objects.
# See all available format strings here: # See all available format strings here:
# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
SHORT_DATETIME_FORMAT = 'm/d/Y P' SHORT_DATETIME_FORMAT = "m/d/Y P"
# Default formats to be used when parsing dates from input boxes, in order # Default formats to be used when parsing dates from input boxes, in order
# See all available format string here: # See all available format string here:
# https://docs.python.org/library/datetime.html#strftime-behavior # https://docs.python.org/library/datetime.html#strftime-behavior
# * Note that these format strings are different from the ones to display dates # * Note that these format strings are different from the ones to display dates
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%m/%d/%Y', # '10/25/2006' "%m/%d/%Y", # '10/25/2006'
'%m/%d/%y', # '10/25/06' "%m/%d/%y", # '10/25/06'
'%b %d %Y', # 'Oct 25 2006' "%b %d %Y", # 'Oct 25 2006'
'%b %d, %Y', # 'Oct 25, 2006' "%b %d, %Y", # 'Oct 25, 2006'
'%d %b %Y', # '25 Oct 2006' "%d %b %Y", # '25 Oct 2006'
'%d %b, %Y', # '25 Oct, 2006' "%d %b, %Y", # '25 Oct, 2006'
'%B %d %Y', # 'October 25 2006' "%B %d %Y", # 'October 25 2006'
'%B %d, %Y', # 'October 25, 2006' "%B %d, %Y", # 'October 25, 2006'
'%d %B %Y', # '25 October 2006' "%d %B %Y", # '25 October 2006'
'%d %B, %Y', # '25 October, 2006' "%d %B, %Y", # '25 October, 2006'
] ]
# Default formats to be used when parsing times from input boxes, in order # Default formats to be used when parsing times from input boxes, in order
@ -387,9 +387,9 @@ DATE_INPUT_FORMATS = [
# https://docs.python.org/library/datetime.html#strftime-behavior # https://docs.python.org/library/datetime.html#strftime-behavior
# * Note that these format strings are different from the ones to display dates # * Note that these format strings are different from the ones to display dates
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59' "%H:%M:%S", # '14:30:59'
'%H:%M:%S.%f', # '14:30:59.000200' "%H:%M:%S.%f", # '14:30:59.000200'
'%H:%M', # '14:30' "%H:%M", # '14:30'
] ]
# Default formats to be used when parsing dates and times from input boxes, # Default formats to be used when parsing dates and times from input boxes,
@ -398,15 +398,15 @@ TIME_INPUT_FORMATS = [
# https://docs.python.org/library/datetime.html#strftime-behavior # https://docs.python.org/library/datetime.html#strftime-behavior
# * Note that these format strings are different from the ones to display dates # * Note that these format strings are different from the ones to display dates
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59' "%m/%d/%Y %H:%M:%S", # '10/25/2006 14:30:59'
'%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200' "%m/%d/%Y %H:%M:%S.%f", # '10/25/2006 14:30:59.000200'
'%m/%d/%Y %H:%M', # '10/25/2006 14:30' "%m/%d/%Y %H:%M", # '10/25/2006 14:30'
'%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59' "%m/%d/%y %H:%M:%S", # '10/25/06 14:30:59'
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200' "%m/%d/%y %H:%M:%S.%f", # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30' "%m/%d/%y %H:%M", # '10/25/06 14:30'
] ]
# First day of week, to be used on calendars # First day of week, to be used on calendars
@ -414,7 +414,7 @@ DATETIME_INPUT_FORMATS = [
FIRST_DAY_OF_WEEK = 0 FIRST_DAY_OF_WEEK = 0
# Decimal separator symbol # Decimal separator symbol
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
# Boolean that sets whether to add thousand separator when formatting numbers # Boolean that sets whether to add thousand separator when formatting numbers
USE_THOUSAND_SEPARATOR = False USE_THOUSAND_SEPARATOR = False
@ -424,17 +424,17 @@ USE_THOUSAND_SEPARATOR = False
NUMBER_GROUPING = 0 NUMBER_GROUPING = 0
# Thousand separator symbol # Thousand separator symbol
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
# The tablespaces to use for each model when not specified otherwise. # The tablespaces to use for each model when not specified otherwise.
DEFAULT_TABLESPACE = '' DEFAULT_TABLESPACE = ""
DEFAULT_INDEX_TABLESPACE = '' DEFAULT_INDEX_TABLESPACE = ""
# Default primary key field type. # Default primary key field type.
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
# Default X-Frame-Options header value # Default X-Frame-Options header value
X_FRAME_OPTIONS = 'DENY' X_FRAME_OPTIONS = "DENY"
USE_X_FORWARDED_HOST = False USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False USE_X_FORWARDED_PORT = False
@ -469,9 +469,9 @@ MIDDLEWARE = []
############ ############
# Cache to store session data if using the cache session backend. # Cache to store session data if using the cache session backend.
SESSION_CACHE_ALIAS = 'default' SESSION_CACHE_ALIAS = "default"
# Cookie name. This can be whatever you want. # Cookie name. This can be whatever you want.
SESSION_COOKIE_NAME = 'sessionid' SESSION_COOKIE_NAME = "sessionid"
# Age of cookie, in seconds (default: 2 weeks). # Age of cookie, in seconds (default: 2 weeks).
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2
# A string like "example.com", or None for standard domain cookie. # A string like "example.com", or None for standard domain cookie.
@ -479,23 +479,23 @@ SESSION_COOKIE_DOMAIN = None
# Whether the session cookie should be secure (https:// only). # Whether the session cookie should be secure (https:// only).
SESSION_COOKIE_SECURE = False SESSION_COOKIE_SECURE = False
# The path of the session cookie. # The path of the session cookie.
SESSION_COOKIE_PATH = '/' SESSION_COOKIE_PATH = "/"
# Whether to use the HttpOnly flag. # Whether to use the HttpOnly flag.
SESSION_COOKIE_HTTPONLY = True SESSION_COOKIE_HTTPONLY = True
# Whether to set the flag restricting cookie leaks on cross-site requests. # Whether to set the flag restricting cookie leaks on cross-site requests.
# This can be 'Lax', 'Strict', 'None', or False to disable the flag. # This can be 'Lax', 'Strict', 'None', or False to disable the flag.
SESSION_COOKIE_SAMESITE = 'Lax' SESSION_COOKIE_SAMESITE = "Lax"
# Whether to save the session data on every request. # Whether to save the session data on every request.
SESSION_SAVE_EVERY_REQUEST = False SESSION_SAVE_EVERY_REQUEST = False
# Whether a user's session cookie expires when the web browser is closed. # Whether a user's session cookie expires when the web browser is closed.
SESSION_EXPIRE_AT_BROWSER_CLOSE = False SESSION_EXPIRE_AT_BROWSER_CLOSE = False
# The module to store session data # The module to store session data
SESSION_ENGINE = 'django.contrib.sessions.backends.db' SESSION_ENGINE = "django.contrib.sessions.backends.db"
# Directory to store session files if using the file session module. If None, # Directory to store session files if using the file session module. If None,
# the backend will use a sensible default. # the backend will use a sensible default.
SESSION_FILE_PATH = None SESSION_FILE_PATH = None
# class to serialize session data # class to serialize session data
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' SESSION_SERIALIZER = "django.contrib.sessions.serializers.JSONSerializer"
######### #########
# CACHE # # CACHE #
@ -503,25 +503,25 @@ SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
# The cache backends to use. # The cache backends to use.
CACHES = { CACHES = {
'default': { "default": {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', "BACKEND": "django.core.cache.backends.locmem.LocMemCache",
} }
} }
CACHE_MIDDLEWARE_KEY_PREFIX = '' CACHE_MIDDLEWARE_KEY_PREFIX = ""
CACHE_MIDDLEWARE_SECONDS = 600 CACHE_MIDDLEWARE_SECONDS = 600
CACHE_MIDDLEWARE_ALIAS = 'default' CACHE_MIDDLEWARE_ALIAS = "default"
################## ##################
# AUTHENTICATION # # AUTHENTICATION #
################## ##################
AUTH_USER_MODEL = 'auth.User' AUTH_USER_MODEL = "auth.User"
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend'] AUTHENTICATION_BACKENDS = ["django.contrib.auth.backends.ModelBackend"]
LOGIN_URL = '/accounts/login/' LOGIN_URL = "/accounts/login/"
LOGIN_REDIRECT_URL = '/accounts/profile/' LOGIN_REDIRECT_URL = "/accounts/profile/"
LOGOUT_REDIRECT_URL = None LOGOUT_REDIRECT_URL = None
@ -532,11 +532,11 @@ PASSWORD_RESET_TIMEOUT = 60 * 60 * 24 * 3
# password using different algorithms will be converted automatically # password using different algorithms will be converted automatically
# upon login # upon login
PASSWORD_HASHERS = [ PASSWORD_HASHERS = [
'django.contrib.auth.hashers.PBKDF2PasswordHasher', "django.contrib.auth.hashers.PBKDF2PasswordHasher",
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher', "django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher",
'django.contrib.auth.hashers.Argon2PasswordHasher', "django.contrib.auth.hashers.Argon2PasswordHasher",
'django.contrib.auth.hashers.BCryptSHA256PasswordHasher', "django.contrib.auth.hashers.BCryptSHA256PasswordHasher",
'django.contrib.auth.hashers.ScryptPasswordHasher', "django.contrib.auth.hashers.ScryptPasswordHasher",
] ]
AUTH_PASSWORD_VALIDATORS = [] AUTH_PASSWORD_VALIDATORS = []
@ -545,7 +545,7 @@ AUTH_PASSWORD_VALIDATORS = []
# SIGNING # # SIGNING #
########### ###########
SIGNING_BACKEND = 'django.core.signing.TimestampSigner' SIGNING_BACKEND = "django.core.signing.TimestampSigner"
######## ########
# CSRF # # CSRF #
@ -553,17 +553,17 @@ SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
# Dotted path to callable to be used as view when a request is # Dotted path to callable to be used as view when a request is
# rejected by the CSRF middleware. # rejected by the CSRF middleware.
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' CSRF_FAILURE_VIEW = "django.views.csrf.csrf_failure"
# Settings for CSRF cookie. # Settings for CSRF cookie.
CSRF_COOKIE_NAME = 'csrftoken' CSRF_COOKIE_NAME = "csrftoken"
CSRF_COOKIE_AGE = 60 * 60 * 24 * 7 * 52 CSRF_COOKIE_AGE = 60 * 60 * 24 * 7 * 52
CSRF_COOKIE_DOMAIN = None CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_PATH = '/' CSRF_COOKIE_PATH = "/"
CSRF_COOKIE_SECURE = False CSRF_COOKIE_SECURE = False
CSRF_COOKIE_HTTPONLY = False CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_SAMESITE = 'Lax' CSRF_COOKIE_SAMESITE = "Lax"
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN' CSRF_HEADER_NAME = "HTTP_X_CSRFTOKEN"
CSRF_TRUSTED_ORIGINS = [] CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False CSRF_USE_SESSIONS = False
@ -576,7 +576,7 @@ CSRF_COOKIE_MASKED = False
############ ############
# Class to use as messages backend # Class to use as messages backend
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage' MESSAGE_STORAGE = "django.contrib.messages.storage.fallback.FallbackStorage"
# Default values of MESSAGE_LEVEL and MESSAGE_TAGS are defined within # Default values of MESSAGE_LEVEL and MESSAGE_TAGS are defined within
# django.contrib.messages to avoid imports in this settings file. # django.contrib.messages to avoid imports in this settings file.
@ -586,25 +586,25 @@ MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
########### ###########
# The callable to use to configure logging # The callable to use to configure logging
LOGGING_CONFIG = 'logging.config.dictConfig' LOGGING_CONFIG = "logging.config.dictConfig"
# Custom logging configuration. # Custom logging configuration.
LOGGING = {} LOGGING = {}
# Default exception reporter class used in case none has been # Default exception reporter class used in case none has been
# specifically assigned to the HttpRequest instance. # specifically assigned to the HttpRequest instance.
DEFAULT_EXCEPTION_REPORTER = 'django.views.debug.ExceptionReporter' DEFAULT_EXCEPTION_REPORTER = "django.views.debug.ExceptionReporter"
# Default exception reporter filter class used in case none has been # Default exception reporter filter class used in case none has been
# specifically assigned to the HttpRequest instance. # specifically assigned to the HttpRequest instance.
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter' DEFAULT_EXCEPTION_REPORTER_FILTER = "django.views.debug.SafeExceptionReporterFilter"
########### ###########
# TESTING # # TESTING #
########### ###########
# The name of the class to use to run the test suite # The name of the class to use to run the test suite
TEST_RUNNER = 'django.test.runner.DiscoverRunner' TEST_RUNNER = "django.test.runner.DiscoverRunner"
# Apps that don't need to be serialized at test database creation time # Apps that don't need to be serialized at test database creation time
# (only apps with migrations are to start with) # (only apps with migrations are to start with)
@ -625,13 +625,13 @@ FIXTURE_DIRS = []
STATICFILES_DIRS = [] STATICFILES_DIRS = []
# The default file storage backend used during the build process # The default file storage backend used during the build process
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"
# List of finder classes that know how to find static files in # List of finder classes that know how to find static files in
# various locations. # various locations.
STATICFILES_FINDERS = [ STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder', "django.contrib.staticfiles.finders.FileSystemFinder",
'django.contrib.staticfiles.finders.AppDirectoriesFinder', "django.contrib.staticfiles.finders.AppDirectoriesFinder",
# 'django.contrib.staticfiles.finders.DefaultStorageFinder', # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
] ]
@ -656,11 +656,11 @@ SILENCED_SYSTEM_CHECKS = []
# SECURITY MIDDLEWARE # # SECURITY MIDDLEWARE #
####################### #######################
SECURE_CONTENT_TYPE_NOSNIFF = True SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_CROSS_ORIGIN_OPENER_POLICY = 'same-origin' SECURE_CROSS_ORIGIN_OPENER_POLICY = "same-origin"
SECURE_HSTS_INCLUDE_SUBDOMAINS = False SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0 SECURE_HSTS_SECONDS = 0
SECURE_REDIRECT_EXEMPT = [] SECURE_REDIRECT_EXEMPT = []
SECURE_REFERRER_POLICY = 'same-origin' SECURE_REFERRER_POLICY = "same-origin"
SECURE_SSL_HOST = None SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False SECURE_SSL_REDIRECT = False

File diff suppressed because it is too large Load Diff

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F، Y' DATE_FORMAT = "j F، Y"
TIME_FORMAT = 'g:i A' TIME_FORMAT = "g:i A"
# DATETIME_FORMAT = # DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
@ -16,6 +16,6 @@ SHORT_DATE_FORMAT = 'd/m/Y'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,28 +2,28 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j F Y H:i' DATETIME_FORMAT = "j F Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j F Y' SHORT_DATE_FORMAT = "j F Y"
SHORT_DATETIME_FORMAT = 'j F Y H:i' SHORT_DATETIME_FORMAT = "j F Y H:i"
FIRST_DAY_OF_WEEK = 0 # Sunday FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y/%m/%d', # '2006/10/25' "%Y/%m/%d", # '2006/10/25'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M', # '14:30 "%H:%M", # '14:30
'%H:%M:%S', # '14:30:59' "%H:%M:%S", # '14:30:59'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y/%m/%d %H:%M', # '2006/10/25 14:30' "%Y/%m/%d %H:%M", # '2006/10/25 14:30'
'%Y/%m/%d %H:%M:%S', # '2006/10/25 14:30:59' "%Y/%m/%d %H:%M:%S", # '2006/10/25 14:30:59'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,29 +2,29 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j E Y' DATE_FORMAT = "j E Y"
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j E Y, G:i' DATETIME_FORMAT = "j E Y, G:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y' DATE_FORMAT = "d F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
@ -16,6 +16,6 @@ SHORT_DATE_FORMAT = 'd.m.Y'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = ' ' # Non-breaking space THOUSAND_SEPARATOR = " " # Non-breaking space
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,31 +2,31 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F, Y' DATE_FORMAT = "j F, Y"
TIME_FORMAT = 'g:i A' TIME_FORMAT = "g:i A"
# DATETIME_FORMAT = # DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j M, Y' SHORT_DATE_FORMAT = "j M, Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
FIRST_DAY_OF_WEEK = 6 # Saturday FIRST_DAY_OF_WEEK = 6 # Saturday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # 25/10/2016 "%d/%m/%Y", # 25/10/2016
'%d/%m/%y', # 25/10/16 "%d/%m/%y", # 25/10/16
'%d-%m-%Y', # 25-10-2016 "%d-%m-%Y", # 25-10-2016
'%d-%m-%y', # 25-10-16 "%d-%m-%y", # 25-10-16
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # 14:30:59 "%H:%M:%S", # 14:30:59
'%H:%M', # 14:30 "%H:%M", # 14:30
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # 25/10/2006 14:30:59 "%d/%m/%Y %H:%M:%S", # 25/10/2006 14:30:59
'%d/%m/%Y %H:%M', # 25/10/2006 14:30 "%d/%m/%Y %H:%M", # 25/10/2006 14:30
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. N Y.' DATE_FORMAT = "j. N Y."
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j. N. Y. G:i T' DATETIME_FORMAT = "j. N. Y. G:i T"
YEAR_MONTH_FORMAT = 'F Y.' YEAR_MONTH_FORMAT = "F Y."
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'Y M j' SHORT_DATE_FORMAT = "Y M j"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
@ -16,6 +16,6 @@ SHORT_DATE_FORMAT = 'Y M j'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,29 +2,29 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j \d\e F \d\e Y' DATE_FORMAT = r"j \d\e F \d\e Y"
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\e\s G:i' DATETIME_FORMAT = r"j \d\e F \d\e Y \a \l\e\s G:i"
YEAR_MONTH_FORMAT = r'F \d\e\l Y' YEAR_MONTH_FORMAT = r"F \d\e\l Y"
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r"j \d\e F"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
SHORT_DATETIME_FORMAT = 'd/m/Y G:i' SHORT_DATETIME_FORMAT = "d/m/Y G:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '31/12/2009' "%d/%m/%Y", # '31/12/2009'
'%d/%m/%y', # '31/12/09' "%d/%m/%y", # '31/12/09'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', "%d/%m/%Y %H:%M:%S",
'%d/%m/%Y %H:%M:%S.%f', "%d/%m/%Y %H:%M:%S.%f",
'%d/%m/%Y %H:%M', "%d/%m/%Y %H:%M",
'%d/%m/%y %H:%M:%S', "%d/%m/%y %H:%M:%S",
'%d/%m/%y %H:%M:%S.%f', "%d/%m/%y %H:%M:%S.%f",
'%d/%m/%y %H:%M', "%d/%m/%y %H:%M",
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,42 +2,42 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. E Y' DATE_FORMAT = "j. E Y"
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j. E Y G:i' DATETIME_FORMAT = "j. E Y G:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y G:i' SHORT_DATETIME_FORMAT = "d.m.Y G:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '05.01.2006' "%d.%m.%Y", # '05.01.2006'
'%d.%m.%y', # '05.01.06' "%d.%m.%y", # '05.01.06'
'%d. %m. %Y', # '5. 1. 2006' "%d. %m. %Y", # '5. 1. 2006'
'%d. %m. %y', # '5. 1. 06' "%d. %m. %y", # '5. 1. 06'
# "%d. %B %Y", # '25. October 2006' # "%d. %B %Y", # '25. October 2006'
# "%d. %b. %Y", # '25. Oct. 2006' # "%d. %b. %Y", # '25. Oct. 2006'
] ]
# Kept ISO formats as one is in first position # Kept ISO formats as one is in first position
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # '04:30:59' "%H:%M:%S", # '04:30:59'
'%H.%M', # '04.30' "%H.%M", # '04.30'
'%H:%M', # '04:30' "%H:%M", # '04:30'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '05.01.2006 04:30:59' "%d.%m.%Y %H:%M:%S", # '05.01.2006 04:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '05.01.2006 04:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '05.01.2006 04:30:59.000200'
'%d.%m.%Y %H.%M', # '05.01.2006 04.30' "%d.%m.%Y %H.%M", # '05.01.2006 04.30'
'%d.%m.%Y %H:%M', # '05.01.2006 04:30' "%d.%m.%Y %H:%M", # '05.01.2006 04:30'
'%d. %m. %Y %H:%M:%S', # '05. 01. 2006 04:30:59' "%d. %m. %Y %H:%M:%S", # '05. 01. 2006 04:30:59'
'%d. %m. %Y %H:%M:%S.%f', # '05. 01. 2006 04:30:59.000200' "%d. %m. %Y %H:%M:%S.%f", # '05. 01. 2006 04:30:59.000200'
'%d. %m. %Y %H.%M', # '05. 01. 2006 04.30' "%d. %m. %Y %H.%M", # '05. 01. 2006 04.30'
'%d. %m. %Y %H:%M', # '05. 01. 2006 04:30' "%d. %m. %Y %H:%M", # '05. 01. 2006 04:30'
'%Y-%m-%d %H.%M', # '2006-01-05 04.30' "%Y-%m-%d %H.%M", # '2006-01-05 04.30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,32 +2,32 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' # '25 Hydref 2006' DATE_FORMAT = "j F Y" # '25 Hydref 2006'
TIME_FORMAT = 'P' # '2:30 y.b.' TIME_FORMAT = "P" # '2:30 y.b.'
DATETIME_FORMAT = 'j F Y, P' # '25 Hydref 2006, 2:30 y.b.' DATETIME_FORMAT = "j F Y, P" # '25 Hydref 2006, 2:30 y.b.'
YEAR_MONTH_FORMAT = 'F Y' # 'Hydref 2006' YEAR_MONTH_FORMAT = "F Y" # 'Hydref 2006'
MONTH_DAY_FORMAT = 'j F' # '25 Hydref' MONTH_DAY_FORMAT = "j F" # '25 Hydref'
SHORT_DATE_FORMAT = 'd/m/Y' # '25/10/2006' SHORT_DATE_FORMAT = "d/m/Y" # '25/10/2006'
SHORT_DATETIME_FORMAT = 'd/m/Y P' # '25/10/2006 2:30 y.b.' SHORT_DATETIME_FORMAT = "d/m/Y P" # '25/10/2006 2:30 y.b.'
FIRST_DAY_OF_WEEK = 1 # 'Dydd Llun' FIRST_DAY_OF_WEEK = 1 # 'Dydd Llun'
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30' "%d/%m/%Y %H:%M", # '25/10/2006 14:30'
'%d/%m/%y %H:%M:%S', # '25/10/06 14:30:59' "%d/%m/%y %H:%M:%S", # '25/10/06 14:30:59'
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200' "%d/%m/%y %H:%M:%S.%f", # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30' "%d/%m/%y %H:%M", # '25/10/06 14:30'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,25 +2,25 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y' DATE_FORMAT = "j. F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j. F Y H:i' DATETIME_FORMAT = "j. F Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,28 +2,28 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y' DATE_FORMAT = "j. F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j. F Y H:i' DATETIME_FORMAT = "j. F Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
# "%d. %B %Y", # '25. October 2006' # "%d. %B %Y", # '25. October 2006'
# "%d. %b. %Y", # '25. Oct. 2006' # "%d. %b. %Y", # '25. Oct. 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,27 +2,27 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y' DATE_FORMAT = "j. F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j. F Y H:i' DATETIME_FORMAT = "j. F Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
# "%d. %B %Y", # '25. October 2006' # "%d. %B %Y", # '25. October 2006'
# "%d. %b. %Y", # '25. Oct. 2006' # "%d. %b. %Y", # '25. Oct. 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
] ]
# these are the separators for non-monetary numbers. For monetary numbers, # these are the separators for non-monetary numbers. For monetary numbers,
@ -30,6 +30,6 @@ DATETIME_INPUT_FORMATS = [
# ' (single quote). # ' (single quote).
# For details, please refer to the documentation and the following link: # For details, please refer to the documentation and the following link:
# https://www.bk.admin.ch/bk/de/home/dokumentation/sprachen/hilfsmittel-textredaktion/schreibweisungen.html # https://www.bk.admin.ch/bk/de/home/dokumentation/sprachen/hilfsmittel-textredaktion/schreibweisungen.html
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,33 +2,33 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd/m/Y' DATE_FORMAT = "d/m/Y"
TIME_FORMAT = 'P' TIME_FORMAT = "P"
DATETIME_FORMAT = 'd/m/Y P' DATETIME_FORMAT = "d/m/Y P"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
SHORT_DATETIME_FORMAT = 'd/m/Y P' SHORT_DATETIME_FORMAT = "d/m/Y P"
FIRST_DAY_OF_WEEK = 0 # Sunday FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30' "%d/%m/%Y %H:%M", # '25/10/2006 14:30'
'%d/%m/%y %H:%M:%S', # '25/10/06 14:30:59' "%d/%m/%y %H:%M:%S", # '25/10/06 14:30:59'
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200' "%d/%m/%y %H:%M:%S.%f", # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30' "%d/%m/%y %H:%M", # '25/10/06 14:30'
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -4,19 +4,19 @@
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
# Formatting for date objects. # Formatting for date objects.
DATE_FORMAT = 'N j, Y' DATE_FORMAT = "N j, Y"
# Formatting for time objects. # Formatting for time objects.
TIME_FORMAT = 'P' TIME_FORMAT = "P"
# Formatting for datetime objects. # Formatting for datetime objects.
DATETIME_FORMAT = 'N j, Y, P' DATETIME_FORMAT = "N j, Y, P"
# Formatting for date objects when only the year and month are relevant. # Formatting for date objects when only the year and month are relevant.
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
# Formatting for date objects when only the month and day are relevant. # Formatting for date objects when only the month and day are relevant.
MONTH_DAY_FORMAT = 'F j' MONTH_DAY_FORMAT = "F j"
# Short formatting for date objects. # Short formatting for date objects.
SHORT_DATE_FORMAT = 'm/d/Y' SHORT_DATE_FORMAT = "m/d/Y"
# Short formatting for datetime objects. # Short formatting for datetime objects.
SHORT_DATETIME_FORMAT = 'm/d/Y P' SHORT_DATETIME_FORMAT = "m/d/Y P"
# First day of week, to be used on calendars. # First day of week, to be used on calendars.
# 0 means Sunday, 1 means Monday... # 0 means Sunday, 1 means Monday...
FIRST_DAY_OF_WEEK = 0 FIRST_DAY_OF_WEEK = 0
@ -27,39 +27,39 @@ FIRST_DAY_OF_WEEK = 0
# Note that these format strings are different from the ones to display dates. # Note that these format strings are different from the ones to display dates.
# Kept ISO formats as they are in first position # Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%m/%d/%Y', # '10/25/2006' "%m/%d/%Y", # '10/25/2006'
'%m/%d/%y', # '10/25/06' "%m/%d/%y", # '10/25/06'
'%b %d %Y', # 'Oct 25 2006' "%b %d %Y", # 'Oct 25 2006'
'%b %d, %Y', # 'Oct 25, 2006' "%b %d, %Y", # 'Oct 25, 2006'
'%d %b %Y', # '25 Oct 2006' "%d %b %Y", # '25 Oct 2006'
'%d %b, %Y', # '25 Oct, 2006' "%d %b, %Y", # '25 Oct, 2006'
'%B %d %Y', # 'October 25 2006' "%B %d %Y", # 'October 25 2006'
'%B %d, %Y', # 'October 25, 2006' "%B %d, %Y", # 'October 25, 2006'
'%d %B %Y', # '25 October 2006' "%d %B %Y", # '25 October 2006'
'%d %B, %Y', # '25 October, 2006' "%d %B, %Y", # '25 October, 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59' "%m/%d/%Y %H:%M:%S", # '10/25/2006 14:30:59'
'%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200' "%m/%d/%Y %H:%M:%S.%f", # '10/25/2006 14:30:59.000200'
'%m/%d/%Y %H:%M', # '10/25/2006 14:30' "%m/%d/%Y %H:%M", # '10/25/2006 14:30'
'%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59' "%m/%d/%y %H:%M:%S", # '10/25/06 14:30:59'
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200' "%m/%d/%y %H:%M:%S.%f", # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30' "%m/%d/%y %H:%M", # '10/25/06 14:30'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59' "%H:%M:%S", # '14:30:59'
'%H:%M:%S.%f', # '14:30:59.000200' "%H:%M:%S.%f", # '14:30:59.000200'
'%H:%M', # '14:30' "%H:%M", # '14:30'
] ]
# Decimal separator symbol. # Decimal separator symbol.
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
# Thousand separator symbol. # Thousand separator symbol.
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
# Number of digits that will be together, when splitting them by # Number of digits that will be together, when splitting them by
# THOUSAND_SEPARATOR. 0 means no grouping, 3 means splitting by thousands. # THOUSAND_SEPARATOR. 0 means no grouping, 3 means splitting by thousands.
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,20 +2,20 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j M Y' # '25 Oct 2006' DATE_FORMAT = "j M Y" # '25 Oct 2006'
TIME_FORMAT = 'P' # '2:30 p.m.' TIME_FORMAT = "P" # '2:30 p.m.'
DATETIME_FORMAT = 'j M Y, P' # '25 Oct 2006, 2:30 p.m.' DATETIME_FORMAT = "j M Y, P" # '25 Oct 2006, 2:30 p.m.'
YEAR_MONTH_FORMAT = 'F Y' # 'October 2006' YEAR_MONTH_FORMAT = "F Y" # 'October 2006'
MONTH_DAY_FORMAT = 'j F' # '25 October' MONTH_DAY_FORMAT = "j F" # '25 October'
SHORT_DATE_FORMAT = 'd/m/Y' # '25/10/2006' SHORT_DATE_FORMAT = "d/m/Y" # '25/10/2006'
SHORT_DATETIME_FORMAT = 'd/m/Y P' # '25/10/2006 2:30 p.m.' SHORT_DATETIME_FORMAT = "d/m/Y P" # '25/10/2006 2:30 p.m.'
FIRST_DAY_OF_WEEK = 0 # Sunday FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
# "%b %d %Y", # 'Oct 25 2006' # "%b %d %Y", # 'Oct 25 2006'
# "%b %d, %Y", # 'Oct 25, 2006' # "%b %d, %Y", # 'Oct 25, 2006'
# "%d %b %Y", # '25 Oct 2006' # "%d %b %Y", # '25 Oct 2006'
@ -26,16 +26,16 @@ DATE_INPUT_FORMATS = [
# "%d %B, %Y", # '25 October, 2006' # "%d %B, %Y", # '25 October, 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30' "%d/%m/%Y %H:%M", # '25/10/2006 14:30'
'%d/%m/%y %H:%M:%S', # '25/10/06 14:30:59' "%d/%m/%y %H:%M:%S", # '25/10/06 14:30:59'
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200' "%d/%m/%y %H:%M:%S.%f", # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30' "%d/%m/%y %H:%M", # '25/10/06 14:30'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,20 +2,20 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j M Y' # '25 Oct 2006' DATE_FORMAT = "j M Y" # '25 Oct 2006'
TIME_FORMAT = 'P' # '2:30 p.m.' TIME_FORMAT = "P" # '2:30 p.m.'
DATETIME_FORMAT = 'j M Y, P' # '25 Oct 2006, 2:30 p.m.' DATETIME_FORMAT = "j M Y, P" # '25 Oct 2006, 2:30 p.m.'
YEAR_MONTH_FORMAT = 'F Y' # 'October 2006' YEAR_MONTH_FORMAT = "F Y" # 'October 2006'
MONTH_DAY_FORMAT = 'j F' # '25 October' MONTH_DAY_FORMAT = "j F" # '25 October'
SHORT_DATE_FORMAT = 'd/m/Y' # '25/10/2006' SHORT_DATE_FORMAT = "d/m/Y" # '25/10/2006'
SHORT_DATETIME_FORMAT = 'd/m/Y P' # '25/10/2006 2:30 p.m.' SHORT_DATETIME_FORMAT = "d/m/Y P" # '25/10/2006 2:30 p.m.'
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
# "%b %d %Y", # 'Oct 25 2006' # "%b %d %Y", # 'Oct 25 2006'
# "%b %d, %Y", # 'Oct 25, 2006' # "%b %d, %Y", # 'Oct 25, 2006'
# "%d %b %Y", # '25 Oct 2006' # "%d %b %Y", # '25 Oct 2006'
@ -26,16 +26,16 @@ DATE_INPUT_FORMATS = [
# "%d %B, %Y", # '25 October, 2006' # "%d %B, %Y", # '25 October, 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30' "%d/%m/%Y %H:%M", # '25/10/2006 14:30'
'%d/%m/%y %H:%M:%S', # '25/10/06 14:30:59' "%d/%m/%y %H:%M:%S", # '25/10/06 14:30:59'
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200' "%d/%m/%y %H:%M:%S.%f", # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30' "%d/%m/%y %H:%M", # '25/10/06 14:30'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,46 +2,43 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j\-\a \d\e F Y' # '26-a de julio 1887' DATE_FORMAT = r"j\-\a \d\e F Y" # '26-a de julio 1887'
TIME_FORMAT = 'H:i' # '18:59' TIME_FORMAT = "H:i" # '18:59'
DATETIME_FORMAT = r'j\-\a \d\e F Y\, \j\e H:i' # '26-a de julio 1887, je 18:59' DATETIME_FORMAT = r"j\-\a \d\e F Y\, \j\e H:i" # '26-a de julio 1887, je 18:59'
YEAR_MONTH_FORMAT = r'F \d\e Y' # 'julio de 1887' YEAR_MONTH_FORMAT = r"F \d\e Y" # 'julio de 1887'
MONTH_DAY_FORMAT = r'j\-\a \d\e F' # '26-a de julio' MONTH_DAY_FORMAT = r"j\-\a \d\e F" # '26-a de julio'
SHORT_DATE_FORMAT = 'Y-m-d' # '1887-07-26' SHORT_DATE_FORMAT = "Y-m-d" # '1887-07-26'
SHORT_DATETIME_FORMAT = 'Y-m-d H:i' # '1887-07-26 18:59' SHORT_DATETIME_FORMAT = "Y-m-d H:i" # '1887-07-26 18:59'
FIRST_DAY_OF_WEEK = 1 # Monday (lundo) FIRST_DAY_OF_WEEK = 1 # Monday (lundo)
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '1887-07-26' "%Y-%m-%d", # '1887-07-26'
'%y-%m-%d', # '87-07-26' "%y-%m-%d", # '87-07-26'
'%Y %m %d', # '1887 07 26' "%Y %m %d", # '1887 07 26'
'%Y.%m.%d', # '1887.07.26' "%Y.%m.%d", # '1887.07.26'
'%d-a de %b %Y', # '26-a de jul 1887' "%d-a de %b %Y", # '26-a de jul 1887'
'%d %b %Y', # '26 jul 1887' "%d %b %Y", # '26 jul 1887'
'%d-a de %B %Y', # '26-a de julio 1887' "%d-a de %B %Y", # '26-a de julio 1887'
'%d %B %Y', # '26 julio 1887' "%d %B %Y", # '26 julio 1887'
'%d %m %Y', # '26 07 1887' "%d %m %Y", # '26 07 1887'
'%d/%m/%Y', # '26/07/1887' "%d/%m/%Y", # '26/07/1887'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # '18:59:00' "%H:%M:%S", # '18:59:00'
'%H:%M', # '18:59' "%H:%M", # '18:59'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '1887-07-26 18:59:00' "%Y-%m-%d %H:%M:%S", # '1887-07-26 18:59:00'
'%Y-%m-%d %H:%M', # '1887-07-26 18:59' "%Y-%m-%d %H:%M", # '1887-07-26 18:59'
"%Y.%m.%d %H:%M:%S", # '1887.07.26 18:59:00'
'%Y.%m.%d %H:%M:%S', # '1887.07.26 18:59:00' "%Y.%m.%d %H:%M", # '1887.07.26 18:59'
'%Y.%m.%d %H:%M', # '1887.07.26 18:59' "%d/%m/%Y %H:%M:%S", # '26/07/1887 18:59:00'
"%d/%m/%Y %H:%M", # '26/07/1887 18:59'
'%d/%m/%Y %H:%M:%S', # '26/07/1887 18:59:00' "%y-%m-%d %H:%M:%S", # '87-07-26 18:59:00'
'%d/%m/%Y %H:%M', # '26/07/1887 18:59' "%y-%m-%d %H:%M", # '87-07-26 18:59'
'%y-%m-%d %H:%M:%S', # '87-07-26 18:59:00'
'%y-%m-%d %H:%M', # '87-07-26 18:59'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,29 +2,29 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j \d\e F \d\e Y' DATE_FORMAT = r"j \d\e F \d\e Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' DATETIME_FORMAT = r"j \d\e F \d\e Y \a \l\a\s H:i"
YEAR_MONTH_FORMAT = r'F \d\e Y' YEAR_MONTH_FORMAT = r"F \d\e Y"
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r"j \d\e F"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
SHORT_DATETIME_FORMAT = 'd/m/Y H:i' SHORT_DATETIME_FORMAT = "d/m/Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '31/12/2009' "%d/%m/%Y", # '31/12/2009'
'%d/%m/%y', # '31/12/09' "%d/%m/%y", # '31/12/09'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', "%d/%m/%Y %H:%M:%S",
'%d/%m/%Y %H:%M:%S.%f', "%d/%m/%Y %H:%M:%S.%f",
'%d/%m/%Y %H:%M', "%d/%m/%Y %H:%M",
'%d/%m/%y %H:%M:%S', "%d/%m/%y %H:%M:%S",
'%d/%m/%y %H:%M:%S.%f', "%d/%m/%y %H:%M:%S.%f",
'%d/%m/%y %H:%M', "%d/%m/%y %H:%M",
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,29 +2,29 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j N Y' DATE_FORMAT = r"j N Y"
TIME_FORMAT = r'H:i' TIME_FORMAT = r"H:i"
DATETIME_FORMAT = r'j N Y H:i' DATETIME_FORMAT = r"j N Y H:i"
YEAR_MONTH_FORMAT = r'F Y' YEAR_MONTH_FORMAT = r"F Y"
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r"j \d\e F"
SHORT_DATE_FORMAT = r'd/m/Y' SHORT_DATE_FORMAT = r"d/m/Y"
SHORT_DATETIME_FORMAT = r'd/m/Y H:i' SHORT_DATETIME_FORMAT = r"d/m/Y H:i"
FIRST_DAY_OF_WEEK = 0 # 0: Sunday, 1: Monday FIRST_DAY_OF_WEEK = 0 # 0: Sunday, 1: Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '31/12/2009' "%d/%m/%Y", # '31/12/2009'
'%d/%m/%y', # '31/12/09' "%d/%m/%y", # '31/12/09'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', "%d/%m/%Y %H:%M:%S",
'%d/%m/%Y %H:%M:%S.%f', "%d/%m/%Y %H:%M:%S.%f",
'%d/%m/%Y %H:%M', "%d/%m/%Y %H:%M",
'%d/%m/%y %H:%M:%S', "%d/%m/%y %H:%M:%S",
'%d/%m/%y %H:%M:%S.%f', "%d/%m/%y %H:%M:%S.%f",
'%d/%m/%y %H:%M', "%d/%m/%y %H:%M",
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -1,27 +1,26 @@
# This file is distributed under the same license as the Django package. # This file is distributed under the same license as the Django package.
# #
DATE_FORMAT = r'j \d\e F \d\e Y' DATE_FORMAT = r"j \d\e F \d\e Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' DATETIME_FORMAT = r"j \d\e F \d\e Y \a \l\a\s H:i"
YEAR_MONTH_FORMAT = r'F \d\e Y' YEAR_MONTH_FORMAT = r"F \d\e Y"
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r"j \d\e F"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
SHORT_DATETIME_FORMAT = 'd/m/Y H:i' SHORT_DATETIME_FORMAT = "d/m/Y H:i"
FIRST_DAY_OF_WEEK = 1 FIRST_DAY_OF_WEEK = 1
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
'%Y%m%d', # '20061025' "%Y%m%d", # '20061025'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', "%d/%m/%Y %H:%M:%S",
'%d/%m/%Y %H:%M:%S.%f', "%d/%m/%Y %H:%M:%S.%f",
'%d/%m/%Y %H:%M', "%d/%m/%Y %H:%M",
'%d/%m/%y %H:%M:%S', "%d/%m/%y %H:%M:%S",
'%d/%m/%y %H:%M:%S.%f', "%d/%m/%y %H:%M:%S.%f",
'%d/%m/%y %H:%M', "%d/%m/%y %H:%M",
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -1,26 +1,26 @@
# This file is distributed under the same license as the Django package. # This file is distributed under the same license as the Django package.
# #
DATE_FORMAT = r'j \d\e F \d\e Y' DATE_FORMAT = r"j \d\e F \d\e Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' DATETIME_FORMAT = r"j \d\e F \d\e Y \a \l\a\s H:i"
YEAR_MONTH_FORMAT = r'F \d\e Y' YEAR_MONTH_FORMAT = r"F \d\e Y"
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r"j \d\e F"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
SHORT_DATETIME_FORMAT = 'd/m/Y H:i' SHORT_DATETIME_FORMAT = "d/m/Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601 FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
'%Y%m%d', # '20061025' "%Y%m%d", # '20061025'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', "%d/%m/%Y %H:%M:%S",
'%d/%m/%Y %H:%M:%S.%f', "%d/%m/%Y %H:%M:%S.%f",
'%d/%m/%Y %H:%M', "%d/%m/%Y %H:%M",
'%d/%m/%y %H:%M:%S', "%d/%m/%y %H:%M:%S",
'%d/%m/%y %H:%M:%S.%f', "%d/%m/%y %H:%M:%S.%f",
'%d/%m/%y %H:%M', "%d/%m/%y %H:%M",
] ]
DECIMAL_SEPARATOR = '.' # ',' is also official (less common): NOM-008-SCFI-2002 DECIMAL_SEPARATOR = "." # ',' is also official (less common): NOM-008-SCFI-2002
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -1,27 +1,26 @@
# This file is distributed under the same license as the Django package. # This file is distributed under the same license as the Django package.
# #
DATE_FORMAT = r'j \d\e F \d\e Y' DATE_FORMAT = r"j \d\e F \d\e Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' DATETIME_FORMAT = r"j \d\e F \d\e Y \a \l\a\s H:i"
YEAR_MONTH_FORMAT = r'F \d\e Y' YEAR_MONTH_FORMAT = r"F \d\e Y"
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r"j \d\e F"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
SHORT_DATETIME_FORMAT = 'd/m/Y H:i' SHORT_DATETIME_FORMAT = "d/m/Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601 FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
'%Y%m%d', # '20061025' "%Y%m%d", # '20061025'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', "%d/%m/%Y %H:%M:%S",
'%d/%m/%Y %H:%M:%S.%f', "%d/%m/%Y %H:%M:%S.%f",
'%d/%m/%Y %H:%M', "%d/%m/%Y %H:%M",
'%d/%m/%y %H:%M:%S', "%d/%m/%y %H:%M:%S",
'%d/%m/%y %H:%M:%S.%f', "%d/%m/%y %H:%M:%S.%f",
'%d/%m/%y %H:%M', "%d/%m/%y %H:%M",
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -1,27 +1,27 @@
# This file is distributed under the same license as the Django package. # This file is distributed under the same license as the Django package.
# #
DATE_FORMAT = r'j \d\e F \d\e Y' DATE_FORMAT = r"j \d\e F \d\e Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' DATETIME_FORMAT = r"j \d\e F \d\e Y \a \l\a\s H:i"
YEAR_MONTH_FORMAT = r'F \d\e Y' YEAR_MONTH_FORMAT = r"F \d\e Y"
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r"j \d\e F"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
SHORT_DATETIME_FORMAT = 'd/m/Y H:i' SHORT_DATETIME_FORMAT = "d/m/Y H:i"
FIRST_DAY_OF_WEEK = 0 # Sunday FIRST_DAY_OF_WEEK = 0 # Sunday
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '31/12/2009' "%d/%m/%Y", # '31/12/2009'
'%d/%m/%y', # '31/12/09' "%d/%m/%y", # '31/12/09'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', "%d/%m/%Y %H:%M:%S",
'%d/%m/%Y %H:%M:%S.%f', "%d/%m/%Y %H:%M:%S.%f",
'%d/%m/%Y %H:%M', "%d/%m/%Y %H:%M",
'%d/%m/%y %H:%M:%S', "%d/%m/%y %H:%M:%S",
'%d/%m/%y %H:%M:%S.%f', "%d/%m/%y %H:%M:%S.%f",
'%d/%m/%y %H:%M', "%d/%m/%y %H:%M",
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y' DATE_FORMAT = "j. F Y"
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
@ -16,6 +16,6 @@ SHORT_DATE_FORMAT = 'd.m.Y'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = ' ' # Non-breaking space THOUSAND_SEPARATOR = " " # Non-breaking space
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,13 +2,13 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'Y\k\o N j\a' DATE_FORMAT = r"Y\k\o N j\a"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'Y\k\o N j\a, H:i' DATETIME_FORMAT = r"Y\k\o N j\a, H:i"
YEAR_MONTH_FORMAT = r'Y\k\o F' YEAR_MONTH_FORMAT = r"Y\k\o F"
MONTH_DAY_FORMAT = r'F\r\e\n j\a' MONTH_DAY_FORMAT = r"F\r\e\n j\a"
SHORT_DATE_FORMAT = 'Y-m-d' SHORT_DATE_FORMAT = "Y-m-d"
SHORT_DATETIME_FORMAT = 'Y-m-d H:i' SHORT_DATETIME_FORMAT = "Y-m-d H:i"
FIRST_DAY_OF_WEEK = 1 # Astelehena FIRST_DAY_OF_WEEK = 1 # Astelehena
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
@ -16,6 +16,6 @@ FIRST_DAY_OF_WEEK = 1 # Astelehena
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,13 +2,13 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j F Y، ساعت G:i' DATETIME_FORMAT = "j F Y، ساعت G:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'Y/n/j' SHORT_DATE_FORMAT = "Y/n/j"
SHORT_DATETIME_FORMAT = 'Y/n/j، G:i' SHORT_DATETIME_FORMAT = "Y/n/j، G:i"
FIRST_DAY_OF_WEEK = 6 FIRST_DAY_OF_WEEK = 6
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
@ -16,6 +16,6 @@ FIRST_DAY_OF_WEEK = 6
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,36 +2,35 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. E Y' DATE_FORMAT = "j. E Y"
TIME_FORMAT = 'G.i' TIME_FORMAT = "G.i"
DATETIME_FORMAT = r'j. E Y \k\e\l\l\o G.i' DATETIME_FORMAT = r"j. E Y \k\e\l\l\o G.i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'j.n.Y' SHORT_DATE_FORMAT = "j.n.Y"
SHORT_DATETIME_FORMAT = 'j.n.Y G.i' SHORT_DATETIME_FORMAT = "j.n.Y G.i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '20.3.2014' "%d.%m.%Y", # '20.3.2014'
'%d.%m.%y', # '20.3.14' "%d.%m.%y", # '20.3.14'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H.%M.%S', # '20.3.2014 14.30.59' "%d.%m.%Y %H.%M.%S", # '20.3.2014 14.30.59'
'%d.%m.%Y %H.%M.%S.%f', # '20.3.2014 14.30.59.000200' "%d.%m.%Y %H.%M.%S.%f", # '20.3.2014 14.30.59.000200'
'%d.%m.%Y %H.%M', # '20.3.2014 14.30' "%d.%m.%Y %H.%M", # '20.3.2014 14.30'
"%d.%m.%y %H.%M.%S", # '20.3.14 14.30.59'
'%d.%m.%y %H.%M.%S', # '20.3.14 14.30.59' "%d.%m.%y %H.%M.%S.%f", # '20.3.14 14.30.59.000200'
'%d.%m.%y %H.%M.%S.%f', # '20.3.14 14.30.59.000200' "%d.%m.%y %H.%M", # '20.3.14 14.30'
'%d.%m.%y %H.%M', # '20.3.14 14.30'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H.%M.%S', # '14.30.59' "%H.%M.%S", # '14.30.59'
'%H.%M.%S.%f', # '14.30.59.000200' "%H.%M.%S.%f", # '14.30.59.000200'
'%H.%M', # '14.30' "%H.%M", # '14.30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # Non-breaking space THOUSAND_SEPARATOR = "\xa0" # Non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,32 +2,32 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j F Y H:i' DATETIME_FORMAT = "j F Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j N Y' SHORT_DATE_FORMAT = "j N Y"
SHORT_DATETIME_FORMAT = 'j N Y H:i' SHORT_DATETIME_FORMAT = "j N Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
'%d.%m.%Y', # Swiss [fr_CH] '25.10.2006' "%d.%m.%Y", # Swiss [fr_CH] '25.10.2006'
'%d.%m.%y', # Swiss [fr_CH] '25.10.06' "%d.%m.%y", # Swiss [fr_CH] '25.10.06'
# '%d %B %Y', '%d %b %Y', # '25 octobre 2006', '25 oct. 2006' # '%d %B %Y', '%d %b %Y', # '25 octobre 2006', '25 oct. 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30' "%d/%m/%Y %H:%M", # '25/10/2006 14:30'
'%d.%m.%Y %H:%M:%S', # Swiss [fr_CH), '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # Swiss [fr_CH), '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # Swiss (fr_CH), '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # Swiss (fr_CH), '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # Swiss (fr_CH), '25.10.2006 14:30' "%d.%m.%Y %H:%M", # Swiss (fr_CH), '25.10.2006 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = "j M Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
@ -16,6 +16,6 @@ SHORT_DATE_FORMAT = 'j M Y'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,13 +2,13 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'h:ia' TIME_FORMAT = "h:ia"
DATETIME_FORMAT = 'j F Y h:ia' DATETIME_FORMAT = "j F Y h:ia"
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = "j M Y"
SHORT_DATETIME_FORMAT = 'j M Y h:ia' SHORT_DATETIME_FORMAT = "j M Y h:ia"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
@ -16,6 +16,6 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,13 +2,13 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j \d\e F \d\e Y' DATE_FORMAT = r"j \d\e F \d\e Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'j \d\e F \d\e Y \á\s H:i' DATETIME_FORMAT = r"j \d\e F \d\e Y \á\s H:i"
YEAR_MONTH_FORMAT = r'F \d\e Y' YEAR_MONTH_FORMAT = r"F \d\e Y"
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r"j \d\e F"
SHORT_DATE_FORMAT = 'd-m-Y' SHORT_DATE_FORMAT = "d-m-Y"
SHORT_DATETIME_FORMAT = 'd-m-Y, H:i' SHORT_DATETIME_FORMAT = "d-m-Y, H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
@ -16,6 +16,6 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,13 +2,13 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j בF Y' DATE_FORMAT = "j בF Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j בF Y H:i' DATETIME_FORMAT = "j בF Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j בF' MONTH_DAY_FORMAT = "j בF"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
SHORT_DATETIME_FORMAT = 'd/m/Y H:i' SHORT_DATETIME_FORMAT = "d/m/Y H:i"
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
@ -16,6 +16,6 @@ SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'g:i A' TIME_FORMAT = "g:i A"
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd-m-Y' SHORT_DATE_FORMAT = "d-m-Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
@ -16,6 +16,6 @@ SHORT_DATE_FORMAT = 'd-m-Y'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,43 +2,43 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. E Y.' DATE_FORMAT = "j. E Y."
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j. E Y. H:i' DATETIME_FORMAT = "j. E Y. H:i"
YEAR_MONTH_FORMAT = 'F Y.' YEAR_MONTH_FORMAT = "F Y."
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'j.m.Y.' SHORT_DATE_FORMAT = "j.m.Y."
SHORT_DATETIME_FORMAT = 'j.m.Y. H:i' SHORT_DATETIME_FORMAT = "j.m.Y. H:i"
FIRST_DAY_OF_WEEK = 1 FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position # Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%d.%m.%Y.', # '25.10.2006.' "%d.%m.%Y.", # '25.10.2006.'
'%d.%m.%y.', # '25.10.06.' "%d.%m.%y.", # '25.10.06.'
'%d. %m. %Y.', # '25. 10. 2006.' "%d. %m. %Y.", # '25. 10. 2006.'
'%d. %m. %y.', # '25. 10. 06.' "%d. %m. %y.", # '25. 10. 06.'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d.%m.%Y. %H:%M:%S', # '25.10.2006. 14:30:59' "%d.%m.%Y. %H:%M:%S", # '25.10.2006. 14:30:59'
'%d.%m.%Y. %H:%M:%S.%f', # '25.10.2006. 14:30:59.000200' "%d.%m.%Y. %H:%M:%S.%f", # '25.10.2006. 14:30:59.000200'
'%d.%m.%Y. %H:%M', # '25.10.2006. 14:30' "%d.%m.%Y. %H:%M", # '25.10.2006. 14:30'
'%d.%m.%y. %H:%M:%S', # '25.10.06. 14:30:59' "%d.%m.%y. %H:%M:%S", # '25.10.06. 14:30:59'
'%d.%m.%y. %H:%M:%S.%f', # '25.10.06. 14:30:59.000200' "%d.%m.%y. %H:%M:%S.%f", # '25.10.06. 14:30:59.000200'
'%d.%m.%y. %H:%M', # '25.10.06. 14:30' "%d.%m.%y. %H:%M", # '25.10.06. 14:30'
'%d. %m. %Y. %H:%M:%S', # '25. 10. 2006. 14:30:59' "%d. %m. %Y. %H:%M:%S", # '25. 10. 2006. 14:30:59'
'%d. %m. %Y. %H:%M:%S.%f', # '25. 10. 2006. 14:30:59.000200' "%d. %m. %Y. %H:%M:%S.%f", # '25. 10. 2006. 14:30:59.000200'
'%d. %m. %Y. %H:%M', # '25. 10. 2006. 14:30' "%d. %m. %Y. %H:%M", # '25. 10. 2006. 14:30'
'%d. %m. %y. %H:%M:%S', # '25. 10. 06. 14:30:59' "%d. %m. %y. %H:%M:%S", # '25. 10. 06. 14:30:59'
'%d. %m. %y. %H:%M:%S.%f', # '25. 10. 06. 14:30:59.000200' "%d. %m. %y. %H:%M:%S.%f", # '25. 10. 06. 14:30:59.000200'
'%d. %m. %y. %H:%M', # '25. 10. 06. 14:30' "%d. %m. %y. %H:%M", # '25. 10. 06. 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,29 +2,29 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'Y. F j.' DATE_FORMAT = "Y. F j."
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'Y. F j. H:i' DATETIME_FORMAT = "Y. F j. H:i"
YEAR_MONTH_FORMAT = 'Y. F' YEAR_MONTH_FORMAT = "Y. F"
MONTH_DAY_FORMAT = 'F j.' MONTH_DAY_FORMAT = "F j."
SHORT_DATE_FORMAT = 'Y.m.d.' SHORT_DATE_FORMAT = "Y.m.d."
SHORT_DATETIME_FORMAT = 'Y.m.d. H:i' SHORT_DATETIME_FORMAT = "Y.m.d. H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y.%m.%d.', # '2006.10.25.' "%Y.%m.%d.", # '2006.10.25.'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59' "%H:%M:%S", # '14:30:59'
'%H:%M', # '14:30' "%H:%M", # '14:30'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y.%m.%d. %H:%M:%S', # '2006.10.25. 14:30:59' "%Y.%m.%d. %H:%M:%S", # '2006.10.25. 14:30:59'
'%Y.%m.%d. %H:%M:%S.%f', # '2006.10.25. 14:30:59.000200' "%Y.%m.%d. %H:%M:%S.%f", # '2006.10.25. 14:30:59.000200'
'%Y.%m.%d. %H:%M', # '2006.10.25. 14:30' "%Y.%m.%d. %H:%M", # '2006.10.25. 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = ' ' # Non-breaking space THOUSAND_SEPARATOR = " " # Non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,48 +2,48 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j N Y' DATE_FORMAT = "j N Y"
DATETIME_FORMAT = "j N Y, G.i" DATETIME_FORMAT = "j N Y, G.i"
TIME_FORMAT = 'G.i' TIME_FORMAT = "G.i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd-m-Y' SHORT_DATE_FORMAT = "d-m-Y"
SHORT_DATETIME_FORMAT = 'd-m-Y G.i' SHORT_DATETIME_FORMAT = "d-m-Y G.i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d-%m-%Y', # '25-10-2009' "%d-%m-%Y", # '25-10-2009'
'%d/%m/%Y', # '25/10/2009' "%d/%m/%Y", # '25/10/2009'
'%d-%m-%y', # '25-10-09' "%d-%m-%y", # '25-10-09'
'%d/%m/%y', # '25/10/09' "%d/%m/%y", # '25/10/09'
'%d %b %Y', # '25 Oct 2006', "%d %b %Y", # '25 Oct 2006',
'%d %B %Y', # '25 October 2006' "%d %B %Y", # '25 October 2006'
'%m/%d/%y', # '10/25/06' "%m/%d/%y", # '10/25/06'
'%m/%d/%Y', # '10/25/2009' "%m/%d/%Y", # '10/25/2009'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H.%M.%S', # '14.30.59' "%H.%M.%S", # '14.30.59'
'%H.%M', # '14.30' "%H.%M", # '14.30'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d-%m-%Y %H.%M.%S', # '25-10-2009 14.30.59' "%d-%m-%Y %H.%M.%S", # '25-10-2009 14.30.59'
'%d-%m-%Y %H.%M.%S.%f', # '25-10-2009 14.30.59.000200' "%d-%m-%Y %H.%M.%S.%f", # '25-10-2009 14.30.59.000200'
'%d-%m-%Y %H.%M', # '25-10-2009 14.30' "%d-%m-%Y %H.%M", # '25-10-2009 14.30'
'%d-%m-%y %H.%M.%S', # '25-10-09' 14.30.59' "%d-%m-%y %H.%M.%S", # '25-10-09' 14.30.59'
'%d-%m-%y %H.%M.%S.%f', # '25-10-09' 14.30.59.000200' "%d-%m-%y %H.%M.%S.%f", # '25-10-09' 14.30.59.000200'
'%d-%m-%y %H.%M', # '25-10-09' 14.30' "%d-%m-%y %H.%M", # '25-10-09' 14.30'
'%m/%d/%y %H.%M.%S', # '10/25/06 14.30.59' "%m/%d/%y %H.%M.%S", # '10/25/06 14.30.59'
'%m/%d/%y %H.%M.%S.%f', # '10/25/06 14.30.59.000200' "%m/%d/%y %H.%M.%S.%f", # '10/25/06 14.30.59.000200'
'%m/%d/%y %H.%M', # '10/25/06 14.30' "%m/%d/%y %H.%M", # '10/25/06 14.30'
'%m/%d/%Y %H.%M.%S', # '25/10/2009 14.30.59' "%m/%d/%Y %H.%M.%S", # '25/10/2009 14.30.59'
'%m/%d/%Y %H.%M.%S.%f', # '25/10/2009 14.30.59.000200' "%m/%d/%Y %H.%M.%S.%f", # '25/10/2009 14.30.59.000200'
'%m/%d/%Y %H.%M', # '25/10/2009 14.30' "%m/%d/%Y %H.%M", # '25/10/2009 14.30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,31 +2,31 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'P' TIME_FORMAT = "P"
DATETIME_FORMAT = 'j F Y P' DATETIME_FORMAT = "j F Y P"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y' DATE_FORMAT = "j. F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
# DATETIME_FORMAT = # DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'j.n.Y' SHORT_DATE_FORMAT = "j.n.Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
@ -16,6 +16,6 @@ SHORT_DATE_FORMAT = 'j.n.Y'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,42 +2,42 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y' # 25 Ottobre 2006 DATE_FORMAT = "d F Y" # 25 Ottobre 2006
TIME_FORMAT = 'H:i' # 14:30 TIME_FORMAT = "H:i" # 14:30
DATETIME_FORMAT = 'l d F Y H:i' # Mercoledì 25 Ottobre 2006 14:30 DATETIME_FORMAT = "l d F Y H:i" # Mercoledì 25 Ottobre 2006 14:30
YEAR_MONTH_FORMAT = 'F Y' # Ottobre 2006 YEAR_MONTH_FORMAT = "F Y" # Ottobre 2006
MONTH_DAY_FORMAT = 'j F' # 25 Ottobre MONTH_DAY_FORMAT = "j F" # 25 Ottobre
SHORT_DATE_FORMAT = 'd/m/Y' # 25/12/2009 SHORT_DATE_FORMAT = "d/m/Y" # 25/12/2009
SHORT_DATETIME_FORMAT = 'd/m/Y H:i' # 25/10/2009 14:30 SHORT_DATETIME_FORMAT = "d/m/Y H:i" # 25/10/2009 14:30
FIRST_DAY_OF_WEEK = 1 # Lunedì FIRST_DAY_OF_WEEK = 1 # Lunedì
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%Y/%m/%d', # '2006/10/25' "%Y/%m/%d", # '2006/10/25'
'%d-%m-%Y', # '25-10-2006' "%d-%m-%Y", # '25-10-2006'
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%d-%m-%y', # '25-10-06' "%d-%m-%y", # '25-10-06'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30' "%d/%m/%Y %H:%M", # '25/10/2006 14:30'
'%d/%m/%y %H:%M:%S', # '25/10/06 14:30:59' "%d/%m/%y %H:%M:%S", # '25/10/06 14:30:59'
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200' "%d/%m/%y %H:%M:%S.%f", # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30' "%d/%m/%y %H:%M", # '25/10/06 14:30'
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d-%m-%Y %H:%M:%S', # '25-10-2006 14:30:59' "%d-%m-%Y %H:%M:%S", # '25-10-2006 14:30:59'
'%d-%m-%Y %H:%M:%S.%f', # '25-10-2006 14:30:59.000200' "%d-%m-%Y %H:%M:%S.%f", # '25-10-2006 14:30:59.000200'
'%d-%m-%Y %H:%M', # '25-10-2006 14:30' "%d-%m-%Y %H:%M", # '25-10-2006 14:30'
'%d-%m-%y %H:%M:%S', # '25-10-06 14:30:59' "%d-%m-%y %H:%M:%S", # '25-10-06 14:30:59'
'%d-%m-%y %H:%M:%S.%f', # '25-10-06 14:30:59.000200' "%d-%m-%y %H:%M:%S.%f", # '25-10-06 14:30:59.000200'
'%d-%m-%y %H:%M', # '25-10-06 14:30' "%d-%m-%y %H:%M", # '25-10-06 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,13 +2,13 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'Y年n月j日' DATE_FORMAT = "Y年n月j日"
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'Y年n月j日G:i' DATETIME_FORMAT = "Y年n月j日G:i"
YEAR_MONTH_FORMAT = 'Y年n月' YEAR_MONTH_FORMAT = "Y年n月"
MONTH_DAY_FORMAT = 'n月j日' MONTH_DAY_FORMAT = "n月j日"
SHORT_DATE_FORMAT = 'Y/m/d' SHORT_DATE_FORMAT = "Y/m/d"
SHORT_DATETIME_FORMAT = 'Y/m/d G:i' SHORT_DATETIME_FORMAT = "Y/m/d G:i"
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
@ -16,6 +16,6 @@ SHORT_DATETIME_FORMAT = 'Y/m/d G:i'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,24 +2,24 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'l, j F, Y' DATE_FORMAT = "l, j F, Y"
TIME_FORMAT = 'h:i a' TIME_FORMAT = "h:i a"
DATETIME_FORMAT = 'j F, Y h:i a' DATETIME_FORMAT = "j F, Y h:i a"
YEAR_MONTH_FORMAT = 'F, Y' YEAR_MONTH_FORMAT = "F, Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j.M.Y' SHORT_DATE_FORMAT = "j.M.Y"
SHORT_DATETIME_FORMAT = 'j.M.Y H:i' SHORT_DATETIME_FORMAT = "j.M.Y H:i"
FIRST_DAY_OF_WEEK = 1 # (Monday) FIRST_DAY_OF_WEEK = 1 # (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position # Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%m/%d/%Y', # '10/25/2006' "%m/%d/%Y", # '10/25/2006'
'%m/%d/%y', # '10/25/06' "%m/%d/%y", # '10/25/06'
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
# "%d %b %Y", # '25 Oct 2006' # "%d %b %Y", # '25 Oct 2006'
# "%d %b, %Y", # '25 Oct, 2006' # "%d %b, %Y", # '25 Oct, 2006'
# "%d %b. %Y", # '25 Oct. 2006' # "%d %b. %Y", # '25 Oct. 2006'
@ -27,22 +27,22 @@ DATE_INPUT_FORMATS = [
# "%d %B, %Y", # '25 October, 2006' # "%d %B, %Y", # '25 October, 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
'%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59' "%m/%d/%Y %H:%M:%S", # '10/25/2006 14:30:59'
'%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200' "%m/%d/%Y %H:%M:%S.%f", # '10/25/2006 14:30:59.000200'
'%m/%d/%Y %H:%M', # '10/25/2006 14:30' "%m/%d/%Y %H:%M", # '10/25/2006 14:30'
'%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59' "%m/%d/%y %H:%M:%S", # '10/25/06 14:30:59'
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200' "%m/%d/%y %H:%M:%S.%f", # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30' "%m/%d/%y %H:%M", # '10/25/06 14:30'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = " " THOUSAND_SEPARATOR = " "
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,13 +2,13 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j ខែ F ឆ្នាំ Y' DATE_FORMAT = "j ខែ F ឆ្នាំ Y"
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j ខែ F ឆ្នាំ Y, G:i' DATETIME_FORMAT = "j ខែ F ឆ្នាំ Y, G:i"
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = "j M Y"
SHORT_DATETIME_FORMAT = 'j M Y, G:i' SHORT_DATETIME_FORMAT = "j M Y, G:i"
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
@ -16,6 +16,6 @@ SHORT_DATETIME_FORMAT = 'j M Y, G:i'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'h:i A' TIME_FORMAT = "h:i A"
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = "j M Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =

View File

@ -2,22 +2,22 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'Y년 n월 j일' DATE_FORMAT = "Y년 n월 j일"
TIME_FORMAT = 'A g:i' TIME_FORMAT = "A g:i"
DATETIME_FORMAT = 'Y년 n월 j일 g:i A' DATETIME_FORMAT = "Y년 n월 j일 g:i A"
YEAR_MONTH_FORMAT = 'Y년 n월' YEAR_MONTH_FORMAT = "Y년 n월"
MONTH_DAY_FORMAT = 'n월 j일' MONTH_DAY_FORMAT = "n월 j일"
SHORT_DATE_FORMAT = 'Y-n-j.' SHORT_DATE_FORMAT = "Y-n-j."
SHORT_DATETIME_FORMAT = 'Y-n-j H:i' SHORT_DATETIME_FORMAT = "Y-n-j H:i"
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position # Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%m/%d/%Y', # '10/25/2006' "%m/%d/%Y", # '10/25/2006'
'%m/%d/%y', # '10/25/06' "%m/%d/%y", # '10/25/06'
# "%b %d %Y", # 'Oct 25 2006' # "%b %d %Y", # 'Oct 25 2006'
# "%b %d, %Y", # 'Oct 25, 2006' # "%b %d, %Y", # 'Oct 25, 2006'
# "%d %b %Y", # '25 Oct 2006' # "%d %b %Y", # '25 Oct 2006'
@ -26,30 +26,29 @@ DATE_INPUT_FORMATS = [
# "%B %d, %Y", #'October 25, 2006' # "%B %d, %Y", #'October 25, 2006'
# "%d %B %Y", # '25 October 2006' # "%d %B %Y", # '25 October 2006'
# "%d %B, %Y", # '25 October, 2006' # "%d %B, %Y", # '25 October, 2006'
'%Y년 %m월 %d', # '2006년 10월 25일', with localized suffix. "%Y년 %m월 %d", # '2006년 10월 25일', with localized suffix.
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59' "%H:%M:%S", # '14:30:59'
'%H:%M:%S.%f', # '14:30:59.000200' "%H:%M:%S.%f", # '14:30:59.000200'
'%H:%M', # '14:30' "%H:%M", # '14:30'
'%H시 %M분 %S초', # '14시 30분 59초' "%H시 %M분 %S초", # '14시 30분 59초'
'%H시 %M분', # '14시 30분' "%H시 %M분", # '14시 30분'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59' "%m/%d/%Y %H:%M:%S", # '10/25/2006 14:30:59'
'%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200' "%m/%d/%Y %H:%M:%S.%f", # '10/25/2006 14:30:59.000200'
'%m/%d/%Y %H:%M', # '10/25/2006 14:30' "%m/%d/%Y %H:%M", # '10/25/2006 14:30'
'%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59' "%m/%d/%y %H:%M:%S", # '10/25/06 14:30:59'
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200' "%m/%d/%y %H:%M:%S.%f", # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30' "%m/%d/%y %H:%M", # '10/25/06 14:30'
"%Y년 %m월 %d%H시 %M분 %S초", # '2006년 10월 25일 14시 30분 59초'
'%Y년 %m월 %d%H시 %M분 %S초', # '2006년 10월 25일 14시 30분 59초' "%Y년 %m월 %d%H시 %M분", # '2006년 10월 25일 14시 30분'
'%Y년 %m월 %d%H시 %M분', # '2006년 10월 25일 14시 30분'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,31 +2,31 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j E Y ж.' DATE_FORMAT = "j E Y ж."
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j E Y ж. G:i' DATETIME_FORMAT = "j E Y ж. G:i"
YEAR_MONTH_FORMAT = 'F Y ж.' YEAR_MONTH_FORMAT = "F Y ж."
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Дүйшөмбү, Monday FIRST_DAY_OF_WEEK = 1 # Дүйшөмбү, Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,44 +2,44 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'Y \m. E j \d.' DATE_FORMAT = r"Y \m. E j \d."
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'Y \m. E j \d., H:i' DATETIME_FORMAT = r"Y \m. E j \d., H:i"
YEAR_MONTH_FORMAT = r'Y \m. F' YEAR_MONTH_FORMAT = r"Y \m. F"
MONTH_DAY_FORMAT = r'E j \d.' MONTH_DAY_FORMAT = r"E j \d."
SHORT_DATE_FORMAT = 'Y-m-d' SHORT_DATE_FORMAT = "Y-m-d"
SHORT_DATETIME_FORMAT = 'Y-m-d H:i' SHORT_DATETIME_FORMAT = "Y-m-d H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59' "%H:%M:%S", # '14:30:59'
'%H:%M:%S.%f', # '14:30:59.000200' "%H:%M:%S.%f", # '14:30:59.000200'
'%H:%M', # '14:30' "%H:%M", # '14:30'
'%H.%M.%S', # '14.30.59' "%H.%M.%S", # '14.30.59'
'%H.%M.%S.%f', # '14.30.59.000200' "%H.%M.%S.%f", # '14.30.59.000200'
'%H.%M', # '14.30' "%H.%M", # '14.30'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
'%d.%m.%y %H.%M.%S', # '25.10.06 14.30.59' "%d.%m.%y %H.%M.%S", # '25.10.06 14.30.59'
'%d.%m.%y %H.%M.%S.%f', # '25.10.06 14.30.59.000200' "%d.%m.%y %H.%M.%S.%f", # '25.10.06 14.30.59.000200'
'%d.%m.%y %H.%M', # '25.10.06 14.30' "%d.%m.%y %H.%M", # '25.10.06 14.30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,45 +2,45 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'Y. \g\a\d\a j. F' DATE_FORMAT = r"Y. \g\a\d\a j. F"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'Y. \g\a\d\a j. F, H:i' DATETIME_FORMAT = r"Y. \g\a\d\a j. F, H:i"
YEAR_MONTH_FORMAT = r'Y. \g. F' YEAR_MONTH_FORMAT = r"Y. \g. F"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = r'j.m.Y' SHORT_DATE_FORMAT = r"j.m.Y"
SHORT_DATETIME_FORMAT = 'j.m.Y H:i' SHORT_DATETIME_FORMAT = "j.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position # Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59' "%H:%M:%S", # '14:30:59'
'%H:%M:%S.%f', # '14:30:59.000200' "%H:%M:%S.%f", # '14:30:59.000200'
'%H:%M', # '14:30' "%H:%M", # '14:30'
'%H.%M.%S', # '14.30.59' "%H.%M.%S", # '14.30.59'
'%H.%M.%S.%f', # '14.30.59.000200' "%H.%M.%S.%f", # '14.30.59.000200'
'%H.%M', # '14.30' "%H.%M", # '14.30'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
'%d.%m.%y %H.%M.%S', # '25.10.06 14.30.59' "%d.%m.%y %H.%M.%S", # '25.10.06 14.30.59'
'%d.%m.%y %H.%M.%S.%f', # '25.10.06 14.30.59.000200' "%d.%m.%y %H.%M.%S.%f", # '25.10.06 14.30.59.000200'
'%d.%m.%y %H.%M', # '25.10.06 14.30' "%d.%m.%y %H.%M", # '25.10.06 14.30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = ' ' # Non-breaking space THOUSAND_SEPARATOR = " " # Non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,39 +2,39 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y' DATE_FORMAT = "d F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j. F Y H:i' DATETIME_FORMAT = "j. F Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'j.m.Y' SHORT_DATE_FORMAT = "j.m.Y"
SHORT_DATETIME_FORMAT = 'j.m.Y H:i' SHORT_DATETIME_FORMAT = "j.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
'%d. %m. %Y', # '25. 10. 2006' "%d. %m. %Y", # '25. 10. 2006'
'%d. %m. %y', # '25. 10. 06' "%d. %m. %y", # '25. 10. 06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
'%d. %m. %Y %H:%M:%S', # '25. 10. 2006 14:30:59' "%d. %m. %Y %H:%M:%S", # '25. 10. 2006 14:30:59'
'%d. %m. %Y %H:%M:%S.%f', # '25. 10. 2006 14:30:59.000200' "%d. %m. %Y %H:%M:%S.%f", # '25. 10. 2006 14:30:59.000200'
'%d. %m. %Y %H:%M', # '25. 10. 2006 14:30' "%d. %m. %Y %H:%M", # '25. 10. 2006 14:30'
'%d. %m. %y %H:%M:%S', # '25. 10. 06 14:30:59' "%d. %m. %y %H:%M:%S", # '25. 10. 06 14:30:59'
'%d. %m. %y %H:%M:%S.%f', # '25. 10. 06 14:30:59.000200' "%d. %m. %y %H:%M:%S.%f", # '25. 10. 06 14:30:59.000200'
'%d. %m. %y %H:%M', # '25. 10. 06 14:30' "%d. %m. %y %H:%M", # '25. 10. 06 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,22 +2,22 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'N j, Y' DATE_FORMAT = "N j, Y"
TIME_FORMAT = 'P' TIME_FORMAT = "P"
DATETIME_FORMAT = 'N j, Y, P' DATETIME_FORMAT = "N j, Y, P"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'F j' MONTH_DAY_FORMAT = "F j"
SHORT_DATE_FORMAT = 'm/d/Y' SHORT_DATE_FORMAT = "m/d/Y"
SHORT_DATETIME_FORMAT = 'm/d/Y P' SHORT_DATETIME_FORMAT = "m/d/Y P"
FIRST_DAY_OF_WEEK = 0 # Sunday FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position # Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%m/%d/%Y', # '10/25/2006' "%m/%d/%Y", # '10/25/2006'
'%m/%d/%y', # '10/25/06' "%m/%d/%y", # '10/25/06'
# "%b %d %Y", # 'Oct 25 2006' # "%b %d %Y", # 'Oct 25 2006'
# "%b %d, %Y", # 'Oct 25, 2006' # "%b %d, %Y", # 'Oct 25, 2006'
# "%d %b %Y", # '25 Oct 2006' # "%d %b %Y", # '25 Oct 2006'
@ -28,16 +28,16 @@ DATE_INPUT_FORMATS = [
# "%d %B, %Y", # '25 October, 2006' # "%d %B, %Y", # '25 October, 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59' "%m/%d/%Y %H:%M:%S", # '10/25/2006 14:30:59'
'%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200' "%m/%d/%Y %H:%M:%S.%f", # '10/25/2006 14:30:59.000200'
'%m/%d/%Y %H:%M', # '10/25/2006 14:30' "%m/%d/%Y %H:%M", # '10/25/2006 14:30'
'%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59' "%m/%d/%y %H:%M:%S", # '10/25/06 14:30:59'
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200' "%m/%d/%y %H:%M:%S.%f", # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30' "%m/%d/%y %H:%M", # '10/25/06 14:30'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y' DATE_FORMAT = "d F Y"
TIME_FORMAT = 'g:i A' TIME_FORMAT = "g:i A"
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
# MONTH_DAY_FORMAT = # MONTH_DAY_FORMAT =
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = "j M Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =

View File

@ -2,37 +2,37 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j M Y' # '25 Oct 2006' DATE_FORMAT = "j M Y" # '25 Oct 2006'
TIME_FORMAT = 'P' # '2:30 p.m.' TIME_FORMAT = "P" # '2:30 p.m.'
DATETIME_FORMAT = 'j M Y, P' # '25 Oct 2006, 2:30 p.m.' DATETIME_FORMAT = "j M Y, P" # '25 Oct 2006, 2:30 p.m.'
YEAR_MONTH_FORMAT = 'F Y' # 'October 2006' YEAR_MONTH_FORMAT = "F Y" # 'October 2006'
MONTH_DAY_FORMAT = 'j F' # '25 October' MONTH_DAY_FORMAT = "j F" # '25 October'
SHORT_DATE_FORMAT = 'd/m/Y' # '25/10/2006' SHORT_DATE_FORMAT = "d/m/Y" # '25/10/2006'
SHORT_DATETIME_FORMAT = 'd/m/Y P' # '25/10/2006 2:30 p.m.' SHORT_DATETIME_FORMAT = "d/m/Y P" # '25/10/2006 2:30 p.m.'
FIRST_DAY_OF_WEEK = 0 # Sunday FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
'%d %b %Y', # '25 Oct 2006' "%d %b %Y", # '25 Oct 2006'
'%d %b, %Y', # '25 Oct, 2006' "%d %b, %Y", # '25 Oct, 2006'
'%d %B %Y', # '25 October 2006' "%d %B %Y", # '25 October 2006'
'%d %B, %Y', # '25 October, 2006' "%d %B, %Y", # '25 October, 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30' "%d/%m/%Y %H:%M", # '25/10/2006 14:30'
'%d/%m/%y %H:%M:%S', # '25/10/06 14:30:59' "%d/%m/%y %H:%M:%S", # '25/10/06 14:30:59'
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200' "%d/%m/%y %H:%M:%S.%f", # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30' "%d/%m/%y %H:%M", # '25/10/06 14:30'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,22 +2,22 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y' DATE_FORMAT = "j. F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j. F Y H:i' DATETIME_FORMAT = "j. F Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position # Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
# "%d. %b %Y", # '25. okt 2006' # "%d. %b %Y", # '25. okt 2006'
# "%d %b %Y", # '25 okt 2006' # "%d %b %Y", # '25 okt 2006'
# "%d. %b. %Y", # '25. okt. 2006' # "%d. %b. %Y", # '25. okt. 2006'
@ -26,16 +26,16 @@ DATE_INPUT_FORMATS = [
# "%d %B %Y", # '25 oktober 2006' # "%d %B %Y", # '25 oktober 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,23 +2,23 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' # '20 januari 2009' DATE_FORMAT = "j F Y" # '20 januari 2009'
TIME_FORMAT = 'H:i' # '15:23' TIME_FORMAT = "H:i" # '15:23'
DATETIME_FORMAT = 'j F Y H:i' # '20 januari 2009 15:23' DATETIME_FORMAT = "j F Y H:i" # '20 januari 2009 15:23'
YEAR_MONTH_FORMAT = 'F Y' # 'januari 2009' YEAR_MONTH_FORMAT = "F Y" # 'januari 2009'
MONTH_DAY_FORMAT = 'j F' # '20 januari' MONTH_DAY_FORMAT = "j F" # '20 januari'
SHORT_DATE_FORMAT = 'j-n-Y' # '20-1-2009' SHORT_DATE_FORMAT = "j-n-Y" # '20-1-2009'
SHORT_DATETIME_FORMAT = 'j-n-Y H:i' # '20-1-2009 15:23' SHORT_DATETIME_FORMAT = "j-n-Y H:i" # '20-1-2009 15:23'
FIRST_DAY_OF_WEEK = 1 # Monday (in Dutch 'maandag') FIRST_DAY_OF_WEEK = 1 # Monday (in Dutch 'maandag')
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d-%m-%Y', # '20-01-2009' "%d-%m-%Y", # '20-01-2009'
'%d-%m-%y', # '20-01-09' "%d-%m-%y", # '20-01-09'
'%d/%m/%Y', # '20/01/2009' "%d/%m/%Y", # '20/01/2009'
'%d/%m/%y', # '20/01/09' "%d/%m/%y", # '20/01/09'
'%Y/%m/%d', # '2009/01/20' "%Y/%m/%d", # '2009/01/20'
# "%d %b %Y", # '20 jan 2009' # "%d %b %Y", # '20 jan 2009'
# "%d %b %y", # '20 jan 09' # "%d %b %y", # '20 jan 09'
# "%d %B %Y", # '20 januari 2009' # "%d %B %Y", # '20 januari 2009'
@ -26,67 +26,67 @@ DATE_INPUT_FORMATS = [
] ]
# Kept ISO formats as one is in first position # Kept ISO formats as one is in first position
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # '15:23:35' "%H:%M:%S", # '15:23:35'
'%H:%M:%S.%f', # '15:23:35.000200' "%H:%M:%S.%f", # '15:23:35.000200'
'%H.%M:%S', # '15.23:35' "%H.%M:%S", # '15.23:35'
'%H.%M:%S.%f', # '15.23:35.000200' "%H.%M:%S.%f", # '15.23:35.000200'
'%H.%M', # '15.23' "%H.%M", # '15.23'
'%H:%M', # '15:23' "%H:%M", # '15:23'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
# With time in %H:%M:%S : # With time in %H:%M:%S :
'%d-%m-%Y %H:%M:%S', # '20-01-2009 15:23:35' "%d-%m-%Y %H:%M:%S", # '20-01-2009 15:23:35'
'%d-%m-%y %H:%M:%S', # '20-01-09 15:23:35' "%d-%m-%y %H:%M:%S", # '20-01-09 15:23:35'
'%Y-%m-%d %H:%M:%S', # '2009-01-20 15:23:35' "%Y-%m-%d %H:%M:%S", # '2009-01-20 15:23:35'
'%d/%m/%Y %H:%M:%S', # '20/01/2009 15:23:35' "%d/%m/%Y %H:%M:%S", # '20/01/2009 15:23:35'
'%d/%m/%y %H:%M:%S', # '20/01/09 15:23:35' "%d/%m/%y %H:%M:%S", # '20/01/09 15:23:35'
'%Y/%m/%d %H:%M:%S', # '2009/01/20 15:23:35' "%Y/%m/%d %H:%M:%S", # '2009/01/20 15:23:35'
# "%d %b %Y %H:%M:%S", # '20 jan 2009 15:23:35' # "%d %b %Y %H:%M:%S", # '20 jan 2009 15:23:35'
# "%d %b %y %H:%M:%S", # '20 jan 09 15:23:35' # "%d %b %y %H:%M:%S", # '20 jan 09 15:23:35'
# "%d %B %Y %H:%M:%S", # '20 januari 2009 15:23:35' # "%d %B %Y %H:%M:%S", # '20 januari 2009 15:23:35'
# "%d %B %y %H:%M:%S", # '20 januari 2009 15:23:35' # "%d %B %y %H:%M:%S", # '20 januari 2009 15:23:35'
# With time in %H:%M:%S.%f : # With time in %H:%M:%S.%f :
'%d-%m-%Y %H:%M:%S.%f', # '20-01-2009 15:23:35.000200' "%d-%m-%Y %H:%M:%S.%f", # '20-01-2009 15:23:35.000200'
'%d-%m-%y %H:%M:%S.%f', # '20-01-09 15:23:35.000200' "%d-%m-%y %H:%M:%S.%f", # '20-01-09 15:23:35.000200'
'%Y-%m-%d %H:%M:%S.%f', # '2009-01-20 15:23:35.000200' "%Y-%m-%d %H:%M:%S.%f", # '2009-01-20 15:23:35.000200'
'%d/%m/%Y %H:%M:%S.%f', # '20/01/2009 15:23:35.000200' "%d/%m/%Y %H:%M:%S.%f", # '20/01/2009 15:23:35.000200'
'%d/%m/%y %H:%M:%S.%f', # '20/01/09 15:23:35.000200' "%d/%m/%y %H:%M:%S.%f", # '20/01/09 15:23:35.000200'
'%Y/%m/%d %H:%M:%S.%f', # '2009/01/20 15:23:35.000200' "%Y/%m/%d %H:%M:%S.%f", # '2009/01/20 15:23:35.000200'
# With time in %H.%M:%S : # With time in %H.%M:%S :
'%d-%m-%Y %H.%M:%S', # '20-01-2009 15.23:35' "%d-%m-%Y %H.%M:%S", # '20-01-2009 15.23:35'
'%d-%m-%y %H.%M:%S', # '20-01-09 15.23:35' "%d-%m-%y %H.%M:%S", # '20-01-09 15.23:35'
'%d/%m/%Y %H.%M:%S', # '20/01/2009 15.23:35' "%d/%m/%Y %H.%M:%S", # '20/01/2009 15.23:35'
'%d/%m/%y %H.%M:%S', # '20/01/09 15.23:35' "%d/%m/%y %H.%M:%S", # '20/01/09 15.23:35'
# "%d %b %Y %H.%M:%S", # '20 jan 2009 15.23:35' # "%d %b %Y %H.%M:%S", # '20 jan 2009 15.23:35'
# "%d %b %y %H.%M:%S", # '20 jan 09 15.23:35' # "%d %b %y %H.%M:%S", # '20 jan 09 15.23:35'
# "%d %B %Y %H.%M:%S", # '20 januari 2009 15.23:35' # "%d %B %Y %H.%M:%S", # '20 januari 2009 15.23:35'
# "%d %B %y %H.%M:%S", # '20 januari 2009 15.23:35' # "%d %B %y %H.%M:%S", # '20 januari 2009 15.23:35'
# With time in %H.%M:%S.%f : # With time in %H.%M:%S.%f :
'%d-%m-%Y %H.%M:%S.%f', # '20-01-2009 15.23:35.000200' "%d-%m-%Y %H.%M:%S.%f", # '20-01-2009 15.23:35.000200'
'%d-%m-%y %H.%M:%S.%f', # '20-01-09 15.23:35.000200' "%d-%m-%y %H.%M:%S.%f", # '20-01-09 15.23:35.000200'
'%d/%m/%Y %H.%M:%S.%f', # '20/01/2009 15.23:35.000200' "%d/%m/%Y %H.%M:%S.%f", # '20/01/2009 15.23:35.000200'
'%d/%m/%y %H.%M:%S.%f', # '20/01/09 15.23:35.000200' "%d/%m/%y %H.%M:%S.%f", # '20/01/09 15.23:35.000200'
# With time in %H:%M : # With time in %H:%M :
'%d-%m-%Y %H:%M', # '20-01-2009 15:23' "%d-%m-%Y %H:%M", # '20-01-2009 15:23'
'%d-%m-%y %H:%M', # '20-01-09 15:23' "%d-%m-%y %H:%M", # '20-01-09 15:23'
'%Y-%m-%d %H:%M', # '2009-01-20 15:23' "%Y-%m-%d %H:%M", # '2009-01-20 15:23'
'%d/%m/%Y %H:%M', # '20/01/2009 15:23' "%d/%m/%Y %H:%M", # '20/01/2009 15:23'
'%d/%m/%y %H:%M', # '20/01/09 15:23' "%d/%m/%y %H:%M", # '20/01/09 15:23'
'%Y/%m/%d %H:%M', # '2009/01/20 15:23' "%Y/%m/%d %H:%M", # '2009/01/20 15:23'
# "%d %b %Y %H:%M", # '20 jan 2009 15:23' # "%d %b %Y %H:%M", # '20 jan 2009 15:23'
# "%d %b %y %H:%M", # '20 jan 09 15:23' # "%d %b %y %H:%M", # '20 jan 09 15:23'
# "%d %B %Y %H:%M", # '20 januari 2009 15:23' # "%d %B %Y %H:%M", # '20 januari 2009 15:23'
# "%d %B %y %H:%M", # '20 januari 2009 15:23' # "%d %B %y %H:%M", # '20 januari 2009 15:23'
# With time in %H.%M : # With time in %H.%M :
'%d-%m-%Y %H.%M', # '20-01-2009 15.23' "%d-%m-%Y %H.%M", # '20-01-2009 15.23'
'%d-%m-%y %H.%M', # '20-01-09 15.23' "%d-%m-%y %H.%M", # '20-01-09 15.23'
'%d/%m/%Y %H.%M', # '20/01/2009 15.23' "%d/%m/%Y %H.%M", # '20/01/2009 15.23'
'%d/%m/%y %H.%M', # '20/01/09 15.23' "%d/%m/%y %H.%M", # '20/01/09 15.23'
# "%d %b %Y %H.%M", # '20 jan 2009 15.23' # "%d %b %Y %H.%M", # '20 jan 2009 15.23'
# "%d %b %y %H.%M", # '20 jan 09 15.23' # "%d %b %y %H.%M", # '20 jan 09 15.23'
# "%d %B %Y %H.%M", # '20 januari 2009 15.23' # "%d %B %Y %H.%M", # '20 januari 2009 15.23'
# "%d %B %y %H.%M", # '20 januari 2009 15.23' # "%d %B %y %H.%M", # '20 januari 2009 15.23'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,22 +2,22 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y' DATE_FORMAT = "j. F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j. F Y H:i' DATETIME_FORMAT = "j. F Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position # Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
# "%d. %b %Y", # '25. okt 2006' # "%d. %b %Y", # '25. okt 2006'
# "%d %b %Y", # '25 okt 2006' # "%d %b %Y", # '25 okt 2006'
# "%d. %b. %Y", # '25. okt. 2006' # "%d. %b. %Y", # '25. okt. 2006'
@ -26,16 +26,16 @@ DATE_INPUT_FORMATS = [
# "%d %B %Y", # '25 oktober 2006' # "%d %B %Y", # '25 oktober 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,29 +2,29 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j E Y' DATE_FORMAT = "j E Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j E Y H:i' DATETIME_FORMAT = "j E Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j E' MONTH_DAY_FORMAT = "j E"
SHORT_DATE_FORMAT = 'd-m-Y' SHORT_DATE_FORMAT = "d-m-Y"
SHORT_DATETIME_FORMAT = 'd-m-Y H:i' SHORT_DATETIME_FORMAT = "d-m-Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
'%y-%m-%d', # '06-10-25' "%y-%m-%d", # '06-10-25'
# "%d. %B %Y", # '25. października 2006' # "%d. %B %Y", # '25. października 2006'
# "%d. %b. %Y", # '25. paź. 2006' # "%d. %b. %Y", # '25. paź. 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = ' ' THOUSAND_SEPARATOR = " "
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,38 +2,38 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j \d\e F \d\e Y' DATE_FORMAT = r"j \d\e F \d\e Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'j \d\e F \d\e Y à\s H:i' DATETIME_FORMAT = r"j \d\e F \d\e Y à\s H:i"
YEAR_MONTH_FORMAT = r'F \d\e Y' YEAR_MONTH_FORMAT = r"F \d\e Y"
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r"j \d\e F"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
SHORT_DATETIME_FORMAT = 'd/m/Y H:i' SHORT_DATETIME_FORMAT = "d/m/Y H:i"
FIRST_DAY_OF_WEEK = 0 # Sunday FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position # Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
# "%d de %b de %Y", # '25 de Out de 2006' # "%d de %b de %Y", # '25 de Out de 2006'
# "%d de %b, %Y", # '25 Out, 2006' # "%d de %b, %Y", # '25 Out, 2006'
# "%d de %B de %Y", # '25 de Outubro de 2006' # "%d de %B de %Y", # '25 de Outubro de 2006'
# "%d de %B, %Y", # '25 de Outubro, 2006' # "%d de %B, %Y", # '25 de Outubro, 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30' "%d/%m/%Y %H:%M", # '25/10/2006 14:30'
'%d/%m/%y %H:%M:%S', # '25/10/06 14:30:59' "%d/%m/%y %H:%M:%S", # '25/10/06 14:30:59'
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200' "%d/%m/%y %H:%M:%S.%f", # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30' "%d/%m/%y %H:%M", # '25/10/06 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,33 +2,33 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j \d\e F \d\e Y' DATE_FORMAT = r"j \d\e F \d\e Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'j \d\e F \d\e Y à\s H:i' DATETIME_FORMAT = r"j \d\e F \d\e Y à\s H:i"
YEAR_MONTH_FORMAT = r'F \d\e Y' YEAR_MONTH_FORMAT = r"F \d\e Y"
MONTH_DAY_FORMAT = r'j \d\e F' MONTH_DAY_FORMAT = r"j \d\e F"
SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATE_FORMAT = "d/m/Y"
SHORT_DATETIME_FORMAT = 'd/m/Y H:i' SHORT_DATETIME_FORMAT = "d/m/Y H:i"
FIRST_DAY_OF_WEEK = 0 # Sunday FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
# "%d de %b de %Y", # '24 de Out de 2006' # "%d de %b de %Y", # '24 de Out de 2006'
# "%d de %b, %Y", # '25 Out, 2006' # "%d de %b, %Y", # '25 Out, 2006'
# "%d de %B de %Y", # '25 de Outubro de 2006' # "%d de %B de %Y", # '25 de Outubro de 2006'
# "%d de %B, %Y", # '25 de Outubro, 2006' # "%d de %B, %Y", # '25 de Outubro, 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30' "%d/%m/%Y %H:%M", # '25/10/2006 14:30'
'%d/%m/%y %H:%M:%S', # '25/10/06 14:30:59' "%d/%m/%y %H:%M:%S", # '25/10/06 14:30:59'
'%d/%m/%y %H:%M:%S.%f', # '25/10/06 14:30:59.000200' "%d/%m/%y %H:%M:%S.%f", # '25/10/06 14:30:59.000200'
'%d/%m/%y %H:%M', # '25/10/06 14:30' "%d/%m/%y %H:%M", # '25/10/06 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,34 +2,34 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j F Y, H:i' DATETIME_FORMAT = "j F Y, H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y, H:i' SHORT_DATETIME_FORMAT = "d.m.Y, H:i"
FIRST_DAY_OF_WEEK = 1 FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', "%d.%m.%Y",
'%d.%b.%Y', "%d.%b.%Y",
'%d %B %Y', "%d %B %Y",
'%A, %d %B %Y', "%A, %d %B %Y",
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M', "%H:%M",
'%H:%M:%S', "%H:%M:%S",
'%H:%M:%S.%f', "%H:%M:%S.%f",
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y, %H:%M', "%d.%m.%Y, %H:%M",
'%d.%m.%Y, %H:%M:%S', "%d.%m.%Y, %H:%M:%S",
'%d.%B.%Y, %H:%M', "%d.%B.%Y, %H:%M",
'%d.%B.%Y, %H:%M:%S', "%d.%B.%Y, %H:%M:%S",
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,29 +2,29 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j E Y г.' DATE_FORMAT = "j E Y г."
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j E Y г. G:i' DATETIME_FORMAT = "j E Y г. G:i"
YEAR_MONTH_FORMAT = 'F Y г.' YEAR_MONTH_FORMAT = "F Y г."
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,29 +2,29 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y' DATE_FORMAT = "j. F Y"
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j. F Y G:i' DATETIME_FORMAT = "j. F Y G:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y G:i' SHORT_DATETIME_FORMAT = "d.m.Y G:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
'%y-%m-%d', # '06-10-25' "%y-%m-%d", # '06-10-25'
# "%d. %B %Y", # '25. October 2006' # "%d. %B %Y", # '25. October 2006'
# "%d. %b. %Y", # '25. Oct. 2006' # "%d. %b. %Y", # '25. Oct. 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,43 +2,43 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd. F Y' DATE_FORMAT = "d. F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j. F Y. H:i' DATETIME_FORMAT = "j. F Y. H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'j. M. Y' SHORT_DATE_FORMAT = "j. M. Y"
SHORT_DATETIME_FORMAT = 'j.n.Y. H:i' SHORT_DATETIME_FORMAT = "j.n.Y. H:i"
FIRST_DAY_OF_WEEK = 0 FIRST_DAY_OF_WEEK = 0
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
'%d-%m-%Y', # '25-10-2006' "%d-%m-%Y", # '25-10-2006'
'%d. %m. %Y', # '25. 10. 2006' "%d. %m. %Y", # '25. 10. 2006'
'%d. %m. %y', # '25. 10. 06' "%d. %m. %y", # '25. 10. 06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
'%d-%m-%Y %H:%M:%S', # '25-10-2006 14:30:59' "%d-%m-%Y %H:%M:%S", # '25-10-2006 14:30:59'
'%d-%m-%Y %H:%M:%S.%f', # '25-10-2006 14:30:59.000200' "%d-%m-%Y %H:%M:%S.%f", # '25-10-2006 14:30:59.000200'
'%d-%m-%Y %H:%M', # '25-10-2006 14:30' "%d-%m-%Y %H:%M", # '25-10-2006 14:30'
'%d. %m. %Y %H:%M:%S', # '25. 10. 2006 14:30:59' "%d. %m. %Y %H:%M:%S", # '25. 10. 2006 14:30:59'
'%d. %m. %Y %H:%M:%S.%f', # '25. 10. 2006 14:30:59.000200' "%d. %m. %Y %H:%M:%S.%f", # '25. 10. 2006 14:30:59.000200'
'%d. %m. %Y %H:%M', # '25. 10. 2006 14:30' "%d. %m. %Y %H:%M", # '25. 10. 2006 14:30'
'%d. %m. %y %H:%M:%S', # '25. 10. 06 14:30:59' "%d. %m. %y %H:%M:%S", # '25. 10. 06 14:30:59'
'%d. %m. %y %H:%M:%S.%f', # '25. 10. 06 14:30:59.000200' "%d. %m. %y %H:%M:%S.%f", # '25. 10. 06 14:30:59.000200'
'%d. %m. %y %H:%M', # '25. 10. 06 14:30' "%d. %m. %y %H:%M", # '25. 10. 06 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y' DATE_FORMAT = "d F Y"
TIME_FORMAT = 'g.i.A' TIME_FORMAT = "g.i.A"
# DATETIME_FORMAT = # DATETIME_FORMAT =
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'Y-m-d' SHORT_DATE_FORMAT = "Y-m-d"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
@ -16,6 +16,6 @@ SHORT_DATE_FORMAT = 'Y-m-d'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,22 +2,22 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y.' DATE_FORMAT = "j. F Y."
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j. F Y. H:i' DATETIME_FORMAT = "j. F Y. H:i"
YEAR_MONTH_FORMAT = 'F Y.' YEAR_MONTH_FORMAT = "F Y."
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'j.m.Y.' SHORT_DATE_FORMAT = "j.m.Y."
SHORT_DATETIME_FORMAT = 'j.m.Y. H:i' SHORT_DATETIME_FORMAT = "j.m.Y. H:i"
FIRST_DAY_OF_WEEK = 1 FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y.', # '25.10.2006.' "%d.%m.%Y.", # '25.10.2006.'
'%d.%m.%y.', # '25.10.06.' "%d.%m.%y.", # '25.10.06.'
'%d. %m. %Y.', # '25. 10. 2006.' "%d. %m. %Y.", # '25. 10. 2006.'
'%d. %m. %y.', # '25. 10. 06.' "%d. %m. %y.", # '25. 10. 06.'
# "%d. %b %y.", # '25. Oct 06.' # "%d. %b %y.", # '25. Oct 06.'
# "%d. %B %y.", # '25. October 06.' # "%d. %B %y.", # '25. October 06.'
# "%d. %b '%y.", # '25. Oct '06.' # "%d. %b '%y.", # '25. Oct '06.'
@ -26,19 +26,19 @@ DATE_INPUT_FORMATS = [
# "%d. %B %Y.", # '25. October 2006.' # "%d. %B %Y.", # '25. October 2006.'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y. %H:%M:%S', # '25.10.2006. 14:30:59' "%d.%m.%Y. %H:%M:%S", # '25.10.2006. 14:30:59'
'%d.%m.%Y. %H:%M:%S.%f', # '25.10.2006. 14:30:59.000200' "%d.%m.%Y. %H:%M:%S.%f", # '25.10.2006. 14:30:59.000200'
'%d.%m.%Y. %H:%M', # '25.10.2006. 14:30' "%d.%m.%Y. %H:%M", # '25.10.2006. 14:30'
'%d.%m.%y. %H:%M:%S', # '25.10.06. 14:30:59' "%d.%m.%y. %H:%M:%S", # '25.10.06. 14:30:59'
'%d.%m.%y. %H:%M:%S.%f', # '25.10.06. 14:30:59.000200' "%d.%m.%y. %H:%M:%S.%f", # '25.10.06. 14:30:59.000200'
'%d.%m.%y. %H:%M', # '25.10.06. 14:30' "%d.%m.%y. %H:%M", # '25.10.06. 14:30'
'%d. %m. %Y. %H:%M:%S', # '25. 10. 2006. 14:30:59' "%d. %m. %Y. %H:%M:%S", # '25. 10. 2006. 14:30:59'
'%d. %m. %Y. %H:%M:%S.%f', # '25. 10. 2006. 14:30:59.000200' "%d. %m. %Y. %H:%M:%S.%f", # '25. 10. 2006. 14:30:59.000200'
'%d. %m. %Y. %H:%M', # '25. 10. 2006. 14:30' "%d. %m. %Y. %H:%M", # '25. 10. 2006. 14:30'
'%d. %m. %y. %H:%M:%S', # '25. 10. 06. 14:30:59' "%d. %m. %y. %H:%M:%S", # '25. 10. 06. 14:30:59'
'%d. %m. %y. %H:%M:%S.%f', # '25. 10. 06. 14:30:59.000200' "%d. %m. %y. %H:%M:%S.%f", # '25. 10. 06. 14:30:59.000200'
'%d. %m. %y. %H:%M', # '25. 10. 06. 14:30' "%d. %m. %y. %H:%M", # '25. 10. 06. 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,22 +2,22 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y.' DATE_FORMAT = "j. F Y."
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j. F Y. H:i' DATETIME_FORMAT = "j. F Y. H:i"
YEAR_MONTH_FORMAT = 'F Y.' YEAR_MONTH_FORMAT = "F Y."
MONTH_DAY_FORMAT = 'j. F' MONTH_DAY_FORMAT = "j. F"
SHORT_DATE_FORMAT = 'j.m.Y.' SHORT_DATE_FORMAT = "j.m.Y."
SHORT_DATETIME_FORMAT = 'j.m.Y. H:i' SHORT_DATETIME_FORMAT = "j.m.Y. H:i"
FIRST_DAY_OF_WEEK = 1 FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y.', # '25.10.2006.' "%d.%m.%Y.", # '25.10.2006.'
'%d.%m.%y.', # '25.10.06.' "%d.%m.%y.", # '25.10.06.'
'%d. %m. %Y.', # '25. 10. 2006.' "%d. %m. %Y.", # '25. 10. 2006.'
'%d. %m. %y.', # '25. 10. 06.' "%d. %m. %y.", # '25. 10. 06.'
# "%d. %b %y.", # '25. Oct 06.' # "%d. %b %y.", # '25. Oct 06.'
# "%d. %B %y.", # '25. October 06.' # "%d. %B %y.", # '25. October 06.'
# "%d. %b '%y.", # '25. Oct '06.' # "%d. %b '%y.", # '25. Oct '06.'
@ -26,19 +26,19 @@ DATE_INPUT_FORMATS = [
# "%d. %B %Y.", # '25. October 2006.' # "%d. %B %Y.", # '25. October 2006.'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y. %H:%M:%S', # '25.10.2006. 14:30:59' "%d.%m.%Y. %H:%M:%S", # '25.10.2006. 14:30:59'
'%d.%m.%Y. %H:%M:%S.%f', # '25.10.2006. 14:30:59.000200' "%d.%m.%Y. %H:%M:%S.%f", # '25.10.2006. 14:30:59.000200'
'%d.%m.%Y. %H:%M', # '25.10.2006. 14:30' "%d.%m.%Y. %H:%M", # '25.10.2006. 14:30'
'%d.%m.%y. %H:%M:%S', # '25.10.06. 14:30:59' "%d.%m.%y. %H:%M:%S", # '25.10.06. 14:30:59'
'%d.%m.%y. %H:%M:%S.%f', # '25.10.06. 14:30:59.000200' "%d.%m.%y. %H:%M:%S.%f", # '25.10.06. 14:30:59.000200'
'%d.%m.%y. %H:%M', # '25.10.06. 14:30' "%d.%m.%y. %H:%M", # '25.10.06. 14:30'
'%d. %m. %Y. %H:%M:%S', # '25. 10. 2006. 14:30:59' "%d. %m. %Y. %H:%M:%S", # '25. 10. 2006. 14:30:59'
'%d. %m. %Y. %H:%M:%S.%f', # '25. 10. 2006. 14:30:59.000200' "%d. %m. %Y. %H:%M:%S.%f", # '25. 10. 2006. 14:30:59.000200'
'%d. %m. %Y. %H:%M', # '25. 10. 2006. 14:30' "%d. %m. %Y. %H:%M", # '25. 10. 2006. 14:30'
'%d. %m. %y. %H:%M:%S', # '25. 10. 06. 14:30:59' "%d. %m. %y. %H:%M:%S", # '25. 10. 06. 14:30:59'
'%d. %m. %y. %H:%M:%S.%f', # '25. 10. 06. 14:30:59.000200' "%d. %m. %y. %H:%M:%S.%f", # '25. 10. 06. 14:30:59.000200'
'%d. %m. %y. %H:%M', # '25. 10. 06. 14:30' "%d. %m. %y. %H:%M", # '25. 10. 06. 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,34 +2,34 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'j F Y H:i' DATETIME_FORMAT = "j F Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'Y-m-d' SHORT_DATE_FORMAT = "Y-m-d"
SHORT_DATETIME_FORMAT = 'Y-m-d H:i' SHORT_DATETIME_FORMAT = "Y-m-d H:i"
FIRST_DAY_OF_WEEK = 1 FIRST_DAY_OF_WEEK = 1
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position # Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y-%m-%d', # '2006-10-25' "%Y-%m-%d", # '2006-10-25'
'%m/%d/%Y', # '10/25/2006' "%m/%d/%Y", # '10/25/2006'
'%m/%d/%y', # '10/25/06' "%m/%d/%y", # '10/25/06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200'
'%Y-%m-%d %H:%M', # '2006-10-25 14:30' "%Y-%m-%d %H:%M", # '2006-10-25 14:30'
'%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59' "%m/%d/%Y %H:%M:%S", # '10/25/2006 14:30:59'
'%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200' "%m/%d/%Y %H:%M:%S.%f", # '10/25/2006 14:30:59.000200'
'%m/%d/%Y %H:%M', # '10/25/2006 14:30' "%m/%d/%Y %H:%M", # '10/25/2006 14:30'
'%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59' "%m/%d/%y %H:%M:%S", # '10/25/06 14:30:59'
'%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200' "%m/%d/%y %H:%M:%S.%f", # '10/25/06 14:30:59.000200'
'%m/%d/%y %H:%M', # '10/25/06 14:30' "%m/%d/%y %H:%M", # '10/25/06 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F, Y' DATE_FORMAT = "j F, Y"
TIME_FORMAT = 'g:i A' TIME_FORMAT = "g:i A"
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j M, Y' SHORT_DATE_FORMAT = "j M, Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =

View File

@ -2,12 +2,12 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'g:i A' TIME_FORMAT = "g:i A"
# DATETIME_FORMAT = # DATETIME_FORMAT =
# YEAR_MONTH_FORMAT = # YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = "j M Y"
# SHORT_DATETIME_FORMAT = # SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =

View File

@ -2,31 +2,31 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j E Y г.' DATE_FORMAT = "j E Y г."
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j E Y г. G:i' DATETIME_FORMAT = "j E Y г. G:i"
YEAR_MONTH_FORMAT = 'F Y г.' YEAR_MONTH_FORMAT = "F Y г."
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,32 +2,32 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y' DATE_FORMAT = "j F Y"
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j F Y, G:i' DATETIME_FORMAT = "j F Y, G:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'j M Y' SHORT_DATE_FORMAT = "j M Y"
SHORT_DATETIME_FORMAT = 'j M Y, G:i' SHORT_DATETIME_FORMAT = "j M Y, G:i"
FIRST_DAY_OF_WEEK = 0 # Sunday FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # 25/10/2006 "%d/%m/%Y", # 25/10/2006
'%d %b %Y', # 25 ต.ค. 2006 "%d %b %Y", # 25 ต.ค. 2006
'%d %B %Y', # 25 ตุลาคม 2006 "%d %B %Y", # 25 ตุลาคม 2006
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # 14:30:59 "%H:%M:%S", # 14:30:59
'%H:%M:%S.%f', # 14:30:59.000200 "%H:%M:%S.%f", # 14:30:59.000200
'%H:%M', # 14:30 "%H:%M", # 14:30
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # 25/10/2006 14:30:59 "%d/%m/%Y %H:%M:%S", # 25/10/2006 14:30:59
'%d/%m/%Y %H:%M:%S.%f', # 25/10/2006 14:30:59.000200 "%d/%m/%Y %H:%M:%S.%f", # 25/10/2006 14:30:59.000200
'%d/%m/%Y %H:%M', # 25/10/2006 14:30 "%d/%m/%Y %H:%M", # 25/10/2006 14:30
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = ',' THOUSAND_SEPARATOR = ","
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,31 +2,31 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j E Y г.' DATE_FORMAT = "j E Y г."
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = 'j E Y г. G:i' DATETIME_FORMAT = "j E Y г. G:i"
YEAR_MONTH_FORMAT = 'F Y г.' YEAR_MONTH_FORMAT = "F Y г."
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d.%m.%y %H:%M:%S', # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59'
'%d.%m.%y %H:%M:%S.%f', # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
'%d.%m.%y %H:%M', # '25.10.06 14:30' "%d.%m.%y %H:%M", # '25.10.06 14:30'
'%d.%m.%y', # '25.10.06' "%d.%m.%y", # '25.10.06'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,29 +2,29 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y' DATE_FORMAT = "d F Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'd F Y H:i' DATETIME_FORMAT = "d F Y H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'd F' MONTH_DAY_FORMAT = "d F"
SHORT_DATE_FORMAT = 'd M Y' SHORT_DATE_FORMAT = "d M Y"
SHORT_DATETIME_FORMAT = 'd M Y H:i' SHORT_DATETIME_FORMAT = "d M Y H:i"
FIRST_DAY_OF_WEEK = 1 # Pazartesi FIRST_DAY_OF_WEEK = 1 # Pazartesi
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d/%m/%Y', # '25/10/2006' "%d/%m/%Y", # '25/10/2006'
'%d/%m/%y', # '25/10/06' "%d/%m/%y", # '25/10/06'
'%y-%m-%d', # '06-10-25' "%y-%m-%d", # '06-10-25'
# "%d %B %Y", # '25 Ekim 2006' # "%d %B %Y", # '25 Ekim 2006'
# "%d %b. %Y", # '25 Eki. 2006' # "%d %b. %Y", # '25 Eki. 2006'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59'
'%d/%m/%Y %H:%M:%S.%f', # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200'
'%d/%m/%Y %H:%M', # '25/10/2006 14:30' "%d/%m/%Y %H:%M", # '25/10/2006 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,34 +2,34 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd E Y р.' DATE_FORMAT = "d E Y р."
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = 'd E Y р. H:i' DATETIME_FORMAT = "d E Y р. H:i"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'd F' MONTH_DAY_FORMAT = "d F"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d %B %Y', # '25 October 2006' "%d %B %Y", # '25 October 2006'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M:%S', # '14:30:59' "%H:%M:%S", # '14:30:59'
'%H:%M:%S.%f', # '14:30:59.000200' "%H:%M:%S.%f", # '14:30:59.000200'
'%H:%M', # '14:30' "%H:%M", # '14:30'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d %B %Y %H:%M:%S', # '25 October 2006 14:30:59' "%d %B %Y %H:%M:%S", # '25 October 2006 14:30:59'
'%d %B %Y %H:%M:%S.%f', # '25 October 2006 14:30:59.000200' "%d %B %Y %H:%M:%S.%f", # '25 October 2006 14:30:59.000200'
'%d %B %Y %H:%M', # '25 October 2006 14:30' "%d %B %Y %H:%M", # '25 October 2006 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,29 +2,29 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'j-E, Y-\y\i\l' DATE_FORMAT = r"j-E, Y-\y\i\l"
TIME_FORMAT = 'G:i' TIME_FORMAT = "G:i"
DATETIME_FORMAT = r'j-E, Y-\y\i\l G:i' DATETIME_FORMAT = r"j-E, Y-\y\i\l G:i"
YEAR_MONTH_FORMAT = r'F Y-\y\i\l' YEAR_MONTH_FORMAT = r"F Y-\y\i\l"
MONTH_DAY_FORMAT = 'j-E' MONTH_DAY_FORMAT = "j-E"
SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATE_FORMAT = "d.m.Y"
SHORT_DATETIME_FORMAT = 'd.m.Y H:i' SHORT_DATETIME_FORMAT = "d.m.Y H:i"
FIRST_DAY_OF_WEEK = 1 # Monday FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%d.%m.%Y', # '25.10.2006' "%d.%m.%Y", # '25.10.2006'
'%d-%B, %Y-yil', # '25-Oktabr, 2006-yil' "%d-%B, %Y-yil", # '25-Oktabr, 2006-yil'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
'%d.%m.%Y %H:%M:%S.%f', # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200'
'%d.%m.%Y %H:%M', # '25.10.2006 14:30' "%d.%m.%Y %H:%M", # '25.10.2006 14:30'
'%d-%B, %Y-yil %H:%M:%S', # '25-Oktabr, 2006-yil 14:30:59' "%d-%B, %Y-yil %H:%M:%S", # '25-Oktabr, 2006-yil 14:30:59'
'%d-%B, %Y-yil %H:%M:%S.%f', # '25-Oktabr, 2006-yil 14:30:59.000200' "%d-%B, %Y-yil %H:%M:%S.%f", # '25-Oktabr, 2006-yil 14:30:59.000200'
'%d-%B, %Y-yil %H:%M', # '25-Oktabr, 2006-yil 14:30' "%d-%B, %Y-yil %H:%M", # '25-Oktabr, 2006-yil 14:30'
] ]
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '\xa0' # non-breaking space THOUSAND_SEPARATOR = "\xa0" # non-breaking space
NUMBER_GROUPING = 3 NUMBER_GROUPING = 3

View File

@ -2,13 +2,13 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'\N\\y d \t\\n\g n \\m Y' DATE_FORMAT = r"\N\\y d \t\\n\g n \\m Y"
TIME_FORMAT = 'H:i' TIME_FORMAT = "H:i"
DATETIME_FORMAT = r'H:i \N\\y d \t\\n\g n \\m Y' DATETIME_FORMAT = r"H:i \N\\y d \t\\n\g n \\m Y"
YEAR_MONTH_FORMAT = 'F Y' YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = 'j F' MONTH_DAY_FORMAT = "j F"
SHORT_DATE_FORMAT = 'd-m-Y' SHORT_DATE_FORMAT = "d-m-Y"
SHORT_DATETIME_FORMAT = 'H:i d-m-Y' SHORT_DATETIME_FORMAT = "H:i d-m-Y"
# FIRST_DAY_OF_WEEK = # FIRST_DAY_OF_WEEK =
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
@ -16,6 +16,6 @@ SHORT_DATETIME_FORMAT = 'H:i d-m-Y'
# DATE_INPUT_FORMATS = # DATE_INPUT_FORMATS =
# TIME_INPUT_FORMATS = # TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS = # DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ',' DECIMAL_SEPARATOR = ","
THOUSAND_SEPARATOR = '.' THOUSAND_SEPARATOR = "."
# NUMBER_GROUPING = # NUMBER_GROUPING =

View File

@ -2,41 +2,41 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'Y年n月j日' # 2016年9月5日 DATE_FORMAT = "Y年n月j日" # 2016年9月5日
TIME_FORMAT = 'H:i' # 20:45 TIME_FORMAT = "H:i" # 20:45
DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45 DATETIME_FORMAT = "Y年n月j日 H:i" # 2016年9月5日 20:45
YEAR_MONTH_FORMAT = 'Y年n月' # 2016年9月 YEAR_MONTH_FORMAT = "Y年n月" # 2016年9月
MONTH_DAY_FORMAT = 'm月j日' # 9月5日 MONTH_DAY_FORMAT = "m月j日" # 9月5日
SHORT_DATE_FORMAT = 'Y年n月j日' # 2016年9月5日 SHORT_DATE_FORMAT = "Y年n月j日" # 2016年9月5日
SHORT_DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45 SHORT_DATETIME_FORMAT = "Y年n月j日 H:i" # 2016年9月5日 20:45
FIRST_DAY_OF_WEEK = 1 # 星期一 (Monday) FIRST_DAY_OF_WEEK = 1 # 星期一 (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y/%m/%d', # '2016/09/05' "%Y/%m/%d", # '2016/09/05'
'%Y-%m-%d', # '2016-09-05' "%Y-%m-%d", # '2016-09-05'
'%Y年%n月%j日', # '2016年9月5日' "%Y年%n月%j日", # '2016年9月5日'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M', # '20:45' "%H:%M", # '20:45'
'%H:%M:%S', # '20:45:29' "%H:%M:%S", # '20:45:29'
'%H:%M:%S.%f', # '20:45:29.000200' "%H:%M:%S.%f", # '20:45:29.000200'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y/%m/%d %H:%M', # '2016/09/05 20:45' "%Y/%m/%d %H:%M", # '2016/09/05 20:45'
'%Y-%m-%d %H:%M', # '2016-09-05 20:45' "%Y-%m-%d %H:%M", # '2016-09-05 20:45'
'%Y年%n月%j日 %H:%M', # '2016年9月5日 14:45' "%Y年%n月%j日 %H:%M", # '2016年9月5日 14:45'
'%Y/%m/%d %H:%M:%S', # '2016/09/05 20:45:29' "%Y/%m/%d %H:%M:%S", # '2016/09/05 20:45:29'
'%Y-%m-%d %H:%M:%S', # '2016-09-05 20:45:29' "%Y-%m-%d %H:%M:%S", # '2016-09-05 20:45:29'
'%Y年%n月%j日 %H:%M:%S', # '2016年9月5日 20:45:29' "%Y年%n月%j日 %H:%M:%S", # '2016年9月5日 20:45:29'
'%Y/%m/%d %H:%M:%S.%f', # '2016/09/05 20:45:29.000200' "%Y/%m/%d %H:%M:%S.%f", # '2016/09/05 20:45:29.000200'
'%Y-%m-%d %H:%M:%S.%f', # '2016-09-05 20:45:29.000200' "%Y-%m-%d %H:%M:%S.%f", # '2016-09-05 20:45:29.000200'
'%Y年%n月%j日 %H:%n:%S.%f', # '2016年9月5日 20:45:29.000200' "%Y年%n月%j日 %H:%n:%S.%f", # '2016年9月5日 20:45:29.000200'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = '' THOUSAND_SEPARATOR = ""
NUMBER_GROUPING = 4 NUMBER_GROUPING = 4

View File

@ -2,41 +2,41 @@
# #
# The *_FORMAT strings use the Django date format syntax, # The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'Y年n月j日' # 2016年9月5日 DATE_FORMAT = "Y年n月j日" # 2016年9月5日
TIME_FORMAT = 'H:i' # 20:45 TIME_FORMAT = "H:i" # 20:45
DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45 DATETIME_FORMAT = "Y年n月j日 H:i" # 2016年9月5日 20:45
YEAR_MONTH_FORMAT = 'Y年n月' # 2016年9月 YEAR_MONTH_FORMAT = "Y年n月" # 2016年9月
MONTH_DAY_FORMAT = 'm月j日' # 9月5日 MONTH_DAY_FORMAT = "m月j日" # 9月5日
SHORT_DATE_FORMAT = 'Y年n月j日' # 2016年9月5日 SHORT_DATE_FORMAT = "Y年n月j日" # 2016年9月5日
SHORT_DATETIME_FORMAT = 'Y年n月j日 H:i' # 2016年9月5日 20:45 SHORT_DATETIME_FORMAT = "Y年n月j日 H:i" # 2016年9月5日 20:45
FIRST_DAY_OF_WEEK = 1 # 星期一 (Monday) FIRST_DAY_OF_WEEK = 1 # 星期一 (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax, # The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = [ DATE_INPUT_FORMATS = [
'%Y/%m/%d', # '2016/09/05' "%Y/%m/%d", # '2016/09/05'
'%Y-%m-%d', # '2016-09-05' "%Y-%m-%d", # '2016-09-05'
'%Y年%n月%j日', # '2016年9月5日' "%Y年%n月%j日", # '2016年9月5日'
] ]
TIME_INPUT_FORMATS = [ TIME_INPUT_FORMATS = [
'%H:%M', # '20:45' "%H:%M", # '20:45'
'%H:%M:%S', # '20:45:29' "%H:%M:%S", # '20:45:29'
'%H:%M:%S.%f', # '20:45:29.000200' "%H:%M:%S.%f", # '20:45:29.000200'
] ]
DATETIME_INPUT_FORMATS = [ DATETIME_INPUT_FORMATS = [
'%Y/%m/%d %H:%M', # '2016/09/05 20:45' "%Y/%m/%d %H:%M", # '2016/09/05 20:45'
'%Y-%m-%d %H:%M', # '2016-09-05 20:45' "%Y-%m-%d %H:%M", # '2016-09-05 20:45'
'%Y年%n月%j日 %H:%M', # '2016年9月5日 14:45' "%Y年%n月%j日 %H:%M", # '2016年9月5日 14:45'
'%Y/%m/%d %H:%M:%S', # '2016/09/05 20:45:29' "%Y/%m/%d %H:%M:%S", # '2016/09/05 20:45:29'
'%Y-%m-%d %H:%M:%S', # '2016-09-05 20:45:29' "%Y-%m-%d %H:%M:%S", # '2016-09-05 20:45:29'
'%Y年%n月%j日 %H:%M:%S', # '2016年9月5日 20:45:29' "%Y年%n月%j日 %H:%M:%S", # '2016年9月5日 20:45:29'
'%Y/%m/%d %H:%M:%S.%f', # '2016/09/05 20:45:29.000200' "%Y/%m/%d %H:%M:%S.%f", # '2016/09/05 20:45:29.000200'
'%Y-%m-%d %H:%M:%S.%f', # '2016-09-05 20:45:29.000200' "%Y-%m-%d %H:%M:%S.%f", # '2016-09-05 20:45:29.000200'
'%Y年%n月%j日 %H:%n:%S.%f', # '2016年9月5日 20:45:29.000200' "%Y年%n月%j日 %H:%n:%S.%f", # '2016年9月5日 20:45:29.000200'
] ]
DECIMAL_SEPARATOR = '.' DECIMAL_SEPARATOR = "."
THOUSAND_SEPARATOR = '' THOUSAND_SEPARATOR = ""
NUMBER_GROUPING = 4 NUMBER_GROUPING = 4

View File

@ -1,7 +1,7 @@
from django.urls import include from django.urls import include
from django.views import defaults from django.views import defaults
__all__ = ['handler400', 'handler403', 'handler404', 'handler500', 'include'] __all__ = ["handler400", "handler403", "handler404", "handler500", "include"]
handler400 = defaults.bad_request handler400 = defaults.bad_request
handler403 = defaults.permission_denied handler403 = defaults.permission_denied

View File

@ -35,5 +35,5 @@ def is_language_prefix_patterns_used(urlconf):
urlpatterns = [ urlpatterns = [
path('setlang/', set_language, name='set_language'), path("setlang/", set_language, name="set_language"),
] ]

View File

@ -24,5 +24,7 @@ def static(prefix, view=serve, **kwargs):
# No-op if not in debug mode or a non-local prefix. # No-op if not in debug mode or a non-local prefix.
return [] return []
return [ return [
re_path(r'^%s(?P<path>.*)$' % re.escape(prefix.lstrip('/')), view, kwargs=kwargs), re_path(
r"^%s(?P<path>.*)$" % re.escape(prefix.lstrip("/")), view, kwargs=kwargs
),
] ]

View File

@ -1,24 +1,50 @@
from django.contrib.admin.decorators import action, display, register from django.contrib.admin.decorators import action, display, register
from django.contrib.admin.filters import ( from django.contrib.admin.filters import (
AllValuesFieldListFilter, BooleanFieldListFilter, ChoicesFieldListFilter, AllValuesFieldListFilter,
DateFieldListFilter, EmptyFieldListFilter, FieldListFilter, ListFilter, BooleanFieldListFilter,
RelatedFieldListFilter, RelatedOnlyFieldListFilter, SimpleListFilter, ChoicesFieldListFilter,
DateFieldListFilter,
EmptyFieldListFilter,
FieldListFilter,
ListFilter,
RelatedFieldListFilter,
RelatedOnlyFieldListFilter,
SimpleListFilter,
) )
from django.contrib.admin.options import ( from django.contrib.admin.options import (
HORIZONTAL, VERTICAL, ModelAdmin, StackedInline, TabularInline, HORIZONTAL,
VERTICAL,
ModelAdmin,
StackedInline,
TabularInline,
) )
from django.contrib.admin.sites import AdminSite, site from django.contrib.admin.sites import AdminSite, site
from django.utils.module_loading import autodiscover_modules from django.utils.module_loading import autodiscover_modules
__all__ = [ __all__ = [
"action", "display", "register", "ModelAdmin", "HORIZONTAL", "VERTICAL", "action",
"StackedInline", "TabularInline", "AdminSite", "site", "ListFilter", "display",
"SimpleListFilter", "FieldListFilter", "BooleanFieldListFilter", "register",
"RelatedFieldListFilter", "ChoicesFieldListFilter", "DateFieldListFilter", "ModelAdmin",
"AllValuesFieldListFilter", "EmptyFieldListFilter", "HORIZONTAL",
"RelatedOnlyFieldListFilter", "autodiscover", "VERTICAL",
"StackedInline",
"TabularInline",
"AdminSite",
"site",
"ListFilter",
"SimpleListFilter",
"FieldListFilter",
"BooleanFieldListFilter",
"RelatedFieldListFilter",
"ChoicesFieldListFilter",
"DateFieldListFilter",
"AllValuesFieldListFilter",
"EmptyFieldListFilter",
"RelatedOnlyFieldListFilter",
"autodiscover",
] ]
def autodiscover(): def autodiscover():
autodiscover_modules('admin', register_to=site) autodiscover_modules("admin", register_to=site)

View File

@ -8,12 +8,13 @@ from django.contrib.admin.decorators import action
from django.contrib.admin.utils import model_ngettext from django.contrib.admin.utils import model_ngettext
from django.core.exceptions import PermissionDenied from django.core.exceptions import PermissionDenied
from django.template.response import TemplateResponse from django.template.response import TemplateResponse
from django.utils.translation import gettext as _, gettext_lazy from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
@action( @action(
permissions=['delete'], permissions=["delete"],
description=gettext_lazy('Delete selected %(verbose_name_plural)s'), description=gettext_lazy("Delete selected %(verbose_name_plural)s"),
) )
def delete_selected(modeladmin, request, queryset): def delete_selected(modeladmin, request, queryset):
""" """
@ -30,11 +31,16 @@ def delete_selected(modeladmin, request, queryset):
# Populate deletable_objects, a data structure of all related objects that # Populate deletable_objects, a data structure of all related objects that
# will also be deleted. # will also be deleted.
deletable_objects, model_count, perms_needed, protected = modeladmin.get_deleted_objects(queryset, request) (
deletable_objects,
model_count,
perms_needed,
protected,
) = modeladmin.get_deleted_objects(queryset, request)
# The user has already confirmed the deletion. # The user has already confirmed the deletion.
# Do the deletion and return None to display the change list view again. # Do the deletion and return None to display the change list view again.
if request.POST.get('post') and not protected: if request.POST.get("post") and not protected:
if perms_needed: if perms_needed:
raise PermissionDenied raise PermissionDenied
n = queryset.count() n = queryset.count()
@ -43,9 +49,12 @@ def delete_selected(modeladmin, request, queryset):
obj_display = str(obj) obj_display = str(obj)
modeladmin.log_deletion(request, obj, obj_display) modeladmin.log_deletion(request, obj, obj_display)
modeladmin.delete_queryset(request, queryset) modeladmin.delete_queryset(request, queryset)
modeladmin.message_user(request, _("Successfully deleted %(count)d %(items)s.") % { modeladmin.message_user(
"count": n, "items": model_ngettext(modeladmin.opts, n) request,
}, messages.SUCCESS) _("Successfully deleted %(count)d %(items)s.")
% {"count": n, "items": model_ngettext(modeladmin.opts, n)},
messages.SUCCESS,
)
# Return None to display the change list page again. # Return None to display the change list page again.
return None return None
@ -58,24 +67,30 @@ def delete_selected(modeladmin, request, queryset):
context = { context = {
**modeladmin.admin_site.each_context(request), **modeladmin.admin_site.each_context(request),
'title': title, "title": title,
'subtitle': None, "subtitle": None,
'objects_name': str(objects_name), "objects_name": str(objects_name),
'deletable_objects': [deletable_objects], "deletable_objects": [deletable_objects],
'model_count': dict(model_count).items(), "model_count": dict(model_count).items(),
'queryset': queryset, "queryset": queryset,
'perms_lacking': perms_needed, "perms_lacking": perms_needed,
'protected': protected, "protected": protected,
'opts': opts, "opts": opts,
'action_checkbox_name': helpers.ACTION_CHECKBOX_NAME, "action_checkbox_name": helpers.ACTION_CHECKBOX_NAME,
'media': modeladmin.media, "media": modeladmin.media,
} }
request.current_app = modeladmin.admin_site.name request.current_app = modeladmin.admin_site.name
# Display the confirmation page # Display the confirmation page
return TemplateResponse(request, modeladmin.delete_selected_confirmation_template or [ return TemplateResponse(
"admin/%s/%s/delete_selected_confirmation.html" % (app_label, opts.model_name), request,
"admin/%s/delete_selected_confirmation.html" % app_label, modeladmin.delete_selected_confirmation_template
"admin/delete_selected_confirmation.html" or [
], context) "admin/%s/%s/delete_selected_confirmation.html"
% (app_label, opts.model_name),
"admin/%s/delete_selected_confirmation.html" % app_label,
"admin/delete_selected_confirmation.html",
],
context,
)

View File

@ -7,9 +7,9 @@ from django.utils.translation import gettext_lazy as _
class SimpleAdminConfig(AppConfig): class SimpleAdminConfig(AppConfig):
"""Simple AppConfig which does not do automatic discovery.""" """Simple AppConfig which does not do automatic discovery."""
default_auto_field = 'django.db.models.AutoField' default_auto_field = "django.db.models.AutoField"
default_site = 'django.contrib.admin.sites.AdminSite' default_site = "django.contrib.admin.sites.AdminSite"
name = 'django.contrib.admin' name = "django.contrib.admin"
verbose_name = _("Administration") verbose_name = _("Administration")
def ready(self): def ready(self):

File diff suppressed because it is too large Load Diff

View File

@ -17,19 +17,23 @@ def action(function=None, *, permissions=None, description=None):
make_published.allowed_permissions = ['publish'] make_published.allowed_permissions = ['publish']
make_published.short_description = 'Mark selected stories as published' make_published.short_description = 'Mark selected stories as published'
""" """
def decorator(func): def decorator(func):
if permissions is not None: if permissions is not None:
func.allowed_permissions = permissions func.allowed_permissions = permissions
if description is not None: if description is not None:
func.short_description = description func.short_description = description
return func return func
if function is None: if function is None:
return decorator return decorator
else: else:
return decorator(function) return decorator(function)
def display(function=None, *, boolean=None, ordering=None, description=None, empty_value=None): def display(
function=None, *, boolean=None, ordering=None, description=None, empty_value=None
):
""" """
Conveniently add attributes to a display function:: Conveniently add attributes to a display function::
@ -50,11 +54,12 @@ def display(function=None, *, boolean=None, ordering=None, description=None, emp
is_published.admin_order_field = '-publish_date' is_published.admin_order_field = '-publish_date'
is_published.short_description = 'Is Published?' is_published.short_description = 'Is Published?'
""" """
def decorator(func): def decorator(func):
if boolean is not None and empty_value is not None: if boolean is not None and empty_value is not None:
raise ValueError( raise ValueError(
'The boolean and empty_value arguments to the @display ' "The boolean and empty_value arguments to the @display "
'decorator are mutually exclusive.' "decorator are mutually exclusive."
) )
if boolean is not None: if boolean is not None:
func.boolean = boolean func.boolean = boolean
@ -65,6 +70,7 @@ def display(function=None, *, boolean=None, ordering=None, description=None, emp
if empty_value is not None: if empty_value is not None:
func.empty_value_display = empty_value func.empty_value_display = empty_value
return func return func
if function is None: if function is None:
return decorator return decorator
else: else:
@ -83,21 +89,23 @@ def register(*models, site=None):
The `site` kwarg is an admin site to use instead of the default admin site. The `site` kwarg is an admin site to use instead of the default admin site.
""" """
from django.contrib.admin import ModelAdmin from django.contrib.admin import ModelAdmin
from django.contrib.admin.sites import AdminSite, site as default_site from django.contrib.admin.sites import AdminSite
from django.contrib.admin.sites import site as default_site
def _model_admin_wrapper(admin_class): def _model_admin_wrapper(admin_class):
if not models: if not models:
raise ValueError('At least one model must be passed to register.') raise ValueError("At least one model must be passed to register.")
admin_site = site or default_site admin_site = site or default_site
if not isinstance(admin_site, AdminSite): if not isinstance(admin_site, AdminSite):
raise ValueError('site must subclass AdminSite') raise ValueError("site must subclass AdminSite")
if not issubclass(admin_class, ModelAdmin): if not issubclass(admin_class, ModelAdmin):
raise ValueError('Wrapped class must subclass ModelAdmin.') raise ValueError("Wrapped class must subclass ModelAdmin.")
admin_site.register(models, admin_class=admin_class) admin_site.register(models, admin_class=admin_class)
return admin_class return admin_class
return _model_admin_wrapper return _model_admin_wrapper

View File

@ -3,9 +3,11 @@ from django.core.exceptions import SuspiciousOperation
class DisallowedModelAdminLookup(SuspiciousOperation): class DisallowedModelAdminLookup(SuspiciousOperation):
"""Invalid filter was passed to admin view via URL querystring""" """Invalid filter was passed to admin view via URL querystring"""
pass pass
class DisallowedModelAdminToField(SuspiciousOperation): class DisallowedModelAdminToField(SuspiciousOperation):
"""Invalid to_field was passed to admin view via URL query string""" """Invalid to_field was passed to admin view via URL query string"""
pass pass

View File

@ -9,7 +9,9 @@ import datetime
from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.options import IncorrectLookupParameters
from django.contrib.admin.utils import ( from django.contrib.admin.utils import (
get_model_from_relation, prepare_lookup_value, reverse_field_path, get_model_from_relation,
prepare_lookup_value,
reverse_field_path,
) )
from django.core.exceptions import ImproperlyConfigured, ValidationError from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.db import models from django.db import models
@ -19,7 +21,7 @@ from django.utils.translation import gettext_lazy as _
class ListFilter: class ListFilter:
title = None # Human-readable title to appear in the right sidebar. title = None # Human-readable title to appear in the right sidebar.
template = 'admin/filter.html' template = "admin/filter.html"
def __init__(self, request, params, model, model_admin): def __init__(self, request, params, model, model_admin):
# This dictionary will eventually contain the request's query string # This dictionary will eventually contain the request's query string
@ -35,7 +37,9 @@ class ListFilter:
""" """
Return True if some choices would be output for this filter. Return True if some choices would be output for this filter.
""" """
raise NotImplementedError('subclasses of ListFilter must provide a has_output() method') raise NotImplementedError(
"subclasses of ListFilter must provide a has_output() method"
)
def choices(self, changelist): def choices(self, changelist):
""" """
@ -43,20 +47,26 @@ class ListFilter:
`changelist` is the ChangeList to be displayed. `changelist` is the ChangeList to be displayed.
""" """
raise NotImplementedError('subclasses of ListFilter must provide a choices() method') raise NotImplementedError(
"subclasses of ListFilter must provide a choices() method"
)
def queryset(self, request, queryset): def queryset(self, request, queryset):
""" """
Return the filtered queryset. Return the filtered queryset.
""" """
raise NotImplementedError('subclasses of ListFilter must provide a queryset() method') raise NotImplementedError(
"subclasses of ListFilter must provide a queryset() method"
)
def expected_parameters(self): def expected_parameters(self):
""" """
Return the list of parameter names that are expected from the Return the list of parameter names that are expected from the
request's query string and that will be used by this filter. request's query string and that will be used by this filter.
""" """
raise NotImplementedError('subclasses of ListFilter must provide an expected_parameters() method') raise NotImplementedError(
"subclasses of ListFilter must provide an expected_parameters() method"
)
class SimpleListFilter(ListFilter): class SimpleListFilter(ListFilter):
@ -94,8 +104,8 @@ class SimpleListFilter(ListFilter):
Must be overridden to return a list of tuples (value, verbose value) Must be overridden to return a list of tuples (value, verbose value)
""" """
raise NotImplementedError( raise NotImplementedError(
'The SimpleListFilter.lookups() method must be overridden to ' "The SimpleListFilter.lookups() method must be overridden to "
'return a list of tuples (value, verbose value).' "return a list of tuples (value, verbose value)."
) )
def expected_parameters(self): def expected_parameters(self):
@ -103,32 +113,36 @@ class SimpleListFilter(ListFilter):
def choices(self, changelist): def choices(self, changelist):
yield { yield {
'selected': self.value() is None, "selected": self.value() is None,
'query_string': changelist.get_query_string(remove=[self.parameter_name]), "query_string": changelist.get_query_string(remove=[self.parameter_name]),
'display': _('All'), "display": _("All"),
} }
for lookup, title in self.lookup_choices: for lookup, title in self.lookup_choices:
yield { yield {
'selected': self.value() == str(lookup), "selected": self.value() == str(lookup),
'query_string': changelist.get_query_string({self.parameter_name: lookup}), "query_string": changelist.get_query_string(
'display': title, {self.parameter_name: lookup}
),
"display": title,
} }
class FieldListFilter(ListFilter): class FieldListFilter(ListFilter):
_field_list_filters = [] _field_list_filters = []
_take_priority_index = 0 _take_priority_index = 0
list_separator = ',' list_separator = ","
def __init__(self, field, request, params, model, model_admin, field_path): def __init__(self, field, request, params, model, model_admin, field_path):
self.field = field self.field = field
self.field_path = field_path self.field_path = field_path
self.title = getattr(field, 'verbose_name', field_path) self.title = getattr(field, "verbose_name", field_path)
super().__init__(request, params, model, model_admin) super().__init__(request, params, model, model_admin)
for p in self.expected_parameters(): for p in self.expected_parameters():
if p in params: if p in params:
value = params.pop(p) value = params.pop(p)
self.used_parameters[p] = prepare_lookup_value(p, value, self.list_separator) self.used_parameters[p] = prepare_lookup_value(
p, value, self.list_separator
)
def has_output(self): def has_output(self):
return True return True
@ -148,7 +162,8 @@ class FieldListFilter(ListFilter):
# of fields with some custom filters. The first found in the list # of fields with some custom filters. The first found in the list
# is used in priority. # is used in priority.
cls._field_list_filters.insert( cls._field_list_filters.insert(
cls._take_priority_index, (test, list_filter_class)) cls._take_priority_index, (test, list_filter_class)
)
cls._take_priority_index += 1 cls._take_priority_index += 1
else: else:
cls._field_list_filters.append((test, list_filter_class)) cls._field_list_filters.append((test, list_filter_class))
@ -157,19 +172,21 @@ class FieldListFilter(ListFilter):
def create(cls, field, request, params, model, model_admin, field_path): def create(cls, field, request, params, model, model_admin, field_path):
for test, list_filter_class in cls._field_list_filters: for test, list_filter_class in cls._field_list_filters:
if test(field): if test(field):
return list_filter_class(field, request, params, model, model_admin, field_path=field_path) return list_filter_class(
field, request, params, model, model_admin, field_path=field_path
)
class RelatedFieldListFilter(FieldListFilter): class RelatedFieldListFilter(FieldListFilter):
def __init__(self, field, request, params, model, model_admin, field_path): def __init__(self, field, request, params, model, model_admin, field_path):
other_model = get_model_from_relation(field) other_model = get_model_from_relation(field)
self.lookup_kwarg = '%s__%s__exact' % (field_path, field.target_field.name) self.lookup_kwarg = "%s__%s__exact" % (field_path, field.target_field.name)
self.lookup_kwarg_isnull = '%s__isnull' % field_path self.lookup_kwarg_isnull = "%s__isnull" % field_path
self.lookup_val = params.get(self.lookup_kwarg) self.lookup_val = params.get(self.lookup_kwarg)
self.lookup_val_isnull = params.get(self.lookup_kwarg_isnull) self.lookup_val_isnull = params.get(self.lookup_kwarg_isnull)
super().__init__(field, request, params, model, model_admin, field_path) super().__init__(field, request, params, model, model_admin, field_path)
self.lookup_choices = self.field_choices(field, request, model_admin) self.lookup_choices = self.field_choices(field, request, model_admin)
if hasattr(field, 'verbose_name'): if hasattr(field, "verbose_name"):
self.lookup_title = field.verbose_name self.lookup_title = field.verbose_name
else: else:
self.lookup_title = other_model._meta.verbose_name self.lookup_title = other_model._meta.verbose_name
@ -209,21 +226,27 @@ class RelatedFieldListFilter(FieldListFilter):
def choices(self, changelist): def choices(self, changelist):
yield { yield {
'selected': self.lookup_val is None and not self.lookup_val_isnull, "selected": self.lookup_val is None and not self.lookup_val_isnull,
'query_string': changelist.get_query_string(remove=[self.lookup_kwarg, self.lookup_kwarg_isnull]), "query_string": changelist.get_query_string(
'display': _('All'), remove=[self.lookup_kwarg, self.lookup_kwarg_isnull]
),
"display": _("All"),
} }
for pk_val, val in self.lookup_choices: for pk_val, val in self.lookup_choices:
yield { yield {
'selected': self.lookup_val == str(pk_val), "selected": self.lookup_val == str(pk_val),
'query_string': changelist.get_query_string({self.lookup_kwarg: pk_val}, [self.lookup_kwarg_isnull]), "query_string": changelist.get_query_string(
'display': val, {self.lookup_kwarg: pk_val}, [self.lookup_kwarg_isnull]
),
"display": val,
} }
if self.include_empty_choice: if self.include_empty_choice:
yield { yield {
'selected': bool(self.lookup_val_isnull), "selected": bool(self.lookup_val_isnull),
'query_string': changelist.get_query_string({self.lookup_kwarg_isnull: 'True'}, [self.lookup_kwarg]), "query_string": changelist.get_query_string(
'display': self.empty_value_display, {self.lookup_kwarg_isnull: "True"}, [self.lookup_kwarg]
),
"display": self.empty_value_display,
} }
@ -232,14 +255,19 @@ FieldListFilter.register(lambda f: f.remote_field, RelatedFieldListFilter)
class BooleanFieldListFilter(FieldListFilter): class BooleanFieldListFilter(FieldListFilter):
def __init__(self, field, request, params, model, model_admin, field_path): def __init__(self, field, request, params, model, model_admin, field_path):
self.lookup_kwarg = '%s__exact' % field_path self.lookup_kwarg = "%s__exact" % field_path
self.lookup_kwarg2 = '%s__isnull' % field_path self.lookup_kwarg2 = "%s__isnull" % field_path
self.lookup_val = params.get(self.lookup_kwarg) self.lookup_val = params.get(self.lookup_kwarg)
self.lookup_val2 = params.get(self.lookup_kwarg2) self.lookup_val2 = params.get(self.lookup_kwarg2)
super().__init__(field, request, params, model, model_admin, field_path) super().__init__(field, request, params, model, model_admin, field_path)
if (self.used_parameters and self.lookup_kwarg in self.used_parameters and if (
self.used_parameters[self.lookup_kwarg] in ('1', '0')): self.used_parameters
self.used_parameters[self.lookup_kwarg] = bool(int(self.used_parameters[self.lookup_kwarg])) and self.lookup_kwarg in self.used_parameters
and self.used_parameters[self.lookup_kwarg] in ("1", "0")
):
self.used_parameters[self.lookup_kwarg] = bool(
int(self.used_parameters[self.lookup_kwarg])
)
def expected_parameters(self): def expected_parameters(self):
return [self.lookup_kwarg, self.lookup_kwarg2] return [self.lookup_kwarg, self.lookup_kwarg2]
@ -247,30 +275,36 @@ class BooleanFieldListFilter(FieldListFilter):
def choices(self, changelist): def choices(self, changelist):
field_choices = dict(self.field.flatchoices) field_choices = dict(self.field.flatchoices)
for lookup, title in ( for lookup, title in (
(None, _('All')), (None, _("All")),
('1', field_choices.get(True, _('Yes'))), ("1", field_choices.get(True, _("Yes"))),
('0', field_choices.get(False, _('No'))), ("0", field_choices.get(False, _("No"))),
): ):
yield { yield {
'selected': self.lookup_val == lookup and not self.lookup_val2, "selected": self.lookup_val == lookup and not self.lookup_val2,
'query_string': changelist.get_query_string({self.lookup_kwarg: lookup}, [self.lookup_kwarg2]), "query_string": changelist.get_query_string(
'display': title, {self.lookup_kwarg: lookup}, [self.lookup_kwarg2]
),
"display": title,
} }
if self.field.null: if self.field.null:
yield { yield {
'selected': self.lookup_val2 == 'True', "selected": self.lookup_val2 == "True",
'query_string': changelist.get_query_string({self.lookup_kwarg2: 'True'}, [self.lookup_kwarg]), "query_string": changelist.get_query_string(
'display': field_choices.get(None, _('Unknown')), {self.lookup_kwarg2: "True"}, [self.lookup_kwarg]
),
"display": field_choices.get(None, _("Unknown")),
} }
FieldListFilter.register(lambda f: isinstance(f, models.BooleanField), BooleanFieldListFilter) FieldListFilter.register(
lambda f: isinstance(f, models.BooleanField), BooleanFieldListFilter
)
class ChoicesFieldListFilter(FieldListFilter): class ChoicesFieldListFilter(FieldListFilter):
def __init__(self, field, request, params, model, model_admin, field_path): def __init__(self, field, request, params, model, model_admin, field_path):
self.lookup_kwarg = '%s__exact' % field_path self.lookup_kwarg = "%s__exact" % field_path
self.lookup_kwarg_isnull = '%s__isnull' % field_path self.lookup_kwarg_isnull = "%s__isnull" % field_path
self.lookup_val = params.get(self.lookup_kwarg) self.lookup_val = params.get(self.lookup_kwarg)
self.lookup_val_isnull = params.get(self.lookup_kwarg_isnull) self.lookup_val_isnull = params.get(self.lookup_kwarg_isnull)
super().__init__(field, request, params, model, model_admin, field_path) super().__init__(field, request, params, model, model_admin, field_path)
@ -280,25 +314,31 @@ class ChoicesFieldListFilter(FieldListFilter):
def choices(self, changelist): def choices(self, changelist):
yield { yield {
'selected': self.lookup_val is None, "selected": self.lookup_val is None,
'query_string': changelist.get_query_string(remove=[self.lookup_kwarg, self.lookup_kwarg_isnull]), "query_string": changelist.get_query_string(
'display': _('All') remove=[self.lookup_kwarg, self.lookup_kwarg_isnull]
),
"display": _("All"),
} }
none_title = '' none_title = ""
for lookup, title in self.field.flatchoices: for lookup, title in self.field.flatchoices:
if lookup is None: if lookup is None:
none_title = title none_title = title
continue continue
yield { yield {
'selected': str(lookup) == self.lookup_val, "selected": str(lookup) == self.lookup_val,
'query_string': changelist.get_query_string({self.lookup_kwarg: lookup}, [self.lookup_kwarg_isnull]), "query_string": changelist.get_query_string(
'display': title, {self.lookup_kwarg: lookup}, [self.lookup_kwarg_isnull]
),
"display": title,
} }
if none_title: if none_title:
yield { yield {
'selected': bool(self.lookup_val_isnull), "selected": bool(self.lookup_val_isnull),
'query_string': changelist.get_query_string({self.lookup_kwarg_isnull: 'True'}, [self.lookup_kwarg]), "query_string": changelist.get_query_string(
'display': none_title, {self.lookup_kwarg_isnull: "True"}, [self.lookup_kwarg]
),
"display": none_title,
} }
@ -307,8 +347,10 @@ FieldListFilter.register(lambda f: bool(f.choices), ChoicesFieldListFilter)
class DateFieldListFilter(FieldListFilter): class DateFieldListFilter(FieldListFilter):
def __init__(self, field, request, params, model, model_admin, field_path): def __init__(self, field, request, params, model, model_admin, field_path):
self.field_generic = '%s__' % field_path self.field_generic = "%s__" % field_path
self.date_params = {k: v for k, v in params.items() if k.startswith(self.field_generic)} self.date_params = {
k: v for k, v in params.items() if k.startswith(self.field_generic)
}
now = timezone.now() now = timezone.now()
# When time zone support is enabled, convert "now" to the user's time # When time zone support is enabled, convert "now" to the user's time
@ -318,7 +360,7 @@ class DateFieldListFilter(FieldListFilter):
if isinstance(field, models.DateTimeField): if isinstance(field, models.DateTimeField):
today = now.replace(hour=0, minute=0, second=0, microsecond=0) today = now.replace(hour=0, minute=0, second=0, microsecond=0)
else: # field is a models.DateField else: # field is a models.DateField
today = now.date() today = now.date()
tomorrow = today + datetime.timedelta(days=1) tomorrow = today + datetime.timedelta(days=1)
if today.month == 12: if today.month == 12:
@ -327,32 +369,44 @@ class DateFieldListFilter(FieldListFilter):
next_month = today.replace(month=today.month + 1, day=1) next_month = today.replace(month=today.month + 1, day=1)
next_year = today.replace(year=today.year + 1, month=1, day=1) next_year = today.replace(year=today.year + 1, month=1, day=1)
self.lookup_kwarg_since = '%s__gte' % field_path self.lookup_kwarg_since = "%s__gte" % field_path
self.lookup_kwarg_until = '%s__lt' % field_path self.lookup_kwarg_until = "%s__lt" % field_path
self.links = ( self.links = (
(_('Any date'), {}), (_("Any date"), {}),
(_('Today'), { (
self.lookup_kwarg_since: str(today), _("Today"),
self.lookup_kwarg_until: str(tomorrow), {
}), self.lookup_kwarg_since: str(today),
(_('Past 7 days'), { self.lookup_kwarg_until: str(tomorrow),
self.lookup_kwarg_since: str(today - datetime.timedelta(days=7)), },
self.lookup_kwarg_until: str(tomorrow), ),
}), (
(_('This month'), { _("Past 7 days"),
self.lookup_kwarg_since: str(today.replace(day=1)), {
self.lookup_kwarg_until: str(next_month), self.lookup_kwarg_since: str(today - datetime.timedelta(days=7)),
}), self.lookup_kwarg_until: str(tomorrow),
(_('This year'), { },
self.lookup_kwarg_since: str(today.replace(month=1, day=1)), ),
self.lookup_kwarg_until: str(next_year), (
}), _("This month"),
{
self.lookup_kwarg_since: str(today.replace(day=1)),
self.lookup_kwarg_until: str(next_month),
},
),
(
_("This year"),
{
self.lookup_kwarg_since: str(today.replace(month=1, day=1)),
self.lookup_kwarg_until: str(next_year),
},
),
) )
if field.null: if field.null:
self.lookup_kwarg_isnull = '%s__isnull' % field_path self.lookup_kwarg_isnull = "%s__isnull" % field_path
self.links += ( self.links += (
(_('No date'), {self.field_generic + 'isnull': 'True'}), (_("No date"), {self.field_generic + "isnull": "True"}),
(_('Has date'), {self.field_generic + 'isnull': 'False'}), (_("Has date"), {self.field_generic + "isnull": "False"}),
) )
super().__init__(field, request, params, model, model_admin, field_path) super().__init__(field, request, params, model, model_admin, field_path)
@ -365,14 +419,15 @@ class DateFieldListFilter(FieldListFilter):
def choices(self, changelist): def choices(self, changelist):
for title, param_dict in self.links: for title, param_dict in self.links:
yield { yield {
'selected': self.date_params == param_dict, "selected": self.date_params == param_dict,
'query_string': changelist.get_query_string(param_dict, [self.field_generic]), "query_string": changelist.get_query_string(
'display': title, param_dict, [self.field_generic]
),
"display": title,
} }
FieldListFilter.register( FieldListFilter.register(lambda f: isinstance(f, models.DateField), DateFieldListFilter)
lambda f: isinstance(f, models.DateField), DateFieldListFilter)
# This should be registered last, because it's a last resort. For example, # This should be registered last, because it's a last resort. For example,
@ -381,7 +436,7 @@ FieldListFilter.register(
class AllValuesFieldListFilter(FieldListFilter): class AllValuesFieldListFilter(FieldListFilter):
def __init__(self, field, request, params, model, model_admin, field_path): def __init__(self, field, request, params, model, model_admin, field_path):
self.lookup_kwarg = field_path self.lookup_kwarg = field_path
self.lookup_kwarg_isnull = '%s__isnull' % field_path self.lookup_kwarg_isnull = "%s__isnull" % field_path
self.lookup_val = params.get(self.lookup_kwarg) self.lookup_val = params.get(self.lookup_kwarg)
self.lookup_val_isnull = params.get(self.lookup_kwarg_isnull) self.lookup_val_isnull = params.get(self.lookup_kwarg_isnull)
self.empty_value_display = model_admin.get_empty_value_display() self.empty_value_display = model_admin.get_empty_value_display()
@ -391,7 +446,9 @@ class AllValuesFieldListFilter(FieldListFilter):
queryset = model_admin.get_queryset(request) queryset = model_admin.get_queryset(request)
else: else:
queryset = parent_model._default_manager.all() queryset = parent_model._default_manager.all()
self.lookup_choices = queryset.distinct().order_by(field.name).values_list(field.name, flat=True) self.lookup_choices = (
queryset.distinct().order_by(field.name).values_list(field.name, flat=True)
)
super().__init__(field, request, params, model, model_admin, field_path) super().__init__(field, request, params, model, model_admin, field_path)
def expected_parameters(self): def expected_parameters(self):
@ -399,9 +456,11 @@ class AllValuesFieldListFilter(FieldListFilter):
def choices(self, changelist): def choices(self, changelist):
yield { yield {
'selected': self.lookup_val is None and self.lookup_val_isnull is None, "selected": self.lookup_val is None and self.lookup_val_isnull is None,
'query_string': changelist.get_query_string(remove=[self.lookup_kwarg, self.lookup_kwarg_isnull]), "query_string": changelist.get_query_string(
'display': _('All'), remove=[self.lookup_kwarg, self.lookup_kwarg_isnull]
),
"display": _("All"),
} }
include_none = False include_none = False
for val in self.lookup_choices: for val in self.lookup_choices:
@ -410,15 +469,19 @@ class AllValuesFieldListFilter(FieldListFilter):
continue continue
val = str(val) val = str(val)
yield { yield {
'selected': self.lookup_val == val, "selected": self.lookup_val == val,
'query_string': changelist.get_query_string({self.lookup_kwarg: val}, [self.lookup_kwarg_isnull]), "query_string": changelist.get_query_string(
'display': val, {self.lookup_kwarg: val}, [self.lookup_kwarg_isnull]
),
"display": val,
} }
if include_none: if include_none:
yield { yield {
'selected': bool(self.lookup_val_isnull), "selected": bool(self.lookup_val_isnull),
'query_string': changelist.get_query_string({self.lookup_kwarg_isnull: 'True'}, [self.lookup_kwarg]), "query_string": changelist.get_query_string(
'display': self.empty_value_display, {self.lookup_kwarg_isnull: "True"}, [self.lookup_kwarg]
),
"display": self.empty_value_display,
} }
@ -427,9 +490,15 @@ FieldListFilter.register(lambda f: True, AllValuesFieldListFilter)
class RelatedOnlyFieldListFilter(RelatedFieldListFilter): class RelatedOnlyFieldListFilter(RelatedFieldListFilter):
def field_choices(self, field, request, model_admin): def field_choices(self, field, request, model_admin):
pk_qs = model_admin.get_queryset(request).distinct().values_list('%s__pk' % self.field_path, flat=True) pk_qs = (
model_admin.get_queryset(request)
.distinct()
.values_list("%s__pk" % self.field_path, flat=True)
)
ordering = self.field_admin_ordering(field, request, model_admin) ordering = self.field_admin_ordering(field, request, model_admin)
return field.get_choices(include_blank=False, limit_choices_to={'pk__in': pk_qs}, ordering=ordering) return field.get_choices(
include_blank=False, limit_choices_to={"pk__in": pk_qs}, ordering=ordering
)
class EmptyFieldListFilter(FieldListFilter): class EmptyFieldListFilter(FieldListFilter):
@ -437,28 +506,29 @@ class EmptyFieldListFilter(FieldListFilter):
if not field.empty_strings_allowed and not field.null: if not field.empty_strings_allowed and not field.null:
raise ImproperlyConfigured( raise ImproperlyConfigured(
"The list filter '%s' cannot be used with field '%s' which " "The list filter '%s' cannot be used with field '%s' which "
"doesn't allow empty strings and nulls." % ( "doesn't allow empty strings and nulls."
% (
self.__class__.__name__, self.__class__.__name__,
field.name, field.name,
) )
) )
self.lookup_kwarg = '%s__isempty' % field_path self.lookup_kwarg = "%s__isempty" % field_path
self.lookup_val = params.get(self.lookup_kwarg) self.lookup_val = params.get(self.lookup_kwarg)
super().__init__(field, request, params, model, model_admin, field_path) super().__init__(field, request, params, model, model_admin, field_path)
def queryset(self, request, queryset): def queryset(self, request, queryset):
if self.lookup_kwarg not in self.used_parameters: if self.lookup_kwarg not in self.used_parameters:
return queryset return queryset
if self.lookup_val not in ('0', '1'): if self.lookup_val not in ("0", "1"):
raise IncorrectLookupParameters raise IncorrectLookupParameters
lookup_conditions = [] lookup_conditions = []
if self.field.empty_strings_allowed: if self.field.empty_strings_allowed:
lookup_conditions.append((self.field_path, '')) lookup_conditions.append((self.field_path, ""))
if self.field.null: if self.field.null:
lookup_conditions.append((f'{self.field_path}__isnull', True)) lookup_conditions.append((f"{self.field_path}__isnull", True))
lookup_condition = models.Q(*lookup_conditions, _connector=models.Q.OR) lookup_condition = models.Q(*lookup_conditions, _connector=models.Q.OR)
if self.lookup_val == '1': if self.lookup_val == "1":
return queryset.filter(lookup_condition) return queryset.filter(lookup_condition)
return queryset.exclude(lookup_condition) return queryset.exclude(lookup_condition)
@ -467,12 +537,14 @@ class EmptyFieldListFilter(FieldListFilter):
def choices(self, changelist): def choices(self, changelist):
for lookup, title in ( for lookup, title in (
(None, _('All')), (None, _("All")),
('1', _('Empty')), ("1", _("Empty")),
('0', _('Not empty')), ("0", _("Not empty")),
): ):
yield { yield {
'selected': self.lookup_val == lookup, "selected": self.lookup_val == lookup,
'query_string': changelist.get_query_string({self.lookup_kwarg: lookup}), "query_string": changelist.get_query_string(
'display': title, {self.lookup_kwarg: lookup}
),
"display": title,
} }

View File

@ -7,24 +7,25 @@ class AdminAuthenticationForm(AuthenticationForm):
""" """
A custom authentication form used in the admin app. A custom authentication form used in the admin app.
""" """
error_messages = { error_messages = {
**AuthenticationForm.error_messages, **AuthenticationForm.error_messages,
'invalid_login': _( "invalid_login": _(
"Please enter the correct %(username)s and password for a staff " "Please enter the correct %(username)s and password for a staff "
"account. Note that both fields may be case-sensitive." "account. Note that both fields may be case-sensitive."
), ),
} }
required_css_class = 'required' required_css_class = "required"
def confirm_login_allowed(self, user): def confirm_login_allowed(self, user):
super().confirm_login_allowed(user) super().confirm_login_allowed(user)
if not user.is_staff: if not user.is_staff:
raise ValidationError( raise ValidationError(
self.error_messages['invalid_login'], self.error_messages["invalid_login"],
code='invalid_login', code="invalid_login",
params={'username': self.username_field.verbose_name} params={"username": self.username_field.verbose_name},
) )
class AdminPasswordChangeForm(PasswordChangeForm): class AdminPasswordChangeForm(PasswordChangeForm):
required_css_class = 'required' required_css_class = "required"

View File

@ -2,43 +2,57 @@ import json
from django import forms from django import forms
from django.contrib.admin.utils import ( from django.contrib.admin.utils import (
display_for_field, flatten_fieldsets, help_text_for_field, label_for_field, display_for_field,
lookup_field, quote, flatten_fieldsets,
help_text_for_field,
label_for_field,
lookup_field,
quote,
) )
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist
from django.db.models.fields.related import ( from django.db.models.fields.related import (
ForeignObjectRel, ManyToManyRel, OneToOneField, ForeignObjectRel,
ManyToManyRel,
OneToOneField,
) )
from django.forms.utils import flatatt from django.forms.utils import flatatt
from django.template.defaultfilters import capfirst, linebreaksbr from django.template.defaultfilters import capfirst, linebreaksbr
from django.urls import NoReverseMatch, reverse from django.urls import NoReverseMatch, reverse
from django.utils.html import conditional_escape, format_html from django.utils.html import conditional_escape, format_html
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.utils.translation import gettext, gettext_lazy as _ from django.utils.translation import gettext
from django.utils.translation import gettext_lazy as _
ACTION_CHECKBOX_NAME = '_selected_action' ACTION_CHECKBOX_NAME = "_selected_action"
class ActionForm(forms.Form): class ActionForm(forms.Form):
action = forms.ChoiceField(label=_('Action:')) action = forms.ChoiceField(label=_("Action:"))
select_across = forms.BooleanField( select_across = forms.BooleanField(
label='', label="",
required=False, required=False,
initial=0, initial=0,
widget=forms.HiddenInput({'class': 'select-across'}), widget=forms.HiddenInput({"class": "select-across"}),
) )
checkbox = forms.CheckboxInput({'class': 'action-select'}, lambda value: False) checkbox = forms.CheckboxInput({"class": "action-select"}, lambda value: False)
class AdminForm: class AdminForm:
def __init__(self, form, fieldsets, prepopulated_fields, readonly_fields=None, model_admin=None): def __init__(
self,
form,
fieldsets,
prepopulated_fields,
readonly_fields=None,
model_admin=None,
):
self.form, self.fieldsets = form, fieldsets self.form, self.fieldsets = form, fieldsets
self.prepopulated_fields = [{ self.prepopulated_fields = [
'field': form[field_name], {"field": form[field_name], "dependencies": [form[f] for f in dependencies]}
'dependencies': [form[f] for f in dependencies] for field_name, dependencies in prepopulated_fields.items()
} for field_name, dependencies in prepopulated_fields.items()] ]
self.model_admin = model_admin self.model_admin = model_admin
if readonly_fields is None: if readonly_fields is None:
readonly_fields = () readonly_fields = ()
@ -46,18 +60,19 @@ class AdminForm:
def __repr__(self): def __repr__(self):
return ( return (
f'<{self.__class__.__qualname__}: ' f"<{self.__class__.__qualname__}: "
f'form={self.form.__class__.__qualname__} ' f"form={self.form.__class__.__qualname__} "
f'fieldsets={self.fieldsets!r}>' f"fieldsets={self.fieldsets!r}>"
) )
def __iter__(self): def __iter__(self):
for name, options in self.fieldsets: for name, options in self.fieldsets:
yield Fieldset( yield Fieldset(
self.form, name, self.form,
name,
readonly_fields=self.readonly_fields, readonly_fields=self.readonly_fields,
model_admin=self.model_admin, model_admin=self.model_admin,
**options **options,
) )
@property @property
@ -77,24 +92,34 @@ class AdminForm:
class Fieldset: class Fieldset:
def __init__(self, form, name=None, readonly_fields=(), fields=(), classes=(), def __init__(
description=None, model_admin=None): self,
form,
name=None,
readonly_fields=(),
fields=(),
classes=(),
description=None,
model_admin=None,
):
self.form = form self.form = form
self.name, self.fields = name, fields self.name, self.fields = name, fields
self.classes = ' '.join(classes) self.classes = " ".join(classes)
self.description = description self.description = description
self.model_admin = model_admin self.model_admin = model_admin
self.readonly_fields = readonly_fields self.readonly_fields = readonly_fields
@property @property
def media(self): def media(self):
if 'collapse' in self.classes: if "collapse" in self.classes:
return forms.Media(js=['admin/js/collapse.js']) return forms.Media(js=["admin/js/collapse.js"])
return forms.Media() return forms.Media()
def __iter__(self): def __iter__(self):
for field in self.fields: for field in self.fields:
yield Fieldline(self.form, field, self.readonly_fields, model_admin=self.model_admin) yield Fieldline(
self.form, field, self.readonly_fields, model_admin=self.model_admin
)
class Fieldline: class Fieldline:
@ -116,15 +141,19 @@ class Fieldline:
def __iter__(self): def __iter__(self):
for i, field in enumerate(self.fields): for i, field in enumerate(self.fields):
if field in self.readonly_fields: if field in self.readonly_fields:
yield AdminReadonlyField(self.form, field, is_first=(i == 0), model_admin=self.model_admin) yield AdminReadonlyField(
self.form, field, is_first=(i == 0), model_admin=self.model_admin
)
else: else:
yield AdminField(self.form, field, is_first=(i == 0)) yield AdminField(self.form, field, is_first=(i == 0))
def errors(self): def errors(self):
return mark_safe( return mark_safe(
'\n'.join( "\n".join(
self.form[f].errors.as_ul() for f in self.fields if f not in self.readonly_fields self.form[f].errors.as_ul()
).strip('\n') for f in self.fields
if f not in self.readonly_fields
).strip("\n")
) )
@ -139,18 +168,19 @@ class AdminField:
classes = [] classes = []
contents = conditional_escape(self.field.label) contents = conditional_escape(self.field.label)
if self.is_checkbox: if self.is_checkbox:
classes.append('vCheckboxLabel') classes.append("vCheckboxLabel")
if self.field.field.required: if self.field.field.required:
classes.append('required') classes.append("required")
if not self.is_first: if not self.is_first:
classes.append('inline') classes.append("inline")
attrs = {'class': ' '.join(classes)} if classes else {} attrs = {"class": " ".join(classes)} if classes else {}
# checkboxes should not have a label suffix as the checkbox appears # checkboxes should not have a label suffix as the checkbox appears
# to the left of the label. # to the left of the label.
return self.field.label_tag( return self.field.label_tag(
contents=mark_safe(contents), attrs=attrs, contents=mark_safe(contents),
label_suffix='' if self.is_checkbox else None, attrs=attrs,
label_suffix="" if self.is_checkbox else None,
) )
def errors(self): def errors(self):
@ -163,7 +193,7 @@ class AdminReadonlyField:
# {{ field.name }} must be a useful class name to identify the field. # {{ field.name }} must be a useful class name to identify the field.
# For convenience, store other field-related data here too. # For convenience, store other field-related data here too.
if callable(field): if callable(field):
class_name = field.__name__ if field.__name__ != '<lambda>' else '' class_name = field.__name__ if field.__name__ != "<lambda>" else ""
else: else:
class_name = field class_name = field
@ -183,11 +213,11 @@ class AdminReadonlyField:
is_hidden = False is_hidden = False
self.field = { self.field = {
'name': class_name, "name": class_name,
'label': label, "label": label,
'help_text': help_text, "help_text": help_text,
'field': field, "field": field,
'is_hidden': is_hidden, "is_hidden": is_hidden,
} }
self.form = form self.form = form
self.model_admin = model_admin self.model_admin = model_admin
@ -200,11 +230,16 @@ class AdminReadonlyField:
attrs = {} attrs = {}
if not self.is_first: if not self.is_first:
attrs["class"] = "inline" attrs["class"] = "inline"
label = self.field['label'] label = self.field["label"]
return format_html('<label{}>{}{}</label>', flatatt(attrs), capfirst(label), self.form.label_suffix) return format_html(
"<label{}>{}{}</label>",
flatatt(attrs),
capfirst(label),
self.form.label_suffix,
)
def get_admin_url(self, remote_field, remote_obj): def get_admin_url(self, remote_field, remote_obj):
url_name = 'admin:%s_%s_change' % ( url_name = "admin:%s_%s_change" % (
remote_field.model._meta.app_label, remote_field.model._meta.app_label,
remote_field.model._meta.model_name, remote_field.model._meta.model_name,
) )
@ -220,7 +255,12 @@ class AdminReadonlyField:
def contents(self): def contents(self):
from django.contrib.admin.templatetags.admin_list import _boolean_icon from django.contrib.admin.templatetags.admin_list import _boolean_icon
field, obj, model_admin = self.field['field'], self.form.instance, self.model_admin
field, obj, model_admin = (
self.field["field"],
self.form.instance,
self.model_admin,
)
try: try:
f, attr, value = lookup_field(field, obj, model_admin) f, attr, value = lookup_field(field, obj, model_admin)
except (AttributeError, ValueError, ObjectDoesNotExist): except (AttributeError, ValueError, ObjectDoesNotExist):
@ -230,10 +270,10 @@ class AdminReadonlyField:
widget = self.form[field].field.widget widget = self.form[field].field.widget
# This isn't elegant but suffices for contrib.auth's # This isn't elegant but suffices for contrib.auth's
# ReadOnlyPasswordHashWidget. # ReadOnlyPasswordHashWidget.
if getattr(widget, 'read_only', False): if getattr(widget, "read_only", False):
return widget.render(field, value) return widget.render(field, value)
if f is None: if f is None:
if getattr(attr, 'boolean', False): if getattr(attr, "boolean", False):
result_repr = _boolean_icon(value) result_repr = _boolean_icon(value)
else: else:
if hasattr(value, "__html__"): if hasattr(value, "__html__"):
@ -244,8 +284,8 @@ class AdminReadonlyField:
if isinstance(f.remote_field, ManyToManyRel) and value is not None: if isinstance(f.remote_field, ManyToManyRel) and value is not None:
result_repr = ", ".join(map(str, value.all())) result_repr = ", ".join(map(str, value.all()))
elif ( elif (
isinstance(f.remote_field, (ForeignObjectRel, OneToOneField)) and isinstance(f.remote_field, (ForeignObjectRel, OneToOneField))
value is not None and value is not None
): ):
result_repr = self.get_admin_url(f.remote_field, value) result_repr = self.get_admin_url(f.remote_field, value)
else: else:
@ -258,10 +298,20 @@ class InlineAdminFormSet:
""" """
A wrapper around an inline formset for use in the admin system. A wrapper around an inline formset for use in the admin system.
""" """
def __init__(self, inline, formset, fieldsets, prepopulated_fields=None,
readonly_fields=None, model_admin=None, has_add_permission=True, def __init__(
has_change_permission=True, has_delete_permission=True, self,
has_view_permission=True): inline,
formset,
fieldsets,
prepopulated_fields=None,
readonly_fields=None,
model_admin=None,
has_add_permission=True,
has_change_permission=True,
has_delete_permission=True,
has_view_permission=True,
):
self.opts = inline self.opts = inline
self.formset = formset self.formset = formset
self.fieldsets = fieldsets self.fieldsets = fieldsets
@ -272,7 +322,7 @@ class InlineAdminFormSet:
if prepopulated_fields is None: if prepopulated_fields is None:
prepopulated_fields = {} prepopulated_fields = {}
self.prepopulated_fields = prepopulated_fields self.prepopulated_fields = prepopulated_fields
self.classes = ' '.join(inline.classes) if inline.classes else '' self.classes = " ".join(inline.classes) if inline.classes else ""
self.has_add_permission = has_add_permission self.has_add_permission = has_add_permission
self.has_change_permission = has_change_permission self.has_change_permission = has_change_permission
self.has_delete_permission = has_delete_permission self.has_delete_permission = has_delete_permission
@ -282,25 +332,43 @@ class InlineAdminFormSet:
if self.has_change_permission: if self.has_change_permission:
readonly_fields_for_editing = self.readonly_fields readonly_fields_for_editing = self.readonly_fields
else: else:
readonly_fields_for_editing = self.readonly_fields + flatten_fieldsets(self.fieldsets) readonly_fields_for_editing = self.readonly_fields + flatten_fieldsets(
self.fieldsets
)
for form, original in zip(self.formset.initial_forms, self.formset.get_queryset()): for form, original in zip(
self.formset.initial_forms, self.formset.get_queryset()
):
view_on_site_url = self.opts.get_view_on_site_url(original) view_on_site_url = self.opts.get_view_on_site_url(original)
yield InlineAdminForm( yield InlineAdminForm(
self.formset, form, self.fieldsets, self.prepopulated_fields, self.formset,
original, readonly_fields_for_editing, model_admin=self.opts, form,
self.fieldsets,
self.prepopulated_fields,
original,
readonly_fields_for_editing,
model_admin=self.opts,
view_on_site_url=view_on_site_url, view_on_site_url=view_on_site_url,
) )
for form in self.formset.extra_forms: for form in self.formset.extra_forms:
yield InlineAdminForm( yield InlineAdminForm(
self.formset, form, self.fieldsets, self.prepopulated_fields, self.formset,
None, self.readonly_fields, model_admin=self.opts, form,
self.fieldsets,
self.prepopulated_fields,
None,
self.readonly_fields,
model_admin=self.opts,
) )
if self.has_add_permission: if self.has_add_permission:
yield InlineAdminForm( yield InlineAdminForm(
self.formset, self.formset.empty_form, self.formset,
self.fieldsets, self.prepopulated_fields, None, self.formset.empty_form,
self.readonly_fields, model_admin=self.opts, self.fieldsets,
self.prepopulated_fields,
None,
self.readonly_fields,
model_admin=self.opts,
) )
def fields(self): def fields(self):
@ -317,42 +385,49 @@ class InlineAdminFormSet:
if form_field is not None: if form_field is not None:
widget_is_hidden = form_field.widget.is_hidden widget_is_hidden = form_field.widget.is_hidden
yield { yield {
'name': field_name, "name": field_name,
'label': meta_labels.get(field_name) or label_for_field( "label": meta_labels.get(field_name)
or label_for_field(
field_name, field_name,
self.opts.model, self.opts.model,
self.opts, self.opts,
form=empty_form, form=empty_form,
), ),
'widget': {'is_hidden': widget_is_hidden}, "widget": {"is_hidden": widget_is_hidden},
'required': False, "required": False,
'help_text': meta_help_texts.get(field_name) or help_text_for_field(field_name, self.opts.model), "help_text": meta_help_texts.get(field_name)
or help_text_for_field(field_name, self.opts.model),
} }
else: else:
form_field = empty_form.fields[field_name] form_field = empty_form.fields[field_name]
label = form_field.label label = form_field.label
if label is None: if label is None:
label = label_for_field(field_name, self.opts.model, self.opts, form=empty_form) label = label_for_field(
field_name, self.opts.model, self.opts, form=empty_form
)
yield { yield {
'name': field_name, "name": field_name,
'label': label, "label": label,
'widget': form_field.widget, "widget": form_field.widget,
'required': form_field.required, "required": form_field.required,
'help_text': form_field.help_text, "help_text": form_field.help_text,
} }
def inline_formset_data(self): def inline_formset_data(self):
verbose_name = self.opts.verbose_name verbose_name = self.opts.verbose_name
return json.dumps({ return json.dumps(
'name': '#%s' % self.formset.prefix, {
'options': { "name": "#%s" % self.formset.prefix,
'prefix': self.formset.prefix, "options": {
'addText': gettext('Add another %(verbose_name)s') % { "prefix": self.formset.prefix,
'verbose_name': capfirst(verbose_name), "addText": gettext("Add another %(verbose_name)s")
% {
"verbose_name": capfirst(verbose_name),
},
"deleteText": gettext("Remove"),
}, },
'deleteText': gettext('Remove'),
} }
}) )
@property @property
def forms(self): def forms(self):
@ -374,31 +449,51 @@ class InlineAdminForm(AdminForm):
""" """
A wrapper around an inline form for use in the admin system. A wrapper around an inline form for use in the admin system.
""" """
def __init__(self, formset, form, fieldsets, prepopulated_fields, original,
readonly_fields=None, model_admin=None, view_on_site_url=None): def __init__(
self,
formset,
form,
fieldsets,
prepopulated_fields,
original,
readonly_fields=None,
model_admin=None,
view_on_site_url=None,
):
self.formset = formset self.formset = formset
self.model_admin = model_admin self.model_admin = model_admin
self.original = original self.original = original
self.show_url = original and view_on_site_url is not None self.show_url = original and view_on_site_url is not None
self.absolute_url = view_on_site_url self.absolute_url = view_on_site_url
super().__init__(form, fieldsets, prepopulated_fields, readonly_fields, model_admin) super().__init__(
form, fieldsets, prepopulated_fields, readonly_fields, model_admin
)
def __iter__(self): def __iter__(self):
for name, options in self.fieldsets: for name, options in self.fieldsets:
yield InlineFieldset( yield InlineFieldset(
self.formset, self.form, name, self.readonly_fields, self.formset,
model_admin=self.model_admin, **options self.form,
name,
self.readonly_fields,
model_admin=self.model_admin,
**options,
) )
def needs_explicit_pk_field(self): def needs_explicit_pk_field(self):
return ( return (
# Auto fields are editable, so check for auto or non-editable pk. # Auto fields are editable, so check for auto or non-editable pk.
self.form._meta.model._meta.auto_field or not self.form._meta.model._meta.pk.editable or self.form._meta.model._meta.auto_field
or not self.form._meta.model._meta.pk.editable
or
# Also search any parents for an auto field. (The pk info is # Also search any parents for an auto field. (The pk info is
# propagated to child models so that does not need to be checked # propagated to child models so that does not need to be checked
# in parents.) # in parents.)
any(parent._meta.auto_field or not parent._meta.model._meta.pk.editable any(
for parent in self.form._meta.model._meta.get_parent_list()) parent._meta.auto_field or not parent._meta.model._meta.pk.editable
for parent in self.form._meta.model._meta.get_parent_list()
)
) )
def pk_field(self): def pk_field(self):
@ -413,10 +508,12 @@ class InlineAdminForm(AdminForm):
def deletion_field(self): def deletion_field(self):
from django.forms.formsets import DELETION_FIELD_NAME from django.forms.formsets import DELETION_FIELD_NAME
return AdminField(self.form, DELETION_FIELD_NAME, False) return AdminField(self.form, DELETION_FIELD_NAME, False)
def ordering_field(self): def ordering_field(self):
from django.forms.formsets import ORDERING_FIELD_NAME from django.forms.formsets import ORDERING_FIELD_NAME
return AdminField(self.form, ORDERING_FIELD_NAME, False) return AdminField(self.form, ORDERING_FIELD_NAME, False)
@ -429,11 +526,14 @@ class InlineFieldset(Fieldset):
fk = getattr(self.formset, "fk", None) fk = getattr(self.formset, "fk", None)
for field in self.fields: for field in self.fields:
if not fk or fk.name != field: if not fk or fk.name != field:
yield Fieldline(self.form, field, self.readonly_fields, model_admin=self.model_admin) yield Fieldline(
self.form, field, self.readonly_fields, model_admin=self.model_admin
)
class AdminErrorList(forms.utils.ErrorList): class AdminErrorList(forms.utils.ErrorList):
"""Store errors for the form/formsets in an add/change view.""" """Store errors for the form/formsets in an add/change view."""
def __init__(self, form, inline_formsets): def __init__(self, form, inline_formsets):
super().__init__() super().__init__()

View File

@ -7,40 +7,70 @@ class Migration(migrations.Migration):
dependencies = [ dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL), migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '__first__'), ("contenttypes", "__first__"),
] ]
operations = [ operations = [
migrations.CreateModel( migrations.CreateModel(
name='LogEntry', name="LogEntry",
fields=[ fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), (
('action_time', models.DateTimeField(auto_now=True, verbose_name='action time')), "id",
('object_id', models.TextField(null=True, verbose_name='object id', blank=True)), models.AutoField(
('object_repr', models.CharField(max_length=200, verbose_name='object repr')), verbose_name="ID",
('action_flag', models.PositiveSmallIntegerField(verbose_name='action flag')), serialize=False,
('change_message', models.TextField(verbose_name='change message', blank=True)), auto_created=True,
('content_type', models.ForeignKey( primary_key=True,
on_delete=models.SET_NULL, ),
blank=True, null=True, ),
to='contenttypes.ContentType', (
verbose_name='content type', "action_time",
)), models.DateTimeField(auto_now=True, verbose_name="action time"),
('user', models.ForeignKey( ),
to=settings.AUTH_USER_MODEL, (
on_delete=models.CASCADE, "object_id",
verbose_name='user', models.TextField(null=True, verbose_name="object id", blank=True),
)), ),
(
"object_repr",
models.CharField(max_length=200, verbose_name="object repr"),
),
(
"action_flag",
models.PositiveSmallIntegerField(verbose_name="action flag"),
),
(
"change_message",
models.TextField(verbose_name="change message", blank=True),
),
(
"content_type",
models.ForeignKey(
on_delete=models.SET_NULL,
blank=True,
null=True,
to="contenttypes.ContentType",
verbose_name="content type",
),
),
(
"user",
models.ForeignKey(
to=settings.AUTH_USER_MODEL,
on_delete=models.CASCADE,
verbose_name="user",
),
),
], ],
options={ options={
'ordering': ['-action_time'], "ordering": ["-action_time"],
'db_table': 'django_admin_log', "db_table": "django_admin_log",
'verbose_name': 'log entry', "verbose_name": "log entry",
'verbose_name_plural': 'log entries', "verbose_name_plural": "log entries",
}, },
bases=(models.Model,), bases=(models.Model,),
managers=[ managers=[
('objects', django.contrib.admin.models.LogEntryManager()), ("objects", django.contrib.admin.models.LogEntryManager()),
], ],
), ),
] ]

View File

@ -5,16 +5,16 @@ from django.utils import timezone
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('admin', '0001_initial'), ("admin", "0001_initial"),
] ]
# No database changes; removes auto_add and adds default/editable. # No database changes; removes auto_add and adds default/editable.
operations = [ operations = [
migrations.AlterField( migrations.AlterField(
model_name='logentry', model_name="logentry",
name='action_time', name="action_time",
field=models.DateTimeField( field=models.DateTimeField(
verbose_name='action time', verbose_name="action time",
default=timezone.now, default=timezone.now,
editable=False, editable=False,
), ),

View File

@ -4,17 +4,17 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('admin', '0002_logentry_remove_auto_add'), ("admin", "0002_logentry_remove_auto_add"),
] ]
# No database changes; adds choices to action_flag. # No database changes; adds choices to action_flag.
operations = [ operations = [
migrations.AlterField( migrations.AlterField(
model_name='logentry', model_name="logentry",
name='action_flag', name="action_flag",
field=models.PositiveSmallIntegerField( field=models.PositiveSmallIntegerField(
choices=[(1, 'Addition'), (2, 'Change'), (3, 'Deletion')], choices=[(1, "Addition"), (2, "Change"), (3, "Deletion")],
verbose_name='action flag', verbose_name="action flag",
), ),
), ),
] ]

View File

@ -7,23 +7,32 @@ from django.db import models
from django.urls import NoReverseMatch, reverse from django.urls import NoReverseMatch, reverse
from django.utils import timezone from django.utils import timezone
from django.utils.text import get_text_list from django.utils.text import get_text_list
from django.utils.translation import gettext, gettext_lazy as _ from django.utils.translation import gettext
from django.utils.translation import gettext_lazy as _
ADDITION = 1 ADDITION = 1
CHANGE = 2 CHANGE = 2
DELETION = 3 DELETION = 3
ACTION_FLAG_CHOICES = ( ACTION_FLAG_CHOICES = (
(ADDITION, _('Addition')), (ADDITION, _("Addition")),
(CHANGE, _('Change')), (CHANGE, _("Change")),
(DELETION, _('Deletion')), (DELETION, _("Deletion")),
) )
class LogEntryManager(models.Manager): class LogEntryManager(models.Manager):
use_in_migrations = True use_in_migrations = True
def log_action(self, user_id, content_type_id, object_id, object_repr, action_flag, change_message=''): def log_action(
self,
user_id,
content_type_id,
object_id,
object_repr,
action_flag,
change_message="",
):
if isinstance(change_message, list): if isinstance(change_message, list):
change_message = json.dumps(change_message) change_message = json.dumps(change_message)
return self.model.objects.create( return self.model.objects.create(
@ -38,51 +47,54 @@ class LogEntryManager(models.Manager):
class LogEntry(models.Model): class LogEntry(models.Model):
action_time = models.DateTimeField( action_time = models.DateTimeField(
_('action time'), _("action time"),
default=timezone.now, default=timezone.now,
editable=False, editable=False,
) )
user = models.ForeignKey( user = models.ForeignKey(
settings.AUTH_USER_MODEL, settings.AUTH_USER_MODEL,
models.CASCADE, models.CASCADE,
verbose_name=_('user'), verbose_name=_("user"),
) )
content_type = models.ForeignKey( content_type = models.ForeignKey(
ContentType, ContentType,
models.SET_NULL, models.SET_NULL,
verbose_name=_('content type'), verbose_name=_("content type"),
blank=True, null=True, blank=True,
null=True,
) )
object_id = models.TextField(_('object id'), blank=True, null=True) object_id = models.TextField(_("object id"), blank=True, null=True)
# Translators: 'repr' means representation (https://docs.python.org/library/functions.html#repr) # Translators: 'repr' means representation (https://docs.python.org/library/functions.html#repr)
object_repr = models.CharField(_('object repr'), max_length=200) object_repr = models.CharField(_("object repr"), max_length=200)
action_flag = models.PositiveSmallIntegerField(_('action flag'), choices=ACTION_FLAG_CHOICES) action_flag = models.PositiveSmallIntegerField(
_("action flag"), choices=ACTION_FLAG_CHOICES
)
# change_message is either a string or a JSON structure # change_message is either a string or a JSON structure
change_message = models.TextField(_('change message'), blank=True) change_message = models.TextField(_("change message"), blank=True)
objects = LogEntryManager() objects = LogEntryManager()
class Meta: class Meta:
verbose_name = _('log entry') verbose_name = _("log entry")
verbose_name_plural = _('log entries') verbose_name_plural = _("log entries")
db_table = 'django_admin_log' db_table = "django_admin_log"
ordering = ['-action_time'] ordering = ["-action_time"]
def __repr__(self): def __repr__(self):
return str(self.action_time) return str(self.action_time)
def __str__(self): def __str__(self):
if self.is_addition(): if self.is_addition():
return gettext('Added “%(object)s”.') % {'object': self.object_repr} return gettext("Added “%(object)s”.") % {"object": self.object_repr}
elif self.is_change(): elif self.is_change():
return gettext('Changed “%(object)s” — %(changes)s') % { return gettext("Changed “%(object)s” — %(changes)s") % {
'object': self.object_repr, "object": self.object_repr,
'changes': self.get_change_message(), "changes": self.get_change_message(),
} }
elif self.is_deletion(): elif self.is_deletion():
return gettext('Deleted “%(object)s.”') % {'object': self.object_repr} return gettext("Deleted “%(object)s.”") % {"object": self.object_repr}
return gettext('LogEntry Object') return gettext("LogEntry Object")
def is_addition(self): def is_addition(self):
return self.action_flag == ADDITION return self.action_flag == ADDITION
@ -98,38 +110,62 @@ class LogEntry(models.Model):
If self.change_message is a JSON structure, interpret it as a change If self.change_message is a JSON structure, interpret it as a change
string, properly translated. string, properly translated.
""" """
if self.change_message and self.change_message[0] == '[': if self.change_message and self.change_message[0] == "[":
try: try:
change_message = json.loads(self.change_message) change_message = json.loads(self.change_message)
except json.JSONDecodeError: except json.JSONDecodeError:
return self.change_message return self.change_message
messages = [] messages = []
for sub_message in change_message: for sub_message in change_message:
if 'added' in sub_message: if "added" in sub_message:
if sub_message['added']: if sub_message["added"]:
sub_message['added']['name'] = gettext(sub_message['added']['name']) sub_message["added"]["name"] = gettext(
messages.append(gettext('Added {name}{object}”.').format(**sub_message['added'])) sub_message["added"]["name"]
)
messages.append(
gettext("Added {name}{object}”.").format(
**sub_message["added"]
)
)
else: else:
messages.append(gettext('Added.')) messages.append(gettext("Added."))
elif 'changed' in sub_message: elif "changed" in sub_message:
sub_message['changed']['fields'] = get_text_list( sub_message["changed"]["fields"] = get_text_list(
[gettext(field_name) for field_name in sub_message['changed']['fields']], gettext('and') [
gettext(field_name)
for field_name in sub_message["changed"]["fields"]
],
gettext("and"),
) )
if 'name' in sub_message['changed']: if "name" in sub_message["changed"]:
sub_message['changed']['name'] = gettext(sub_message['changed']['name']) sub_message["changed"]["name"] = gettext(
messages.append(gettext('Changed {fields} for {name}{object}”.').format( sub_message["changed"]["name"]
**sub_message['changed'] )
)) messages.append(
gettext("Changed {fields} for {name}{object}”.").format(
**sub_message["changed"]
)
)
else: else:
messages.append(gettext('Changed {fields}.').format(**sub_message['changed'])) messages.append(
gettext("Changed {fields}.").format(
**sub_message["changed"]
)
)
elif 'deleted' in sub_message: elif "deleted" in sub_message:
sub_message['deleted']['name'] = gettext(sub_message['deleted']['name']) sub_message["deleted"]["name"] = gettext(
messages.append(gettext('Deleted {name}{object}”.').format(**sub_message['deleted'])) sub_message["deleted"]["name"]
)
messages.append(
gettext("Deleted {name}{object}”.").format(
**sub_message["deleted"]
)
)
change_message = ' '.join(msg[0].upper() + msg[1:] for msg in messages) change_message = " ".join(msg[0].upper() + msg[1:] for msg in messages)
return change_message or gettext('No fields changed.') return change_message or gettext("No fields changed.")
else: else:
return self.change_message return self.change_message
@ -142,7 +178,10 @@ class LogEntry(models.Model):
Return the admin URL to edit the object represented by this log entry. Return the admin URL to edit the object represented by this log entry.
""" """
if self.content_type and self.object_id: if self.content_type and self.object_id:
url_name = 'admin:%s_%s_change' % (self.content_type.app_label, self.content_type.model) url_name = "admin:%s_%s_change" % (
self.content_type.app_label,
self.content_type.model,
)
try: try:
return reverse(url_name, args=(quote(self.object_id),)) return reverse(url_name, args=(quote(self.object_id),))
except NoReverseMatch: except NoReverseMatch:

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More