Skip to content

Fix #3638 Django static import deprecated - #3637

Merged
madchap merged 1 commit into
DefectDojo:devfrom
damiencarol:django_deprecated
Jan 17, 2021
Merged

madchap merged 1 commit into
DefectDojo:devfrom
damiencarol:django_deprecated

Conversation

@damiencarol

@damiencarol damiencarol commented Jan 17, 2021 •

Copy link
Copy Markdown
Contributor

According to Django documentation, the staticfiles and admin_static template tag libraries are deprecated in 2.x and will be removed in 3.x

This pull request fixes deprecation to make migration to Django 3.x easier.

This pull request fixes #3637

References

Django Deprecation Timeline

@damiencarol
damiencarol marked this pull request as ready for review January 17, 2021 12:55
@damiencarol
damiencarol requested review from a team, madchap and valentijnscholten January 17, 2021 12:55

@valentijnscholten valentijnscholten left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice big PR. Hope you didn't miss / mess up an occurrence ;-)

@valentijnscholten

Copy link
Copy Markdown
Member

since it passes the integration tests it should be good as that is checking for javascript console errors which would trigger on 404 for css/js files or any other javascript errors.

@damiencarol

Copy link
Copy Markdown
Contributor Author

It is exactly feature equivalent. I made a replace from:
{% load static from staticfiles %} to {% load static %} as described in Django documentation.
I'm wondering if we should do the same for {{ STATIC_URL }}

@damiencarol damiencarol changed the title Fix Django static import deprecated Fix #3638 Django static import deprecated Jan 17, 2021
@damiencarol damiencarol linked an issue Jan 17, 2021 that may be closed by this pull request
@damiencarol damiencarol mentioned this pull request Jan 17, 2021
6 tasks done

@madchap madchap left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, and I trust our increasing test coverage too :-D

@madchap
madchap merged commit 874ce0c into DefectDojo:dev Jan 17, 2021
@madchap madchap mentioned this pull request Jan 19, 2021
@damiencarol
damiencarol deleted the django_deprecated branch April 30, 2021 07:28
9alexx3 pushed a commit to 9alexx3/django-DefectDojo that referenced this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Django 2.x deprecation

3 participants