This repository was archived by the owner on Feb 26, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,9 @@ def djbuild(project):
45
45
f .seek (0 )
46
46
lines .insert (0 , "{% load staticfiles %}\n " )
47
47
for line in lines :
48
- f .write (line .replace ('href=/' , "href=\" {% static '/ " )
48
+ f .write (line .replace ('href=/' , "href=\" {% static '" )
49
49
.replace ('.css' , ".css' %}\" " )
50
- .replace ('src=/' , "src=\" {% static '/ " )
50
+ .replace ('src=/' , "src=\" {% static '" )
51
51
.replace ('.js' , ".js' %}\" " ))
52
52
53
53
Original file line number Diff line number Diff line change @@ -47,13 +47,13 @@ def test_djbuild(self):
47
47
with open (os .path .join ('templates/myapp' , 'index.html' )) as f :
48
48
sut = f .readlines ()
49
49
self .assertEqual ('{% load staticfiles %}\n ' , sut [0 ])
50
- expected = """<link href="{% static '/ static/css/app.8dec12ac5345f90e222a6effb448e777.css' %}" rel=stylesheet>\n """ # noqa
50
+ expected = """<link href="{% static 'static/css/app.8dec12ac5345f90e222a6effb448e777.css' %}" rel=stylesheet>\n """ # noqa
51
51
self .assertEqual (expected , sut [6 ])
52
- expected = """<script type=text/javascript src="{% static '/ static/js/manifest.77925171db9c5dd326bf.js' %}"></script>\n """ # noqa
52
+ expected = """<script type=text/javascript src="{% static 'static/js/manifest.77925171db9c5dd326bf.js' %}"></script>\n """ # noqa
53
53
self .assertEqual (expected , sut [10 ])
54
- expected = """<script type=text/javascript src="{% static '/ static/js/vendor.10682ac638c1f430abfc.js' %}"></script>\n """ # noqa
54
+ expected = """<script type=text/javascript src="{% static 'static/js/vendor.10682ac638c1f430abfc.js' %}"></script>\n """ # noqa
55
55
self .assertEqual (expected , sut [11 ])
56
- expected = """<script type=text/javascript src="{% static '/ static/js/app.5f58654c7e43b3645479.js' %}"></script>\n """ # noqa
56
+ expected = """<script type=text/javascript src="{% static 'static/js/app.5f58654c7e43b3645479.js' %}"></script>\n """ # noqa
57
57
self .assertEqual (expected , sut [12 ])
58
58
59
59
def test_djangofy (self ):
You can’t perform that action at this time.
0 commit comments