Opened 10 years ago

Closed 10 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: dev
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 by Aymeric Augustin, 10 years ago

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

Component: TranslationsInternationalization
Easy pickings: unset
Version: 1.6master

comment:3 by alejandro, 10 years ago

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

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