Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Commit

Permalink
Merge the django1.4 branch!
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 71f93fa7e48566aac6f32c82edc0931edeb3eb18
Author: JensDiemer <git@jensdiemer.de>
Date:   Sat Jun 2 21:30:21 2012 +0200

    django-compressor - ImproperlyConfigured: URL settings (e.g. COMPRESS_URL) must have a trailing slash

commit 78b142a13771591fda9716b307a96c70350bf760
Author: JensDiemer <git@jensdiemer.de>
Date:   Fri Jun 1 15:38:43 2012 +0200

    catch IntegrityError

commit b6e4da0fa76bca7deae765a656918c7b869e9451
Author: JensDiemer <git@jensdiemer.de>
Date:   Fri Jun 1 15:24:00 2012 +0200

    django-reversion-compare>=0.3.1

commit 41970fc70bf1ae2de18d6d1bc4f270847397a085
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 17:42:59 2012 +0200

    remove, cause obsolete

commit 75e0addf900db279dbefaab1302b78553c99a6c5
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 17:36:26 2012 +0200

    .beta is required :(

commit 666cbde28c63fc17665fa2b5e67b00a5e1cf4b3f
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 17:36:15 2012 +0200

    start list with 1 and not with 0 ;)

commit 0298e1e2949896e843425760e11c984d6be518a6
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 17:17:07 2012 +0200

    Use last version from feedparser

commit 2939b3536e1ab8c5855f373be5799a1721d97a0c
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 16:47:52 2012 +0200

    * Add a version info function, call e.g.: ./src/pylucid/scripts/upgrade_pylucid_env.py --version-info

commit 18e68a03e1f2e6c165f2ee96ef72d7fc6d1d88ab
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 14:27:03 2012 +0200

    Update blog unittests and add tests for unique_together

commit 5ab32f1e6e8d65bc3fd8f34caa5cafe7038aee85
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 13:51:17 2012 +0200

    Make blog entry url unique in the rigth way. "unique_for_date" doesn't work here, because the url depents also from the current url. Add "url_date" used for unique_together which is only a datetime.date() value. Use unique_together with createtime/lastupdatetime doesn't work, because it's include the time!

commit 2853f079a39ec605bbb54394c882cb3bb131ce6f
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 10:38:25 2012 +0200

    add {% compress js/css %} blocks in "initial_site_style/base_cms_site.html" dbtemplate

commit 218aa042f18d48f7f2bee72ed05c2fb3f9e67079
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 10:24:25 2012 +0200

    south latest release is 0.7.5

commit 26c366c2c03a49446d61ec46ba23f7defc5c2a19
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 09:49:30 2012 +0200

    Bugfix in "create page instance" and add more info.

commit 5aeb2ab6fb1268099137801554bf739d6ea1d7d8
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 09:49:08 2012 +0200

    Use management_command_settings.py for create page instance management commands, so we need to handle it seperate in settings.py

commit 8a42f397edf32399991f576ebd4fa7f40e334b2a
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 31 09:31:31 2012 +0200

    sort languages in language selector

commit da9f23cd0e2d569860ad28a54232758b9c65cb25
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 21:29:56 2012 +0200

    fixme

commit d228bb2bf9213bf02f1ad3c80cf14f06ba7fb6b4
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 21:19:23 2012 +0200

    better docstring

commit 20fb064fa372b6a72c854d76cc5bd0b7f03ee153
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 20:52:01 2012 +0200

    bugfix in debug info

commit b0ff2c42c516f6757affbd8d6c8b419622bafcdf
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 20:51:41 2012 +0200

    raise error if local settings not found

commit e54e5c0711ef4bfe2164f39e12f36a6b9d7b505b
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 20:50:53 2012 +0200

    use new startup way

commit aced9c6518f9b51a53637f45da34d5dfdfa064db
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 20:50:01 2012 +0200

    DocString typo

commit 80a8ac3c9f5dd7583dce52f16666fbc76141b4a1
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 20:20:09 2012 +0200

    Revert "Don't register templates tags as default."

    This reverts commit eec45254b4ea9d5a00016997373a817f1dee54a7.

commit d77f4e58d1d86dae8b2dc9588cbf6ba1b3f122c0
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 17:54:28 2012 +0200

    Bugfix: Resolve doesn't work in any case. Better to add admin:index url in pylucid_project/apps/pylucid/context_processors.py  ?

commit de92398a41b75235fe036de99b11a1a9c0b1d8bb
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 17:39:41 2012 +0200

    use in unittests a other local_settings.
    Now the user can spefify his local settings.
    Change only in blog tests, yet.

commit 76c7d736274f5b95e1f1e3e3035b87c9aa6999ef
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 17:16:32 2012 +0200

    docstring typo

commit 0e6c6c283a565432ee252fa47517ee518f2cc3d7
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 15:42:58 2012 +0200

    Lexicon entry not found -> Display summay with error message as 404 page

commit 88e264fc344d4b2a4ebd1346ae97da0b68fdd3d8
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 15:42:48 2012 +0200

    Blog entry not found -> Display day archive with error messages as a 404 page

commit eec45254b4ea9d5a00016997373a817f1dee54a7
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 15:24:45 2012 +0200

    Don't register templates tags as default.
    register the PyLucid tags in templates with:
    {% load pylucid_defaults %}
    e.g.:
    {% load i18n compress pylucid_defaults %}

commit 3e65f17a38679cd6557d27e79b78feb07ad0b63a
Merge: 538c568 cd581d8
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 15:06:07 2012 +0200

    raise 404 if url wrong

commit 538c568a39ca25c97f55bcbc58961d961a8983b7
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue May 29 23:55:56 2012 +0200

    Bugfix for IndexError: list index out of range - see also: http://forum.pylucid.org/viewtopic.php?f=3&t=339

commit 38bfbc329f91e26b4ee177c710abea7cf95444b6
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 12:36:26 2012 +0200

    Don't extends in 404, 500 error pages.

commit cd581d88cc7679cf47b590b7ee8635d57b8e13f4
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 30 11:40:32 2012 +0200

    raise 404 if url wrong

commit ab9e01a0152bc451b179bb6c95e5a7a0a895f4d2
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue May 29 23:55:56 2012 +0200

    Bugfix for IndexError: list index out of range - see also: http://forum.pylucid.org/viewtopic.php?f=3&t=339

commit 67a4560f38b7e9b961a08ba79cf1ffdee378e8eb
Author: JensDiemer <git@jensdiemer.de>
Date:   Sat May 26 23:56:57 2012 +0200

    protects against overwriting newer blog content

commit 18c2c559d9719483ab13fbcb6822e7d4250e0ddd
Author: JensDiemer <git@jensdiemer.de>
Date:   Sat May 26 21:42:17 2012 +0200

    Check SECRET_KEY, too.

commit 260dff89e15a4c57ae1ca11f09e8c51f9fb14ced
Author: JensDiemer <git@jensdiemer.de>
Date:   Sat May 26 21:34:13 2012 +0200

    remove debug info, because it can be seen in: /pylucid_admin/plugins/internals/show_internals/#settings ;)

commit 1c427fdd3c0a8d521a29825a90288427af32351d
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 22:23:51 2012 +0200

    In django 1.4 the links are absolute and in PyLucid the admin prefix part is variable.

commit 8f5abeb5cd707ec1cb18b762467385a9bedf2434
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 21:48:41 2012 +0200

    cleanup unused stuff around django-compressor

commit 1d3112d1ba2545f45b7b3ecfbb18a1ad10bd2754
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 21:48:11 2012 +0200

    Use SLUG_BLACKLIST when edit/create a new page

commit 47ec11d4821969fc39c64111f40a72060a1cb6a3
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 21:47:37 2012 +0200

    Use both STATIC_* and MEDIA_* and add tests that they are setup in local_settings.py

commit b2116c747a4cf6f937ff3443ae82790990dacaa7
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 21:44:05 2012 +0200

    STATICFILES_DIRS can be empty, because all static files are in app sub directory /static/

commit c317e71e79480de8d4dd60ffef319cce26958daf
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 18:01:28 2012 +0200

    better docstrings

commit 37984c9a942266c03cb027d3c52e0fb6e5b594f5
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 18:00:38 2012 +0200

    Enable django-compressor even if DEBUG is on

commit 153411ef3dd8f3eca6eb3e5e88034d4962182e68
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 18:00:05 2012 +0200

    STATICFILES_DIRS not neede, beacuse static files are in subdirectories of apps.

commit d8d055845e8f1b339c067044cf00310018d1f0f5
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 17:59:14 2012 +0200

    remove "SERVE_STATIC_FILES" settings: serve static files with show_indexes==True if dev server starts with --insecure and --nostatic

commit 4d586d008e84769a39f57d265fc7f8b329ad5fd7
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 17:57:38 2012 +0200

    Don't include local files, if PYLUCID_INCLUDE_BASEPATH is None or not set.

commit 76fb9ad47031f40ec12ebabd69b71fb9a6713b9c
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 17:56:35 2012 +0200

    move static files from pylucid_project/static/ to pylucid_project/apps/pylucid/static/ and the sha stuff to auth

commit 2d58bb15f18b03484e83f0c14a087c9b01bb7833
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 16:32:38 2012 +0200

    change version to v1.0.0.pre in django1.4 branch

commit a0becd5e28f939a9f35b00ed29e88a009c750fd1
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 16:30:36 2012 +0200

    update requirements

commit 794954f5fbc5153e7c8333ed81afb89771efd7dc
Merge: ea4d7a3 8556888
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 16:27:26 2012 +0200

    Merge branch 'master' into django1.4

    Conflicts:
    	pylucid_project/pylucid_plugins/pylucid_comments/views.py

commit ea4d7a37077ac5fdf277035159538c246ee5d748
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 12:42:09 2012 +0200

    Use gettext in javascript, too.
    see: https://docs.djangoproject.com/en/1.4/topics/i18n/translation/#module-django.views.i18n

commit db0d296f500e1513776ea2a554c3c7d1eb675ed0
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 11:47:47 2012 +0200

    Better information about the current used url patterns.
    most code parts borrowed from django-extensions

commit e0348ba4c816eacf885a21190cd21c5060544cd9
Merge: a1a6fee 8bbbe24
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 24 10:47:15 2012 +0200

    Merge remote-tracking branch 'origin/master' into django1.4

    Conflicts:
    	bootstrap/pylucid-boot.py
    	pylucid_project/tests/test_tools/test_runner.py
    	requirements/basic_requirements.txt
    	requirements/developer_installation.txt

commit a1a6feec86731b51e4d6cfa829a90c8b7a1ba006
Author: JensDiemer <git@jensdiemer.de>
Date:   Fri May 18 16:49:53 2012 +0200

    Bugfix sha login: move JS code into seperate file, bacause of django-compressor/django-compressor#60

    Note, "./manage.py collectstatic" must be run.

commit 0dea50ce7c1a854f07752edc629033327c75e218
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 16 17:56:15 2012 +0200

    Use CompareVersionAdmin with dbtemplates

commit b4cd2a4e9b634b5519a89fe2339c2f4e1c1cef96
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 16 17:48:57 2012 +0200

    JS code cleanup

commit 0c712e08c15aa962d001e6cc79cf2fd2ca246ae8
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 16 16:48:37 2012 +0200

    update requirements

commit 36519687abc1eb65e2809c81aafbba363956513a
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 9 21:29:28 2012 +0200

    start using https://github.com/jedie/django-reversion-compare

commit 58198621c81d7bb9b0a7811825a9a78ea95f208e
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 9 21:29:07 2012 +0200

    add more info

commit 911a5c4775cd6bbb1b0608d20ffbd134dd495fee
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 9 19:59:01 2012 +0200

    "revert" jedie/PyLucid@11eb664 because the fix is not in last release, yet.

commit 31b1c3770d2c09db9dca752f31ceb7b7b166f2cc
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 9 19:36:26 2012 +0200

    Add https://github.com/jedie/django-reversion-compare as new requirements

commit 248980872df093318df3695c8c9c9d00bf707984
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 9 19:27:37 2012 +0200

    Update pylucid-boot.py

commit dc875fbba18de760afafab9e75d3073985ceec48
Author: JensDiemer <git@jensdiemer.de>
Date:   Wed May 9 19:27:24 2012 +0200

    the v1.4.x branch exist in repro

commit 5f86544ef2720fe4f9279a4d577d8da0b656c03d
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon May 7 11:12:06 2012 +0200

    use STATICFILES_FINDERS from django-compressor, too.

commit 11eb6640e7a5af01f2c1d8a4df5710de9b1211cf
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon May 7 11:11:21 2012 +0200

    fixed with jazzband/django-dbtemplates@f3fc408

commit 46075116351be00a842734212d7504663672dc68
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon May 7 09:34:46 2012 +0200

    Add django-compressor into requirements file

commit bb5e3597722db23459bfdd4f314f1ddbea86dce5
Merge: 79881eb 39a4e04
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon May 7 09:34:19 2012 +0200

    Merge remote-tracking branch 'origin/django_compressor' into django1.4

    Conflicts:
    	pylucid_project/apps/pylucid/app_settings.py
    	pylucid_project/apps/pylucid/models/editable_headfile.py
    	pylucid_project/pylucid_plugins/admin_menu/templates/admin_menu/includes/superfish_extrahead.html
    	pylucid_project/pylucid_plugins/auth/templates/auth/sha_form.html
    	pylucid_project/settings.py

commit 79881eb706a977164c5ea97d030dfb9e6b7fe346
Merge: 5b3182b d3527a0
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon May 7 08:57:36 2012 +0200

    Merge branch 'master' of github.com:jedie/PyLucid into django1.4

commit 5b3182bef933517aa02a7f9765f2d1e880662f4e
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 3 21:47:17 2012 +0200

    django-tools min v0.23 needed.

commit a7a0fdebb9c14c17f4ee4e1b670e8ace7e7e7d06
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 3 21:42:14 2012 +0200

    allways use DynamicSiteMiddleware

commit 68c0f84371efe56e428ffb117de58f65de5acd1b
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 3 21:42:02 2012 +0200

    Temp. work-a-round for jazzband/django-dbtemplates#31

commit c7736a14671054b4743f823268f1adae9d39d030
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 3 21:34:37 2012 +0200

    needed work-a-round

commit faebac6f8bdd7a4d8488ac086368b7b6c48d03f0
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 3 20:56:57 2012 +0200

    The old "1.4.X" branch does not longer exists. Master is now v1.4.x

commit 11df8593fcebdef36517e5e284db3ea8b37c517f
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 3 20:56:04 2012 +0200

    add shebang

commit 39a4e04090218a2d7f519441db14b11da57a2361
Merge: 7511e07 d3527a0
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 3 16:56:34 2012 +0200

    Merge branch 'master' into django_compressor

    Conflicts:
    	pylucid_project/apps/pylucid/__init__.py
    	pylucid_project/apps/pylucid/defaulttags/__init__.py
    	pylucid_project/apps/pylucid/templates/admin/base_site.html
    	pylucid_project/apps/pylucid_admin/tests.py
    	pylucid_project/media/PyLucid/pylucid_js_tools.js
    	pylucid_project/pylucid_plugins/tools/templates/tools/highlight_code.html
    	pylucid_project/settings.py

commit ab6b93780c01cc5bc5c0fec94fd297492f069677
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 3 16:11:46 2012 +0200

    Update bootstrap script

commit 4e324733a16073db3a3254caff127f0f745d42ff
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 3 10:41:34 2012 +0200

    Use new ClientCookieStorage, @ensure_csrf_cookie in comments and update unittests

commit 9ddf3e9669051e3d3fd24f90a89a551d52a47cc2
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 17:12:00 2012 +0200

    Add a pformat method, usefull for debugging.

commit 7ea572b46952013d2a755215aadb9b466e912725
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 17:10:53 2012 +0200

    change because of new handler: https://docs.djangoproject.com/en/1.4/topics/http/views/#the-403-http-forbidden-view

commit bcb30013d67de1a02836def812d64719dd106414
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 16:46:24 2012 +0200

    unittest update for jedie/PyLucid@b814689

commit e183069d22debd530631263802ae0f227a9a53a1
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 15:18:43 2012 +0200

    Bugfix for unittests

commit a88634e8aa1d46fc60c46e2f2f50ede3ba3586f6
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 15:04:27 2012 +0200

    verify if language changed.

commit 48283bd4554541a4654e9fa919c0d3a4275b10c5
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 12:34:30 2012 +0200

    Bugfix for IndexError: list index out of range, because of wrong syntax :(

commit 89d35b672866fecaf02f41b6359fdd3fe70ba79a
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 12:32:42 2012 +0200

    redirect to "Blog-summary" url, if it's not the right url. e.g.: request with wrong permalink: /en/blog/XXX/foobar-slug/ where XXX is not a number, so url re doesn't match.

commit b814689310d3637f219540e57749dc608161b3d2
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 12:31:51 2012 +0200

    Set http robots ==> "noindex,follow" on blog summary

commit 962845ae820e21bfb8d9896840327d384448b874
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 11:19:27 2012 +0200

    use get_by_prefered_language() method from BaseModelManager. (Needs more tests!)

commit 12b1d686fd9005be695aa5fcd072bb48e60778d9
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 10:27:14 2012 +0200

    create more error messages

commit 1e6ecc0e855ac7c44bc0069eb83c8d3d931bfd77
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 10:27:01 2012 +0200

    use new database settings in base_check()

commit 9a61cc4c24f12e0daf6d3729a8450f4ef6358adb
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 10:26:42 2012 +0200

    Use new StaticPathModelField from django-tools

commit 1236b83dbfefdc7e524f6a8464bfb92733c31405
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 10:26:19 2012 +0200

    use new django-tools version

commit 452cab5b09958fd07b9cd450e706063a58cc5301
Author: JensDiemer <git@jensdiemer.de>
Date:   Tue Apr 24 09:53:44 2012 +0200

    rename /media/ to /static/

commit 8933849a913fad45e8b25649e077b54ac373e30e
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 17:33:43 2012 +0200

    rename media -> static

commit eacdc359d3a9b02f0eb6f1b47ec6921e857f0b79
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 17:25:26 2012 +0200

    migrate dbtemplate content

commit 9cafc1f9198e2c8ea3aaf85e3e04bdbde3b859bf
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 17:17:24 2012 +0200

    changes to use django staticfiles app

commit 78ee65bb93630a4f611ad54df0c1a0d7e0c6b342
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 14:14:22 2012 +0200

    move pylucid to the begining of the update list

commit e53680c2ec6b2fcf84025d56235a6f5e0b60ee63
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 14:13:55 2012 +0200

    bugfix if spaces in number

commit 2ec0895d6546b5cc172546d095ee2e0d41cda55c
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 14:08:11 2012 +0200

    no dependencies in django-processinfo, too.

commit e472b8980bdd51f59b4f2c245d7d7714cf4e5574
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 13:20:09 2012 +0200

    update other packages, too.

commit 88d6617fdd529a0f4750de81c620d68d73867efa
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 13:15:12 2012 +0200

    use the django 1.4 branch

commit f3151c242add4c5ee856d6853ba36681fab13dea
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 13:07:18 2012 +0200

    change django version

commit 2e1d99edbb40982bf3a11f04456793a86fa4ff68
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 12:45:55 2012 +0200

    commit: use --no-dependencies only for pylucid

commit fa2e80dfbf0c6841629721d221302125d2430c06
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon Apr 23 12:42:02 2012 +0200

    update to new dbtemplates version

commit 7511e07c14beb54da69e60bb3e700e6a6d68a0ae
Merge: 61d110e fcfc280
Author: jens <jens@Athlon4600.(none)>
Date:   Fri Jul 1 21:40:25 2011 +0200

    merge origin/master

commit 61d110eb28d7e264959a7deb3ae7a56cfbec75a4
Merge: 74961bc dc64f1c
Author: jens <jens@Athlon4600.(none)>
Date:   Wed Jun 22 22:35:03 2011 +0200

    merge master: rename .pydevproject file

commit 74961bc0d968e0948991170ac6a56601cd5596bc
Merge: 774a831 71a0156
Author: jens <jens@Athlon4600.(none)>
Date:   Wed Jun 22 21:44:16 2011 +0200

    merge master to django_compressor branch

commit 774a831aaa67b65dde9349aa60c44775cfcc047c
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu Jun 9 09:03:14 2011 +0200

    Updates to support new and old Creole API.

commit e4c73c7004e345490330499a4fe571fc932fd2bc
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon May 30 15:55:38 2011 +0200

    * Better work-a-round for \"Traceback\" in Pygments CSS Problem
    * remove some obsolete code around headfiles
    * update one unittests for django-compressor changes

commit e12f9b3cbbede1d1d55c89aff9b63f19a7c6f64d
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon May 30 15:07:30 2011 +0200

    bugfix in JS code

commit f03b2b454a5c4fac87f6299ebef31ca29573d7a6
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon May 30 15:07:03 2011 +0200

    add a exception if pygments CSS code is not inline the page (django-compressor is off)

commit f5fdcad7b21e5a85d0183b9b0aca51e54124c08d
Author: JensDiemer <git@jensdiemer.de>
Date:   Mon May 30 15:06:17 2011 +0200

    update django.forms.util.flatatt() Monkeypatch and add a unittest for this

commit 539a11c81282a8c9c112e6cd829ef429cbb26a3d
Author: jens <jens@Athlon4600.(none)>
Date:   Wed May 25 08:48:31 2011 +0200

    * use compress in auth css/js
    * fix some javascript errors, but it seems there are some others left...

commit eb155febb21ee1c4b01499942b34452a3d8de671
Author: jens <jens@Athlon4600.(none)>
Date:   Wed May 25 08:47:44 2011 +0200

    update unittest

commit a83fcf6b5acac4cc2a1ab5e320dfc545e386f004
Author: jens <jens@Athlon4600.(none)>
Date:   Fri May 20 22:48:02 2011 +0200

    * add a \"clean django cache\" function in tools
    * remove obsolete \"pygments include code\", because pygments is allways included in django admin page

commit c8495261b2f2a222e06887882fafe212119a38d1
Author: jens <jens@Athlon4600.(none)>
Date:   Fri May 20 22:46:18 2011 +0200

    * make colorscheme headfiles includeable
    * better error handling with new lucidTag headfile

commit cdc291292ced5c3ebf0b5204123bcead84604bfd
Author: jens <jens@Athlon4600.(none)>
Date:   Fri May 20 22:44:48 2011 +0200

    * integrate django-compressor - part two ;)
    * remove obsolete code around old headfile cache
    * don't activate django-compressor by deafult (user should do this in this locale_settings.py)

commit 4d2d65d46af9e81f9c98e7a49d743a788645fd6f
Author: JensDiemer <git@jensdiemer.de>
Date:   Thu May 19 18:35:35 2011 +0200

    start including django-compressor
  • Loading branch information
jedie committed Jun 2, 2012
1 parent 4e827ca commit 12b8a81
Show file tree
Hide file tree
Showing 4 changed files with 613 additions and 205 deletions.
330 changes: 330 additions & 0 deletions static/PyLucid/auth/sha.js
@@ -0,0 +1,330 @@
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
* in FIPS 180-1
* Version 2.2 Copyright Paul Johnston 2000 - 2009.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for details.
*/

/*
* Configurable variables. You may need to tweak these to be compatible with
* the server-side, but the defaults work in most cases.
*/
var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */

/*
* These are the functions you'll usually want to call
* They take string arguments and return either hex or base-64 encoded strings
*/
function hex_sha1(s) { return rstr2hex(rstr_sha1(str2rstr_utf8(s))); }
function b64_sha1(s) { return rstr2b64(rstr_sha1(str2rstr_utf8(s))); }
function any_sha1(s, e) { return rstr2any(rstr_sha1(str2rstr_utf8(s)), e); }
function hex_hmac_sha1(k, d)
{ return rstr2hex(rstr_hmac_sha1(str2rstr_utf8(k), str2rstr_utf8(d))); }
function b64_hmac_sha1(k, d)
{ return rstr2b64(rstr_hmac_sha1(str2rstr_utf8(k), str2rstr_utf8(d))); }
function any_hmac_sha1(k, d, e)
{ return rstr2any(rstr_hmac_sha1(str2rstr_utf8(k), str2rstr_utf8(d)), e); }

/*
* Perform a simple self-test to see if the VM is working
*/
function sha1_vm_test()
{
return hex_sha1("abc").toLowerCase() == "a9993e364706816aba3e25717850c26c9cd0d89d";
}

/*
* Calculate the SHA1 of a raw string
*/
function rstr_sha1(s)
{
return binb2rstr(binb_sha1(rstr2binb(s), s.length * 8));
}

/*
* Calculate the HMAC-SHA1 of a key and some data (raw strings)
*/
function rstr_hmac_sha1(key, data)
{
var bkey = rstr2binb(key);
if(bkey.length > 16) bkey = binb_sha1(bkey, key.length * 8);

var ipad = Array(16), opad = Array(16);
for(var i = 0; i < 16; i++)
{
ipad[i] = bkey[i] ^ 0x36363636;
opad[i] = bkey[i] ^ 0x5C5C5C5C;
}

var hash = binb_sha1(ipad.concat(rstr2binb(data)), 512 + data.length * 8);
return binb2rstr(binb_sha1(opad.concat(hash), 512 + 160));
}

/*
* Convert a raw string to a hex string
*/
function rstr2hex(input)
{
try { hexcase } catch(e) { hexcase=0; }
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
var output = "";
var x;
for(var i = 0; i < input.length; i++)
{
x = input.charCodeAt(i);
output += hex_tab.charAt((x >>> 4) & 0x0F)
+ hex_tab.charAt( x & 0x0F);
}
return output;
}

/*
* Convert a raw string to a base-64 string
*/
function rstr2b64(input)
{
try { b64pad } catch(e) { b64pad=''; }
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var output = "";
var len = input.length;
for(var i = 0; i < len; i += 3)
{
var triplet = (input.charCodeAt(i) << 16)
| (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
| (i + 2 < len ? input.charCodeAt(i+2) : 0);
for(var j = 0; j < 4; j++)
{
if(i * 8 + j * 6 > input.length * 8) output += b64pad;
else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);
}
}
return output;
}

/*
* Convert a raw string to an arbitrary string encoding
*/
function rstr2any(input, encoding)
{
var divisor = encoding.length;
var remainders = Array();
var i, q, x, quotient;

/* Convert to an array of 16-bit big-endian values, forming the dividend */
var dividend = Array(Math.ceil(input.length / 2));
for(i = 0; i < dividend.length; i++)
{
dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);
}

/*
* Repeatedly perform a long division. The binary array forms the dividend,
* the length of the encoding is the divisor. Once computed, the quotient
* forms the dividend for the next step. We stop when the dividend is zero.
* All remainders are stored for later use.
*/
while(dividend.length > 0)
{
quotient = Array();
x = 0;
for(i = 0; i < dividend.length; i++)
{
x = (x << 16) + dividend[i];
q = Math.floor(x / divisor);
x -= q * divisor;
if(quotient.length > 0 || q > 0)
quotient[quotient.length] = q;
}
remainders[remainders.length] = x;
dividend = quotient;
}

/* Convert the remainders to the output string */
var output = "";
for(i = remainders.length - 1; i >= 0; i--)
output += encoding.charAt(remainders[i]);

/* Append leading zero equivalents */
var full_length = Math.ceil(input.length * 8 /
(Math.log(encoding.length) / Math.log(2)))
for(i = output.length; i < full_length; i++)
output = encoding[0] + output;

return output;
}

/*
* Encode a string as utf-8.
* For efficiency, this assumes the input is valid utf-16.
*/
function str2rstr_utf8(input)
{
var output = "";
var i = -1;
var x, y;

while(++i < input.length)
{
/* Decode utf-16 surrogate pairs */
x = input.charCodeAt(i);
y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;
if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF)
{
x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
i++;
}

/* Encode output as utf-8 */
if(x <= 0x7F)
output += String.fromCharCode(x);
else if(x <= 0x7FF)
output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
0x80 | ( x & 0x3F));
else if(x <= 0xFFFF)
output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));
else if(x <= 0x1FFFFF)
output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
0x80 | ((x >>> 12) & 0x3F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));
}
return output;
}

/*
* Encode a string as utf-16
*/
function str2rstr_utf16le(input)
{
var output = "";
for(var i = 0; i < input.length; i++)
output += String.fromCharCode( input.charCodeAt(i) & 0xFF,
(input.charCodeAt(i) >>> 8) & 0xFF);
return output;
}

function str2rstr_utf16be(input)
{
var output = "";
for(var i = 0; i < input.length; i++)
output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF,
input.charCodeAt(i) & 0xFF);
return output;
}

/*
* Convert a raw string to an array of big-endian words
* Characters >255 have their high-byte silently ignored.
*/
function rstr2binb(input)
{
var output = Array(input.length >> 2);
for(var i = 0; i < output.length; i++)
output[i] = 0;
for(var i = 0; i < input.length * 8; i += 8)
output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);
return output;
}

/*
* Convert an array of big-endian words to a string
*/
function binb2rstr(input)
{
var output = "";
for(var i = 0; i < input.length * 32; i += 8)
output += String.fromCharCode((input[i>>5] >>> (24 - i % 32)) & 0xFF);
return output;
}

/*
* Calculate the SHA-1 of an array of big-endian words, and a bit length
*/
function binb_sha1(x, len)
{
/* append padding */
x[len >> 5] |= 0x80 << (24 - len % 32);
x[((len + 64 >> 9) << 4) + 15] = len;

var w = Array(80);
var a = 1732584193;
var b = -271733879;
var c = -1732584194;
var d = 271733878;
var e = -1009589776;

for(var i = 0; i < x.length; i += 16)
{
var olda = a;
var oldb = b;
var oldc = c;
var oldd = d;
var olde = e;

for(var j = 0; j < 80; j++)
{
if(j < 16) w[j] = x[i + j];
else w[j] = bit_rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
var t = safe_add(safe_add(bit_rol(a, 5), sha1_ft(j, b, c, d)),
safe_add(safe_add(e, w[j]), sha1_kt(j)));
e = d;
d = c;
c = bit_rol(b, 30);
b = a;
a = t;
}

a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd);
e = safe_add(e, olde);
}
return Array(a, b, c, d, e);

}

/*
* Perform the appropriate triplet combination function for the current
* iteration
*/
function sha1_ft(t, b, c, d)
{
if(t < 20) return (b & c) | ((~b) & d);
if(t < 40) return b ^ c ^ d;
if(t < 60) return (b & c) | (b & d) | (c & d);
return b ^ c ^ d;
}

/*
* Determine the appropriate additive constant for the current iteration
*/
function sha1_kt(t)
{
return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :
(t < 60) ? -1894007588 : -899497514;
}

/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add(x, y)
{
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return (msw << 16) | (lsw & 0xFFFF);
}

/*
* Bitwise rotate a 32-bit number to the left.
*/
function bit_rol(num, cnt)
{
return (num << cnt) | (num >>> (32 - cnt));
}

0 comments on commit 12b8a81

Please sign in to comment.