From 5dceb1f07807d76f163ce1929e9f1dc1b2da6289 Mon Sep 17 00:00:00 2001 From: "Elif T. Kus" Date: Sun, 3 Jan 2016 12:56:22 +0200 Subject: [1.9.x] Fixed #26020 -- Normalized header stylings in docs. Backport of bca9faae95db2a92e540fbd08505c134639916fe from master --- docs/internals/contributing/writing-code/javascript.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'docs/internals/contributing/writing-code/javascript.txt') diff --git a/docs/internals/contributing/writing-code/javascript.txt b/docs/internals/contributing/writing-code/javascript.txt index a3b34c564e..8b8534e384 100644 --- a/docs/internals/contributing/writing-code/javascript.txt +++ b/docs/internals/contributing/writing-code/javascript.txt @@ -9,7 +9,7 @@ Please follow these coding standards when writing JavaScript code for inclusion in Django. Code style ----------- +========== * Please conform to the indentation style dictated in the ``.editorconfig`` file. We recommend using a text editor with `EditorConfig`_ support to avoid @@ -27,7 +27,7 @@ Code style .. _javascript-patches: JavaScript patches ------------------- +================== Django's admin system leverages the jQuery framework to increase the capabilities of the admin interface. In conjunction, there is an emphasis on @@ -41,7 +41,7 @@ production use (e.g. ``foo.min.js``). Any links to the file in the codebase should point to the compressed version. Compressing JavaScript -~~~~~~~~~~~~~~~~~~~~~~ +---------------------- To simplify the process of providing optimized JavaScript code, Django includes a handy Python script which should be used to create a "minified" @@ -61,13 +61,13 @@ Please don't forget to run ``compress.py`` and include the ``diff`` of the minified scripts when submitting patches for Django's JavaScript. JavaScript tests ----------------- +================ Django's JavaScript tests can be run in a browser or from the command line. The tests are located in a top level ``js_tests`` directory. Writing tests -~~~~~~~~~~~~~ +------------- Django's JavaScript tests use `QUnit`_. Here is an example test module: @@ -101,12 +101,12 @@ Please consult the QUnit documentation for information on the types of `assertions supported by QUnit `_. Running tests -~~~~~~~~~~~~~ +------------- The JavaScript tests may be run from a web browser or from the command line. Testing from a web browser -^^^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~~~ To run the tests from a web browser, open up ``js_tests/tests.html`` in your browser. @@ -119,7 +119,7 @@ over HTTP. To view code coverage: * Open http://localhost:8000/js_tests/tests.html in your web browser. Testing from the command line -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To run the tests from the command line, you need to have `Node.js`_ installed. -- cgit v1.3