Saleor: Unused code in the templates

Created on 19 Sep 2018  Ā·  5Comments  Ā·  Source: mirumee/saleor

Tiny piece text can be simple delete

in file:
templates\dashboard\base.html
line:
{% load version %}
and
{% version %}

file:
saleorcore\templatetags\version.py

in file:
saleor__init__.py
line:
__version__ = 'dev'

and little fix in settings.py:
SENTRY_DSN
...'release': 'dev'

help wanted stale

Most helpful comment

ā€žTrash codeā€ is not a proper wording when it comes to code that’s unused and can be taken offensively. Please use ā€žunused codeā€ or ā€žlegacy codeā€ next time

All 5 comments

ā€žTrash codeā€ is not a proper wording when it comes to code that’s unused and can be taken offensively. Please use ā€žunused codeā€ or ā€žlegacy codeā€ next time

To be verified - we should display the current version (as the latest commit's SHA for example) in the dashboard.

ā€žTrash codeā€ is not a proper wording when it comes to code that’s unused and can be taken offensively. Please use ā€žunused codeā€ or ā€žlegacy codeā€ next time

Sorry, you right, my low English skill restrict some time me.

To be verified - we should display the current version (as the latest commit's SHA for example) in the dashboard.

SHA + datetime,

Get the current git hash in a Python script:
https://stackoverflow.com/questions/14989858/get-the-current-git-hash-in-a-python-script
https://gist.github.com/simonw/091b765a071d1558464371042db3b959

Get timestamp of the last commit in git repository:
https://stackoverflow.com/questions/13104495/get-time-of-last-commit-for-git-repository-files-via-python
https://gist.github.com/bitrut/1494315

I'd like to pick this one up but @maarcingebala need clarification on requirement please.

Not sure requiring git to be installed on production instances is a good idea so perhaps rather update the static __version__ string as part of release packaging? If so am perhaps not best placed for this issue after all.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings