dicom.js contains static URLs

Issue #702 resolved
Ed McDonagh created an issue

static/js/dicom.js contains static URLs.

@LuukO, what do I need to do please?

Comments (9)

  1. Luuk

    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).

  2. Ed McDonagh 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 did collectstatic_js_reverse, it put a django_js_reverse folder in static with a js folder with reverse.js in that - is that where it should be?

  3. Ed McDonagh reporter

    I'm confused! Should there be a django_reverse/reverse.js and a django_js_reverse/reverse.js or are they the same thing?

    And where should the reverse.js file end up within static?

  4. Ed McDonagh 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 to True 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 basic collectstatic.

    And by importing it into any of the templates that use it we are ok.

  5. Luuk

    Sorry I was not online yesterday evening, but you figured out correctly. Thanks for the updates / changes!

  6. Log in to comment