Opened 4 years ago

Closed 4 years ago

#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


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/' - could also be exported as an AMD module.

Change History (4)

comment:1 Changed 4 years ago by Aymeric Augustin

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 4 years ago by Tim Graham

Component: TranslationsInternationalization
Easy pickings: unset
Version: 1.6master

comment:3 Changed 4 years 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 4 years ago by Tim Graham

Resolution: wontfix
Status: newclosed

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