dicom.js contains static URLs
static/js/dicom.js
contains static URLs.
@LuukO, what do I need to do please?
Comments (9)
-
-
reporter Help @LuukO! I have made the changes as suggested - see https://bitbucket.org/openrem/openrem/branch/issue694QRFeedback#chg-openrem/remapp/static/js/dicom.js
But now it doesn't work, and the only feedback I'm getting is the javascript console telling me
Uncaught ReferenceError: Urls is not defined
, pointing atdicom.js
line 32.What have I not done?!
-
reporter I think the normal
reverse.js
needs to be imported in the template, but where is the extra one supposed to be? When I didcollectstatic_js_reverse
, it put adjango_js_reverse
folder in static with ajs
folder withreverse.js
in that - is that where it should be? -
reporter I'm confused! Should there be a
django_reverse/reverse.js
and adjango_js_reverse/reverse.js
or are they the same thing?And where should the
reverse.js
file end up within static? -
reporter Ok, I think I get it. They are the same thing. They were different on my system because one of them was created with
DEBUG
set toTrue
and the other wasn't, which resulted in extra URLs for the debug toolbar.I think that as long as we put it in the right place in the repo, ie
openrem/remapp/static/js/django_reverse/reverse.js
it will be copied to the right folder on users systems when they do the basiccollectstatic
.And by importing it into any of the templates that use it we are ok.
-
reporter -
assigned issue to
-
assigned issue to
-
reporter Changes/CHANGES for ref
#694,#702→ <<cset 957192ec1db9>>
-
reporter - changed status to resolved
-
Sorry I was not online yesterday evening, but you figured out correctly. Thanks for the updates / changes!
- Log in to comment
Hi Ed, You can replace static URL with 'Urls.<urlname>()'. So the url "/openrem/admin/moveupdate" should become 'Urls.r_update()' (without quotes).
Maybe it is more clear if you update the URL-name first to "move_update" in urls.py. After the update of the name you need to run "manage.py collectstatic_js_reverse" and take care the resulting file ends up in the right spot (static/js/django_reverse).