diff mbox series

templates: Use 'static' rather than 'statictags' library

Message ID 20190913111943.6979-1-ajd@linux.ibm.com
State Accepted
Headers show
Series templates: Use 'static' rather than 'statictags' library | expand

Commit Message

Andrew Donnellan Sept. 13, 2019, 11:19 a.m. UTC
statictags is being renamed to static, use of {% load statictags %} is
deprecated and will break in Django 3.

Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
---
 templates/base.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Axtens Sept. 13, 2019, 8:08 p.m. UTC | #1
Applied, thanks.

This gives you the potentially dubious distinction of having a patch
merged from the departure lounge of Heathrow Airport. (Appropriately, I
suppose, it took me 2 goes to get it right.)

Regards,
Daniel

Andrew Donnellan <ajd@linux.ibm.com> writes:

> statictags is being renamed to static, use of {% load statictags %} is
> deprecated and will break in Django 3.
>
> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
> ---
>  templates/base.html | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/templates/base.html b/templates/base.html
> index 501208f01e59..802ea98b0745 100644
> --- a/templates/base.html
> +++ b/templates/base.html
> @@ -1,4 +1,4 @@
> -{% load staticfiles %}
> +{% load static %}
>  <!DOCTYPE html>
>  <html xmlns="http://www.w3.org/1999/xhtml">
>   <head>
> -- 
> 2.20.1
>
> _______________________________________________
> Patchwork mailing list
> Patchwork@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork
Stephen Finucane Sept. 13, 2019, 9:25 p.m. UTC | #2
On Fri, 2019-09-13 at 12:19 +0100, Andrew Donnellan wrote:
> statictags is being renamed to static, use of {% load statictags %} is
> deprecated and will break in Django 3.
> 
> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>

I was trying to figure out if this was okay for Django 1.11 as well as
2.x. I eventually found the release note for it [1] and indeed, this
looks like a Django 1.10+ thing so we're golden.

Reviewed-by: Stephen Finucane <stephen@that.guru>

...and it's already merged :)

[1] https://docs.djangoproject.com/en/dev/releases/1.10/#django-contrib-staticfiles
Andrew Donnellan Sept. 13, 2019, 9:26 p.m. UTC | #3
On 13/9/19 10:25 pm, Stephen Finucane wrote:
> On Fri, 2019-09-13 at 12:19 +0100, Andrew Donnellan wrote:
>> statictags is being renamed to static, use of {% load statictags %} is
>> deprecated and will break in Django 3.
>>
>> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
> 
> I was trying to figure out if this was okay for Django 1.11 as well as
> 2.x. I eventually found the release note for it [1] and indeed, this
> looks like a Django 1.10+ thing so we're golden.
> 
> Reviewed-by: Stephen Finucane <stephen@that.guru>
> 
> ...and it's already merged :)

I did run the test suite on quite a few combinations to double check!
Stephen Finucane Sept. 13, 2019, 9:28 p.m. UTC | #4
On Fri, 2019-09-13 at 22:26 +0100, Andrew Donnellan wrote:
> On 13/9/19 10:25 pm, Stephen Finucane wrote:
> > On Fri, 2019-09-13 at 12:19 +0100, Andrew Donnellan wrote:
> > > statictags is being renamed to static, use of {% load statictags %} is
> > > deprecated and will break in Django 3.
> > > 
> > > Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
> > 
> > I was trying to figure out if this was okay for Django 1.11 as well as
> > 2.x. I eventually found the release note for it [1] and indeed, this
> > looks like a Django 1.10+ thing so we're golden.
> > 
> > Reviewed-by: Stephen Finucane <stephen@that.guru>
> > 
> > ...and it's already merged :)
> 
> I did run the test suite on quite a few combinations to double check!

Hence an overheating laptop :) Y'all need to switch to Fedora and its
sweet-as Python development environment.

Stephen
Geert Stappers Sept. 16, 2019, 11:50 a.m. UTC | #5
On 13-09-2019 13:19, Andrew Donnellan wrote:

> statictags is being renamed to static, use of {% load statictags %} is
"tags"
> deprecated and will break in Django 3.
>
> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
> ---
>  templates/base.html | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/templates/base.html b/templates/base.html
> index 501208f01e59..802ea98b0745 100644
> --- a/templates/base.html
> +++ b/templates/base.html
> @@ -1,4 +1,4 @@
> -{% load staticfiles %}
"files"
> +{% load static %}
>  <!DOCTYPE html>
>  <html xmlns="http://www.w3.org/1999/xhtml">
>   <head>


IMHO should commit message and actual change match.

Currently I don't seeĀ  "statictags" matching "staticfiles".


Please make them matching.



Regards

Geert Stappers
Andrew Donnellan Sept. 16, 2019, 10:33 p.m. UTC | #6
On 16/9/19 1:50 pm, Geert Stappers wrote:
> IMHO should commit message and actual change match.
> 
> Currently I don't seeĀ  "statictags" matching "staticfiles".
> 
> 
> Please make them matching.

Too late, somehow myself, Daniel and Stephen all managed to miss this 
before merge... I must have had the phrase "template tags" running 
around in my head when I wrote the commit message.
diff mbox series

Patch

diff --git a/templates/base.html b/templates/base.html
index 501208f01e59..802ea98b0745 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,4 +1,4 @@ 
-{% load staticfiles %}
+{% load static %}
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
  <head>