#22403 closed Cleanup/optimization (wontfix)

Add AMD support for django javascript object

Reported by: ian.morrison.a@… Owned by: nobody
Component: Internationalization Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have been having problems integrating the javasctipt i18n support with a complex javascript front-end. It would be tremendously useful for the global 'django' object - that is exported in 'django/views/i18n.py' - could also be exported as an AMD module.

Change History (4)

comment:1 Changed 16 months ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

For what it's worth, the debug toolbar went down this road and it was an epic failure that still hasn't been resolved. See the two dozen of related tickets on GitHub for more info. As far as I can tell, supporting AMD actually means forcing all our users to use AMD.

comment:2 Changed 16 months ago by timo

  • Component changed from Translations to Internationalization
  • Easy pickings unset
  • Version changed from 1.6 to master

comment:3 Changed 15 months ago by alejandro

I tested it with a minimal example and works, the following logs true to the console:

require(['django'], function(amdDjango) {
    console.log(amdDjango === window.django); 
});

comment:4 Changed 15 months ago by timo

  • Resolution set to wontfix
  • Status changed from new to closed

I noticed that the debug toolbar has abandoned the effort to integrate with AMD. Not sure of the specifics as I haven't used AMD, but this seems like something that should first be raised on the django-developers mailing list in order to determine if it's worth it.

Note: See TracTickets for help on using tickets.
Back to Top