Skip to content

Commit

Permalink
Update Django project settings
Browse files Browse the repository at this point in the history
Why these changes are being introduced:
* Clean up files in Solenoid's 'settings' directory to improve
readability and coherence, as well as remove redundant settings between
the files to highlight notable environment-specific settings

How this addresses that need:
* TBD

Side effects of this change:
* Environment variables are loaded using 'django-environ' instead of
'python-dotenv'

Relevant ticket(s):
* TBD
  • Loading branch information
jonavellecuerdo committed Nov 17, 2023
1 parent 7e25010 commit f4afe82
Show file tree
Hide file tree
Showing 7 changed files with 261 additions and 277 deletions.
3 changes: 3 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ python_version = "3.11"

[dev-packages]
black = "*"
celery-types = "*"
coveralls = "*"
django-stubs = "*"
mypy = "*"
pre-commit = "*"
pytest = "*"
Expand All @@ -31,6 +33,7 @@ django-ckeditor = "*"
django-compressor = "*"
django-crispy-forms = "*"
django-debug-toolbar = "*"
django-environ = "*"
django-libsass = "*"
gunicorn = "*"
newrelic = "*"
Expand Down
144 changes: 107 additions & 37 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
import os
import sys

from dotenv import load_dotenv


if __name__ == "__main__":
load_dotenv()
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "solenoid.settings.base")

from django.core.management import execute_from_command_line
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ disallow_untyped_calls = true
disallow_untyped_defs = true
exclude = ["tests/"]

[[tool.mypy.overrides]]
module = ['environ']
ignore_missing_imports = true

[tool.pytest.ini_options]
log_level = "INFO"

Expand Down
2 changes: 1 addition & 1 deletion solenoid/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@


@app.task(bind=True)
def debug_task(self):
def debug_task(self) -> None: # type: ignore
print("Request: {0!r}".format(self.request))
Loading

0 comments on commit f4afe82

Please sign in to comment.