jonathan-s / django-sockpuppet

Build reactive applications with the django tooling you already know and love.
https://github.com/jonathan-s/django-sockpuppet
MIT License
450 stars 22 forks source link

simplify example code #120

Closed nerdoc closed 3 years ago

nerdoc commented 3 years ago

Python since v3.4 uses pathlib for paths preferrably: https://www.python.org/dev/peps/pep-0428/. Django, when using a new project, automatically imports Path in the settings:

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

no need for that. And, BASE_DIR is declared automatically too, even if is no Python standard.

jonathan-s commented 3 years ago

Thank you for the reminder of application.consumer. Right now I'm planning to take over the control of what StimulusReflex is doing which you can see in #135. So this won't be relevant so I will close this PR. I appreciate you making it though!