Changes between Version 5 and Version 6 of AJAX/Dojo/RefactoredFormSubmit


Ignore:
Timestamp:
Feb 11, 2007, 9:32:16 AM (17 years ago)
Author:
erob@…
Comment:

added some comments about general uses of dojo with django

Legend:

Unmodified
Added
Removed
Modified
  • AJAX/Dojo/RefactoredFormSubmit

    v5 v6  
    3535
    3636So let's move on in writing our own Dojo template, where we will make an abstraction of all our applied
    37 Dojo concepts:
     37Dojo concepts.
    3838
    39 [dojo template here...]
     39Quite frankly, that part is going straight-forward, as we're only writing HTML:
     40{{{
     41<script type="text/javascript">
     42    djConfig = {
     43        isDebug:true,
     44        debugAtAllCosts:false
     45    };
     46</script>
     47<script type="text/javascript" src="/media/js/dojo/dojo.js"></script>
     48<script type="text/javascript">
     49    dojo.require("dojo.event.*");       // sophisticated AOP event handling
     50    dojo.require("dojo.io.*");          // for Ajax requests
     51    dojo.require("dojo.json");          // serialization to JSON
     52</script>
     53<script type="text/javascript" src="/media/js/ajax.js"></script>
     54}}}   
    4055
    41 Then let's push forward and write down the core JS file, for doing AJAX-related things:
     56The ''djConfig.isDebug'' parameter is important for debugging, so you should
     57consider setting it to "true" when inspecting you're application with Firebug
     58or something else.
     59
     60Optionally, you can "bake" your own Dojo file, and substract the baked modules
     61from the list of required modules above, so we wont load the already compiled
     62Dojo modules twice.   
     63 
     64Let's push forward and write down the core JS file, for doing AJAX-related things
     65with our own custom-compiled Dojo module:
    4266
    4367[ajax-related things here...]
Back to Top