developersociety / django-template

Django templates for DEV Django sites
6 stars 0 forks source link

Python3.12, django 5, ruff, etc. #278

Closed danthedeckie closed 6 months ago

danthedeckie commented 6 months ago
tomkins commented 6 months ago

Right, I've done a bunch of updates - there's a but....

ruff check .
warning: No Python files found under the given path(s)
All checks passed!
ruff format --check apps project
warning: No Python files found under the given path(s)
black --check apps project
All done! ✨ 🍰 ✨
26 files would be left unchanged.
isort --check-only --diff apps project
Skipped 3 files
flake8 apps project
cmp --silent package-lock.json node_modules/.package-lock.json || (npm ci && cp -a package-lock.json node_modules/.package-lock.json)
npm run eslint -- static/src/js

> @ eslint /home/runner/work/django-template/django-template/.tox/py312/tmp/projectname
> eslint "static/src/js"

npm run prettier --silent -- --list-different "static/src/{js,scss}/**" "*.js"
djlint templates --lint
No files to check! 😢
djlint templates --check
No files to check! 😢

Something is slightly off within the testing of each environment - it's not actually doing the lint/checks.

tomkins commented 6 months ago

Added another commit which I think fixes ruff - but djlint still has issues.

One to come back to - not high priority.

danthedeckie commented 6 months ago

@tomkins - On a new site now with djlint, it's complaining a lot about the hard coded / URLs.

Do you think it's worth putting in a 1 line root TemplateView and then updating all the templates to point at that?

Or (my slight preference) stripping out the templates completely, as they're kind of out of date now - and for django-only projects, they're almost certainly wrong and not a great base for whatever custom project it is?

We also need to massively update or replace the FE side of this too. (it's still node v12, and very very old Vue, etc...)

danthedeckie commented 6 months ago

@tomkins - it all seems to be OK of what's in this PR - works fine.

I can't approve this as it's my PR - do you want to do that and then we do the next bits as continuing PRs? Or do you want all the things added to this one before merging?

tomkins commented 6 months ago

Let's get this in and continue fixing/tidying - and yes, the templates probably need stripping back to the bare essentials.