Squashed 'ka-lite/' changes from 30a2d60..e90ca3f

e90ca3f add flake8 style standards for flake8
7db71d6 Merge pull request #2075 from cpauya/feature/1161-staticfiles-after-update
051d8a3 fix #1832: clear other messages before displaying success message
901026d skip test if running on travis
5409f90 email jamie when travis build breaks
ff19868 Merge branch 'master' into release-0.12.0
8626d5f Merge pull request #2081 from dylanjbarth/1974
d1ec361 Fix for final broken test.
06425f2 Update tests for bug fix. No longer showing list of names that match, only a user count.
3d7e69a Warn the user before creating a user if there is already a user with the same first and last name combination.
4798377 use django unittest instead of builtin unittest
171ae55 Check that passwords match and enforce min 6 char length during registration and password change.
059dea4 Added option to use `fle_utils.config.models.Settings` that can be set at the admin site. Options for hash now starts with the `Settings`, then the `BUILD_ID`, then the `SHA256` hash.
2b1208c Use boolean values as second argument to custom `static` template tag, defaults to False.
538a693 Check to make sure that passwords match before creating a new user, or updating an account.
c3a997e make firefox the priority browser again
bc172e8 skip session language switching test for travis
1f11f9f Merge pull request #2077 from aronasorman/fix_set_server_language
3a67975 lint i18n middleware
f71c1df dont create a test admin if one already exists
3fff7c9 Merge branch 'release-0.12.0' of github.com:learningequality/ka-lite into fix_set_server_language
added20 remove creation of admin on i18n browser_tests
527722c lint import in languagepackdownload
0672db6 lint imports
e881304 dont use csrf for switching languages
7bb4c4d convert per-session language switching to use the API endpoint
af0ead6 Add hash to `khan-lite.css`.
5915b2e This is in reference to #1161 - "Static files not properly reloaded by all browsers after update".
fc9515e fix 403 error flash message
2e1cd1d remove duplicate code
7276f6e move set default language url from hardcoded string to its own js var
7f1dba6 use the set_default_language endpoint to change the server language
9597a3f move the setting of the default language from i18n middleware into its own endpoint
3bb8207 Merge pull request #2049 from cpauya/hotfix/2001-cron-on-windows
c0a092f Allow starting `start.command` with number of seconds for `cronserve` as argument.
73291ce Allow starting `cronstart.sh` with number of seconds for `cronserve` as argument.
d3e58b4 Bug fix for python on `counter` "defined before use" exception. Allow starting `cronstart.bat` with number of seconds for `cronserve` as argument.
0a8fea7 Removed extra `)` character at `scripts/cronstart.bat` which may prevent the script to continue running cron jobs in Windows. - Add missing image file on `static` folder which is referenced by `INSTALL.md` - Update `INSTALL.md` with some fixes to point repo from `https://github.com/jamalex/` to `https://github.com//learningequality/`.  Also update the Python and Git urls and download locations.
02c0636 Replace occurrences of `https://github.com/jamalex/*` with `https://github.com/learningequality/*` in some documentation.
a83b241 create a test for switching the server language
e8c6e93 make set default language button more amenable to testing
90ba045 Merge branch 'release-0.12.0' into nalanda
6db56cc Merge pull request #2032 from aronasorman/properly_place_js_catalog_files
9b09bce Merge branch 'release-0.12.0' into nalanda
24a77bf place js catalog files into i18n/static dir
56f7fae Directly check for /etc/init.d before asking whether to start at boot.
8301615 Fix the "unary operator expected" error in setup_linux.sh
e57140c Merge pull request #2037 from jamalex/2030
b189841 Fix to khan-exercises to get button text changing again on error (#2030)
7048c1c Regression test to detect #2030.
854f977 Merge pull request #2027 from aronasorman/2016
fc6f4fe cleanup based on review
8003ea6 place js catalog files onto the toplevel static dir
f168827 simplify the js catalog test
10664d3 call collectstatic once we finish creating the js catalog files for a language
432d968 move uninstalling of a language to i18nTestCase too
4a3ca6e make i18nTestCase a pure mixin class
10c77e7 move uninstalling of a language to i18nTestCase too
45ceb40 make test for checking if we have js catalog files available
d2b0ebd make i18nTestCase a pure mixin class
3d6893e move language installation logic to I18nTestCase
1db1d9e Merge branch 'release-0.12.0' into 2016
8b7aaa6 fix GET_EXERCISE_LOGS_URL
3b3b274 solve #2029: set debug central server host to the staging server
a24d9b8 dont test deutsche for now
ee49b80 silence logs when installing/uninstalling language packs when running tests
abaf189 make updatesframework.display_notes use logging framework instead of directly writing to stdout
3157902 mock the download of language packs to download local test zip files instead
32c90b2 move delete_language command from updates.__init__ to i18n.__init__
04510d8 add test language pack zips and logging statement for langpack download url
cef2cd8 setup a client in I18nTestCase
9117fa8 move i18n testing utility functions to its own mixin subclass
02d36f0 implement hack to update csrf token
39a92d3 remove unneeded html attributes
04f751d solve #2016: convert set_user_language to POST data instead of GET
48640dc remove redundant integration_tests.py
8d8bbd4 create tests for switching languages
2431a49 fail fast on database errors
7cf5713 add integration tests for switching languages
b900e08 Merge pull request #2017 from learningequality/ka-lite-central-merge-release-0.12.0
360fbd2 Merge pull request #148 from bcipolli/paginate_sync_sessions
3dce27b Merge pull request #144 from bcipolli/1957
a12d5b7 Paginate sync sessions.
e278071 Merge commit 'ed5e68d3d3c140a5e420fec616d23acacf8ca7fe' into release-0.12.0
281816a Fix for #1903: metadata check was wrong, outer loop should be model dependencies.
c5fe191 Merge pull request #146 from bcipolli/IDOC-robust
f5b5e1d Merge pull request #2011 from learningequality/ka-lite-central-merge
d8b707c Merge commit 'f6e4e64d4aa38d41fd90591096841ea209eecd22' into release-0.12.0
3348066 Check local device's zone (to avoid issues when Zones exist but DeviceZone does not).
2396afd When not on a zone, show the local device only.
30da856 Use consistent idioms, remove unused code.
07a0e8f Fix for #1957: Use unique URL nicknames to avoid confusion.
cadf011 Don't have a maximum number of syncsession records by default.
a5cd6bb Don't make an additional embedded query in deleting sync sessions.
7b2db7d Merge branch 'nalanda' into release-0.12.0
4868e26 Merge pull request #1992 from n-kim/hovereffects
3806a32 Fixes issue #1751
8de70cf force add the test language pack
a4e095e delete lock file if we encounter SIGHUP or SIGTERM
ac4f17d print out the port we are attempting to open
0a7579a catch the assertion error
df00bcf make delete_languagepack test pass
0cee0f5 fix update_languages.js
1e626f0 Merge pull request #1989 from jamalex/start.sh-setup
11db4bf Merge pull request #1990 from jamalex/softset-stats
402f412 Handle failures in setting copied script file permissions gracefully.
dfa61d7 Allow start.sh to be used to trigger automated setup via kaserve.
a6198dc Merge pull request #1987 from aronasorman/sshtunnel
4f4c4a4 remove tunnel.lock from gitignore
5422da4 sleep when we can't connect
08fd2c4 show the version according to git if we have a git repo!
9bbce9a display either the git or zip download update button depending on whether we're in a git repo
ee22302 Merge pull request #1980 from aronasorman/git-update
beb6d38 just show the dialog box when we complete or "cancel" the software update
192e61c update the remote url in case it changes
2f2010e place the lock file to the os's temp directory
d85ddb1 tunneling app and management command
255ea73 remove use of get_setting.sh
4fabee5 Merge pull request #1984 from rtibbles/control_panel_ui_fixes
8dbf433 Move ui-datepicker to shared stylesheet folder.
7fb5fb5 Update action button status when selecting 'all' or 'none' on facility management.
bc86f69 Only remove 'Ungrouped' group if empty.
acaaf15 Removed unneccessary semi-colon. First time ever.
cacdeab Activated no group browser test for facility management.
ccde703 Fixes #1774 Action buttons start off disabled. When select event happens, check what is selected. Enable/disable accordingly.
aadf3de Merge pull request #131 from dylanjbarth/68
e7775c3 explicitly tell git to start searching for a git repo on the directory of update.py
0b1a7fe Adding jquery UI date picker css to fix calendar styling issue
1f290ea Fixes #1837 Remove Ungrouped group from group_data if empty and no other groups.
6e161c8 Fixed tests for user management.
1775123 solve #1956: use decorator-specific wrapper/inner_fn
af09ca6 Merge pull request #1981 from aronasorman/1956
d33ab7b solve #1956: use decorator-specific wrapper/inner_fn
91912c5 make sure to refresh too if the update process gets "cancelled"
59560ba show the refresh page dialog box WHEN we get the 403 forbidden error
b561173 Almost done, damn tests
5a4eb4b check if remote_version is present in the data sent by the central server
ba410d3 abstract out download button behavior
ff8a130 indicate that we want a production run of the server on startup
1504927 dont forget to unpack the process
0cba679 also make a default value if dest_dir is not present
c130d46 dont self.current_dir if its not defined
b1fc0a5 Changed from icons to text.
58cd3ef stash stuff first before checking out
181848c catch the right git command error
6a1c567 fix local_setting detected for git update settings
10a3900 simplify git update process
6475b42 update git package
b8f2812 ignore TAGS file
5cb21c6 add settings for needed for updating through Git
bfb04c9 Fixing syntax error
5014be5 Don't duplicate, just wrap, facility template.
ef269a5 Merge pull request #124 from bcipolli/107
85adc7c Fixed styling crap on central control panel.
d9d4a34 Fix to fix on get_zone.
1be97c8 add button for updating through git
2aa56cc Fix UI code to properly hide/show on central server.
5532e4c Fix bug in get_zone--central server can set a zone before saving and signing.
daa35df Merge commit '37acd3bacf6aabaf6d81672f2614be9d61a52349' into release-0.12.0
7b683ea always run collectstatic when we run kaserve
956b841 check if we have the key of the central server first
e860acd Remove unused references to subtitle in css/js
fc042b7 Add back callback to reboot.
0ddb19e Cleanup code to have consistent feel across files.
2d834b8 Cleanup of update_software: remove unnecessary callbacks, wrap strings in gettext/sprintf
5cf5c57 Fix for #1800: for software updates, move updatesStart into ONLINE_ONLY case, so error message isn't cleared.
5293bf0 Disable file-based updates vfor 0.12.0
80cc253 Merge pull request #1967 from bcipolli/1800
bf926f9 always run collectstatic when we run kaserve
8f868ed check if we have the key of the central server first
6babe2a Remove unused references to subtitle in css/js
8cdcdbb Add back callback to reboot.
fb08299 Cleanup code to have consistent feel across files.
af3fa34 Cleanup of update_software: remove unnecessary callbacks, wrap strings in gettext/sprintf
fc80650 Fix for #1800: for software updates, move updatesStart into ONLINE_ONLY case, so error message isn't cleared.
a2bdc4f Disable file-based updates vfor 0.12.0
a4bd0b1 Fix for #1800: move server_online code check into each update function.
de312c0 Merge pull request #1965 from bcipolli/1772
6d13056 URL and test tweaks.
4df23f4 Fix for #1772: Add group edit page.
0983fc7 Cleanup of facility_group code to be more ready for editing.
cd221b6 Rename files to reflect model name consistently.
8775200 Finally, a fix for this test!
f34a857 Finally, a fix for this test!
9dcd751 Skip test in Python 2.6, as the wait function is failing and we're too busy to care.
1d1ec4f Skip test in Python 2.6, as the wait function is failing and we're too busy to care.
2b57037 Remove spaces from assignment.
83da18b Fix for #107: scrub pot files for '%s' format strings.
529d8df Remove unsupported mplayer code.
43cd2cb Add hover text to help disambiguate language buttons.
7c5e035 Add hover text to help disambiguate language buttons.
5ac6f29 Fix for #1934: Title missing space in device management page.
1cc24e6 Fix for #1934: Title missing space in device management page.
c8fd50a Test fix.
3aacdf5 Merge pull request #1962 from bcipolli/1622
7a7ee11 Merge pull request #1964 from learningequality/ka-lite-central-merge
2fe8704 Fix for #1917: Refactor markup and messages to separate URLs (completely) and markup code (partially) out of messages.
f2e3c3c Remove chronograph translations--they're essentially for the admin view.
4953d55 Change "zone" to "sharing network".
eff7d44 Fix up strings that break string compiling.
18238cb Fix test_wrappings filters sent to makemessages, tunnel verbosity
1b3e784 Fix up some small bugs (missing variables, functions)
9f5b1fc KA-LITE-MOD: tweak messages and search path to FIX DJANGO 1.4 BUGS
981e155 Separate template deletions, paths for commands.
c860e7e Rename update_po to test_wrappings, copy to update_pot witin centralserver.
96ffe9b Merge pull request #116 from bcipolli/1950
9ebb349 To ensure only users that are selected are moved between groups pass user id not username as value in facility_management view. In group move API search by id not username.
aeae4f9 Fixing bug (missing self), use more descriptive name
25ed019 Reconfiguring to allow field errors to be set directly, updating test accordingly.
fd8ada2 Get facility set from zone
a43c47f Add tests
37eb1de Validation where fields are inter-dependent are not guaranteed order, and should be done in clean.
64ae049 For security purposes, only show details on existing usernames to admins.
4258993 Change for #1885: switch from facility-uniqueness check to zone
de8f132 Fix for #1885: warn if first/last name combo exists already; allow user to override.
ba65b54 Fix for #1838: only validate passwords when it's a new user (no password), or either of the password fields is non-empty.
c5b3b3e Fix for #1839: Clean up facility_user views logic to avoid weird errors on failed POST.
162ecd3 General cleanup of code and comments to follow Django standards a bit more carefully.
19aafe1 Fix for #1622: don't allow multiple groups with the same name.
a099ca9 Allow syncing of facilities with the same name.
f5506ea Fix for #1622: Validate that facility name is unique on the sharing network (as best we can)
9f6b5c6 Small bugfix, removing outdated tests.
fc70afb Fixing up tests.
7439306 Fix URL reversal fail for add_facility (no zone).
dc92059 Adding docstring for languagepackdownload.py
7ff904e Migrate facility app to use new method for back-end / front-end interaction.
9f1ae5d Method for simple specification of back-end/front-end AJAX interaction
68d30ce Move delete_zone code to central app (where it belongs, it depends on `Organization`!)
7865c80 Code cleanup.
b32c3e8 Set up ajax-based org and zone deletions.
12a0708 Partial fixes for #1956: avoid using generic inner function names in decorators.
fa4e7a2 Fix for #100: Allow views to be called directly and passed (required) facility parameter.
4ce7425 Fix for #92: never call .update on QuerySet containing SyncedModel.
4e062b8 Merge commit '58b4708e644a2557dc5baa161462d12d18568ee5' into nalanda-rct1
868e02c Fix for #113: Bunch 'o refactor / import issues in the update_language_path codepath.
7c76456 #108: Don't allow syncmodels to be run on the central server.
9cd0a37 Moving remaining code from outer into inner loop.
881734e Merge pull request #1909 from bcipolli/1903
aac4a76 Fix for #1903: metadata check was wrong, outer loop should be model dependencies.
25365f8 Update version; remove .travis.yml in master branch.

git-subtree-dir: ka-lite
git-subtree-split: e90ca3f8ef8ad7987b84e74a89ddda535c5503eb
Merge commit 'a81dc4397e8cc84648716a9691149f468953ac9c' into develop

Conflicts:
	ka-lite/kalite/facility/api_views.py
	ka-lite/kalite/facility/decorators.py
	ka-lite/kalite/shared/decorators/auth.py
	ka-lite/python-packages/fle_utils/internet/decorators.py