Feat: packaging (#127)
- Add configuration files for packaging - Precommit now uses ruff Co-authored-by: bkfox <thomas bkfox net> Reviewed-on: #127
This commit is contained in:
@ -10,11 +10,7 @@ sys.path.insert(1, os.path.dirname(os.path.realpath(__file__)))
|
||||
PROJECT_ROOT = os.path.abspath(__file__ + "/../../../")
|
||||
|
||||
# DEBUG mode
|
||||
DEBUG = (
|
||||
(os.environ["AIRCOX_DEBUG"].lower() in ("true", 1))
|
||||
if "AIRCOX_DEBUG" in os.environ
|
||||
else False
|
||||
)
|
||||
DEBUG = (os.environ["AIRCOX_DEBUG"].lower() in ("true", 1)) if "AIRCOX_DEBUG" in os.environ else False
|
||||
|
||||
# Internationalization and timezones: thoses values may be set in order to
|
||||
# have correct translation and timezone.
|
||||
@ -74,9 +70,7 @@ try:
|
||||
except Exception:
|
||||
print(
|
||||
"Can not set locale {LC}. Is it available on you system? Hint: "
|
||||
"Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(
|
||||
LC=LANGUAGE_CODE
|
||||
)
|
||||
"Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(LC=LANGUAGE_CODE)
|
||||
)
|
||||
pass
|
||||
|
||||
|
@ -43,8 +43,6 @@ try:
|
||||
except Exception:
|
||||
print(
|
||||
"Can not set locale {LC}. Is it available on you system? Hint: "
|
||||
"Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(
|
||||
LC=LANGUAGE_CODE
|
||||
)
|
||||
"Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(LC=LANGUAGE_CODE)
|
||||
)
|
||||
pass
|
||||
|
@ -28,6 +28,6 @@ urlpatterns = aircox.urls.urls + [
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(
|
||||
settings.STATIC_URL, document_root=settings.STATIC_ROOT
|
||||
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(
|
||||
settings.MEDIA_URL, document_root=settings.MEDIA_ROOT
|
||||
)
|
||||
|
Reference in New Issue
Block a user