Browse Source

HUE-3287 [core] Django 1.11 upgrade
- Upgrading django extensions 1.8.0 module from 1.5.0

Prakash Ranade 8 years ago
parent
commit
6dd3303c40
100 changed files with 0 additions and 6518 deletions
  1. 0 3
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/conf/app_template/forms.py.tmpl
  2. 0 6
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/conf/app_template/urls.py.tmpl
  3. 0 7
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/conf/command_template/management/commands/sample.py.tmpl
  4. 0 390
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/db/fields/__init__.py
  5. 0 16
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/future_1_5.py
  6. 0 16
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/clear_cache.py
  7. 0 74
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/create_command.py
  8. 0 14
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/generate_secret_key.py
  9. 0 151
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/graph_models.py
  10. 0 307
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/runserver_plus.py
  11. 0 291
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/shell_plus.py
  12. 0 176
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/show_urls.py
  13. 0 41
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/update_permissions.py
  14. 0 73
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/validate_templates.py
  15. 0 301
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/modelviz.py
  16. 0 17
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/migrations/0001_empty.py
  17. 0 1
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/static/django_extensions/js/jquery-1.7.2.min.js
  18. 0 10
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/static/django_extensions/js/jquery.bgiframe.min.js
  19. 0 26
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/__init__.py
  20. 0 258
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/encrypted_fields.py
  21. 0 159
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/fields.py
  22. 0 17
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/json_field.py
  23. 0 10
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/management/commands/error_raising_command.py
  24. 0 107
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/management_command.py
  25. 0 39
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/shortuuid_field.py
  26. 0 61
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_clean_pyc.py
  27. 0 51
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_compile_pyc.py
  28. 0 86
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_dumpscript.py
  29. 0 42
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_models.py
  30. 0 15
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_templatetags.py
  31. 0 0
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/testapp/__init__.py
  32. 0 125
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/testapp/models.py
  33. 0 0
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/testapp/urls.py
  34. 0 76
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/utils.py
  35. 0 47
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/uuid_field.py
  36. 0 0
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/utils/__init__.py
  37. 0 23
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/utils/text.py
  38. 0 91
      desktop/core/ext-py/django-extensions-1.5.0/django_extensions/utils/validatingtemplatetags.py
  39. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/admin_extensions.doctree
  40. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/command_extension_ideas.doctree
  41. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/command_extensions.doctree
  42. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/create_app.doctree
  43. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/dumpscript.doctree
  44. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/environment.pickle
  45. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/export_emails.doctree
  46. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/field_extensions.doctree
  47. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/graph_models.doctree
  48. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/index.doctree
  49. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/installation_instructions.doctree
  50. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/jobs_scheduling.doctree
  51. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/model_extensions.doctree
  52. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/namespace_proposal.doctree
  53. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/print_settings.doctree
  54. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/runprofileserver.doctree
  55. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/runscript.doctree
  56. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/runserver_plus.doctree
  57. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/shell_plus.doctree
  58. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/sqlcreate.doctree
  59. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/sqldiff.doctree
  60. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/sync_s3.doctree
  61. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/validate_templates.doctree
  62. 0 4
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/.buildinfo
  63. 0 53
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/admin_extensions.txt
  64. 0 7
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/command_extension_ideas.txt
  65. 0 104
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/command_extensions.txt
  66. 0 41
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/create_app.txt
  67. 0 99
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/dumpscript.txt
  68. 0 81
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/export_emails.txt
  69. 0 37
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/field_extensions.txt
  70. 0 110
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/graph_models.txt
  71. 0 81
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/index.txt
  72. 0 100
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/installation_instructions.txt
  73. 0 49
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/jobs_scheduling.txt
  74. 0 11
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/model_extensions.txt
  75. 0 29
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/namespace_proposal.txt
  76. 0 60
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/print_settings.txt
  77. 0 86
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/runprofileserver.txt
  78. 0 88
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/runscript.txt
  79. 0 152
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/runserver_plus.txt
  80. 0 126
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/shell_plus.txt
  81. 0 45
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/sqlcreate.txt
  82. 0 44
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/sqldiff.txt
  83. 0 70
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/sync_s3.txt
  84. 0 38
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/validate_templates.txt
  85. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/ajax-loader.gif
  86. 0 537
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/basic.css
  87. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/comment-bright.png
  88. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/comment-close.png
  89. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/comment.png
  90. 0 256
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/default.css
  91. 0 238
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/doctools.js
  92. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/down-pressed.png
  93. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/down.png
  94. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/file.png
  95. 0 1
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/jquery.js
  96. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/minus.png
  97. BIN
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/plus.png
  98. 0 63
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/pygments.css
  99. 0 622
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/searchtools.js
  100. 0 159
      desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/sidebar.js

+ 0 - 3
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/conf/app_template/forms.py.tmpl

@@ -1,3 +0,0 @@
-from django import forms
-
-# place form definition here

+ 0 - 6
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/conf/app_template/urls.py.tmpl

@@ -1,6 +0,0 @@
-try:
-    from django.conf.urls import *
-except ImportError:  # django < 1.4
-    from django.conf.urls.defaults import *
-
-# place app url patterns here

+ 0 - 7
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/conf/command_template/management/commands/sample.py.tmpl

@@ -1,7 +0,0 @@
-from django.core.management.base import {{ base_command }}
-
-class Command({{ base_command }}):
-    help = "My shiny new management command."
-
-    def {{ handle_method }}:
-        raise NotImplementedError()

+ 0 - 390
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/db/fields/__init__.py

@@ -1,390 +0,0 @@
-"""
-Django Extensions additional model fields
-"""
-import re
-import six
-import warnings
-
-try:
-    import uuid
-    HAS_UUID = True
-except ImportError:
-    HAS_UUID = False
-
-try:
-    import shortuuid
-    HAS_SHORT_UUID = True
-except ImportError:
-    HAS_SHORT_UUID = False
-
-from django.core.exceptions import ImproperlyConfigured
-from django.template.defaultfilters import slugify
-from django.db.models import DateTimeField, CharField, SlugField
-
-try:
-    from django.utils.timezone import now as datetime_now
-    assert datetime_now
-except ImportError:
-    import datetime
-    datetime_now = datetime.datetime.now
-
-try:
-    from django.utils.encoding import force_unicode  # NOQA
-except ImportError:
-    from django.utils.encoding import force_text as force_unicode  # NOQA
-
-
-class AutoSlugField(SlugField):
-    """ AutoSlugField
-
-    By default, sets editable=False, blank=True.
-
-    Required arguments:
-
-    populate_from
-        Specifies which field or list of fields the slug is populated from.
-
-    Optional arguments:
-
-    separator
-        Defines the used separator (default: '-')
-
-    overwrite
-        If set to True, overwrites the slug on every save (default: False)
-
-    Inspired by SmileyChris' Unique Slugify snippet:
-    http://www.djangosnippets.org/snippets/690/
-    """
-    def __init__(self, *args, **kwargs):
-        kwargs.setdefault('blank', True)
-        kwargs.setdefault('editable', False)
-
-        populate_from = kwargs.pop('populate_from', None)
-        if populate_from is None:
-            raise ValueError("missing 'populate_from' argument")
-        else:
-            self._populate_from = populate_from
-
-        self.slugify_function = kwargs.pop('slugify_function', slugify)
-        self.separator = kwargs.pop('separator', six.u('-'))
-        self.overwrite = kwargs.pop('overwrite', False)
-        if not isinstance(self.overwrite, bool):
-            raise ValueError("'overwrite' argument must be True or False")
-        self.allow_duplicates = kwargs.pop('allow_duplicates', False)
-        if not isinstance(self.allow_duplicates, bool):
-            raise ValueError("'allow_duplicates' argument must be True or False")
-        super(AutoSlugField, self).__init__(*args, **kwargs)
-
-    def _slug_strip(self, value):
-        """
-        Cleans up a slug by removing slug separator characters that occur at
-        the beginning or end of a slug.
-
-        If an alternate separator is used, it will also replace any instances
-        of the default '-' separator with the new separator.
-        """
-        re_sep = '(?:-|%s)' % re.escape(self.separator)
-        value = re.sub('%s+' % re_sep, self.separator, value)
-        return re.sub(r'^%s+|%s+$' % (re_sep, re_sep), '', value)
-
-    def get_queryset(self, model_cls, slug_field):
-        for field, model in model_cls._meta.get_fields_with_model():
-            if model and field == slug_field:
-                return model._default_manager.all()
-        return model_cls._default_manager.all()
-
-    def slugify_func(self, content):
-        if content:
-            return self.slugify_function(content)
-        return ''
-
-    def create_slug(self, model_instance, add):
-        # get fields to populate from and slug field to set
-        if not isinstance(self._populate_from, (list, tuple)):
-            self._populate_from = (self._populate_from, )
-        slug_field = model_instance._meta.get_field(self.attname)
-
-        if add or self.overwrite:
-            # slugify the original field content and set next step to 2
-            slug_for_field = lambda field: self.slugify_func(getattr(model_instance, field))
-            slug = self.separator.join(map(slug_for_field, self._populate_from))
-            next = 2
-        else:
-            # get slug from the current model instance
-            slug = getattr(model_instance, self.attname)
-            # model_instance is being modified, and overwrite is False,
-            # so instead of doing anything, just return the current slug
-            return slug
-
-        # strip slug depending on max_length attribute of the slug field
-        # and clean-up
-        slug_len = slug_field.max_length
-        if slug_len:
-            slug = slug[:slug_len]
-        slug = self._slug_strip(slug)
-        original_slug = slug
-
-        if self.allow_duplicates:
-            return slug
-
-        # exclude the current model instance from the queryset used in finding
-        # the next valid slug
-        queryset = self.get_queryset(model_instance.__class__, slug_field)
-        if model_instance.pk:
-            queryset = queryset.exclude(pk=model_instance.pk)
-
-        # form a kwarg dict used to impliment any unique_together contraints
-        kwargs = {}
-        for params in model_instance._meta.unique_together:
-            if self.attname in params:
-                for param in params:
-                    kwargs[param] = getattr(model_instance, param, None)
-        kwargs[self.attname] = slug
-
-        # increases the number while searching for the next valid slug
-        # depending on the given slug, clean-up
-        while not slug or queryset.filter(**kwargs):
-            slug = original_slug
-            end = '%s%s' % (self.separator, next)
-            end_len = len(end)
-            if slug_len and len(slug) + end_len > slug_len:
-                slug = slug[:slug_len - end_len]
-                slug = self._slug_strip(slug)
-            slug = '%s%s' % (slug, end)
-            kwargs[self.attname] = slug
-            next += 1
-        return slug
-
-    def pre_save(self, model_instance, add):
-        value = force_unicode(self.create_slug(model_instance, add))
-        setattr(model_instance, self.attname, value)
-        return value
-
-    def get_internal_type(self):
-        return "SlugField"
-
-    def south_field_triple(self):
-        "Returns a suitable description of this field for South."
-        # We'll just introspect the _actual_ field.
-        from south.modelsinspector import introspector
-        field_class = '%s.AutoSlugField' % self.__module__
-        args, kwargs = introspector(self)
-        kwargs.update({
-            'populate_from': repr(self._populate_from),
-            'separator': repr(self.separator),
-            'overwrite': repr(self.overwrite),
-            'allow_duplicates': repr(self.allow_duplicates),
-        })
-        # That's our definition!
-        return (field_class, args, kwargs)
-
-    def deconstruct(self):
-        name, path, args, kwargs = super(AutoSlugField, self).deconstruct()
-        kwargs['populate_from'] = self._populate_from
-        if not self.separator == six.u('-'):
-            kwargs['separator'] = self.separator
-        if self.overwrite is not False:
-            kwargs['overwrite'] = True
-        if self.allow_duplicates is not False:
-            kwargs['allow_duplicates'] = True
-        return name, path, args, kwargs
-
-
-class CreationDateTimeField(DateTimeField):
-    """ CreationDateTimeField
-
-    By default, sets editable=False, blank=True, default=datetime.now
-    """
-
-    def __init__(self, *args, **kwargs):
-        kwargs.setdefault('editable', False)
-        kwargs.setdefault('blank', True)
-        kwargs.setdefault('default', datetime_now)
-        DateTimeField.__init__(self, *args, **kwargs)
-
-    def get_internal_type(self):
-        return "DateTimeField"
-
-    def south_field_triple(self):
-        "Returns a suitable description of this field for South."
-        # We'll just introspect ourselves, since we inherit.
-        from south.modelsinspector import introspector
-        field_class = "django.db.models.fields.DateTimeField"
-        args, kwargs = introspector(self)
-        return (field_class, args, kwargs)
-
-    def deconstruct(self):
-        name, path, args, kwargs = super(CreationDateTimeField, self).deconstruct()
-        if self.editable is not False:
-            kwargs['editable'] = True
-        if self.blank is not True:
-            kwargs['blank'] = False
-        if self.default is not datetime_now:
-            kwargs['default'] = self.default
-        return name, path, args, kwargs
-
-
-class ModificationDateTimeField(CreationDateTimeField):
-    """ ModificationDateTimeField
-
-    By default, sets editable=False, blank=True, default=datetime.now
-
-    Sets value to datetime.now() on each save of the model.
-    """
-
-    def pre_save(self, model, add):
-        value = datetime_now()
-        setattr(model, self.attname, value)
-        return value
-
-    def get_internal_type(self):
-        return "DateTimeField"
-
-    def south_field_triple(self):
-        "Returns a suitable description of this field for South."
-        # We'll just introspect ourselves, since we inherit.
-        from south.modelsinspector import introspector
-        field_class = "django.db.models.fields.DateTimeField"
-        args, kwargs = introspector(self)
-        return (field_class, args, kwargs)
-
-
-class UUIDVersionError(Exception):
-    pass
-
-
-class UUIDField(CharField):
-    """ UUIDField
-
-    By default uses UUID version 4 (randomly generated UUID).
-
-    The field support all uuid versions which are natively supported by the uuid python module, except version 2.
-    For more information see: http://docs.python.org/lib/module-uuid.html
-    """
-    DEFAULT_MAX_LENGTH = 36
-
-    def __init__(self, verbose_name=None, name=None, auto=True, version=4, node=None, clock_seq=None, namespace=None, uuid_name=None, *args, **kwargs):
-        warnings.warn("Django 1.8 features a native UUIDField, this UUIDField will be removed after Django 1.7 becomes unsupported.", DeprecationWarning)
-
-        if not HAS_UUID:
-            raise ImproperlyConfigured("'uuid' module is required for UUIDField. (Do you have Python 2.5 or higher installed ?)")
-        kwargs.setdefault('max_length', self.DEFAULT_MAX_LENGTH)
-        if auto:
-            self.empty_strings_allowed = False
-            kwargs['blank'] = True
-            kwargs.setdefault('editable', False)
-        self.auto = auto
-        self.version = version
-        self.node = node
-        self.clock_seq = clock_seq
-        self.namespace = namespace
-        self.uuid_name = uuid_name or name
-        super(UUIDField, self).__init__(verbose_name=verbose_name, *args, **kwargs)
-
-    def create_uuid(self):
-        if not self.version or self.version == 4:
-            return uuid.uuid4()
-        elif self.version == 1:
-            return uuid.uuid1(self.node, self.clock_seq)
-        elif self.version == 2:
-            raise UUIDVersionError("UUID version 2 is not supported.")
-        elif self.version == 3:
-            return uuid.uuid3(self.namespace, self.uuid_name)
-        elif self.version == 5:
-            return uuid.uuid5(self.namespace, self.uuid_name)
-        else:
-            raise UUIDVersionError("UUID version %s is not valid." % self.version)
-
-    def pre_save(self, model_instance, add):
-        value = super(UUIDField, self).pre_save(model_instance, add)
-        if self.auto and add and value is None:
-            value = force_unicode(self.create_uuid())
-            setattr(model_instance, self.attname, value)
-            return value
-        else:
-            if self.auto and not value:
-                value = force_unicode(self.create_uuid())
-                setattr(model_instance, self.attname, value)
-        return value
-
-    def formfield(self, **kwargs):
-        if self.auto:
-            return None
-        return super(UUIDField, self).formfield(**kwargs)
-
-    def south_field_triple(self):
-        "Returns a suitable description of this field for South."
-        # We'll just introspect the _actual_ field.
-        from south.modelsinspector import introspector
-        field_class = "django.db.models.fields.CharField"
-        args, kwargs = introspector(self)
-        # That's our definition!
-        return (field_class, args, kwargs)
-
-    def deconstruct(self):
-        name, path, args, kwargs = super(UUIDField, self).deconstruct()
-        if kwargs.get('max_length', None) == self.DEFAULT_MAX_LENGTH:
-            del kwargs['max_length']
-        if self.auto is not True:
-            kwargs['auto'] = self.auto
-        if self.version != 4:
-            kwargs['version'] = self.version
-        if self.node is not None:
-            kwargs['node'] = self.node
-        if self.clock_seq is not None:
-            kwargs['clock_seq'] = self.clock_seq
-        if self.namespace is not None:
-            kwargs['namespace'] = self.namespace
-        if self.uuid_name is not None:
-            kwargs['uuid_name'] = self.name
-        return name, path, args, kwargs
-
-
-class PostgreSQLUUIDField(UUIDField):
-    def __init__(self, *args, **kwargs):
-        warnings.warn("Django 1.8 features a native UUIDField, this UUIDField will be removed after Django 1.7 becomes unsupported.", DeprecationWarning)
-        super(PostgreSQLUUIDField, self).__init__(*args, **kwargs)
-
-    def db_type(self, connection=None):
-        return "UUID"
-
-    def get_db_prep_value(self, value, connection, prepared=False):
-        if isinstance(value, six.integer_types):
-            value = uuid.UUID(int=value)
-        elif isinstance(value, (six.string_types, six.binary_type)):
-            if len(value) == 16:
-                value = uuid.UUID(bytes=value)
-            else:
-                value = uuid.UUID(value)
-        return super(PostgreSQLUUIDField, self).get_db_prep_value(
-            value, connection, prepared=False)
-
-
-class ShortUUIDField(UUIDField):
-    """ ShortUUIDFied
-
-    Generates concise (22 characters instead of 36), unambiguous, URL-safe UUIDs.
-
-    Based on `shortuuid`: https://github.com/stochastic-technologies/shortuuid
-    """
-    DEFAULT_MAX_LENGTH = 22
-
-    def __init__(self, *args, **kwargs):
-        super(ShortUUIDField, self).__init__(*args, **kwargs)
-        if not HAS_SHORT_UUID:
-            raise ImproperlyConfigured("'shortuuid' module is required for ShortUUIDField. (Do you have Python 2.5 or higher installed ?)")
-        kwargs.setdefault('max_length', self.DEFAULT_MAX_LENGTH)
-
-    def create_uuid(self):
-        if not self.version or self.version == 4:
-            return shortuuid.uuid()
-        elif self.version == 1:
-            return shortuuid.uuid()
-        elif self.version == 2:
-            raise UUIDVersionError("UUID version 2 is not supported.")
-        elif self.version == 3:
-            raise UUIDVersionError("UUID version 3 is not supported.")
-        elif self.version == 5:
-            return shortuuid.uuid(name=self.namespace)
-        else:
-            raise UUIDVersionError("UUID version %s is not valid." % self.version)

+ 0 - 16
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/future_1_5.py

@@ -1,16 +0,0 @@
-"""
-A forwards compatibility module.
-
-Implements some features of Django 1.5 related to the 'Custom User Model' feature
-when the application is run with a lower version of Django.
-"""
-from __future__ import unicode_literals
-
-from django.contrib.auth.models import User
-
-User.USERNAME_FIELD = "username"
-User.get_username = lambda self: self.username
-
-
-def get_user_model():
-    return User

+ 0 - 16
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/clear_cache.py

@@ -1,16 +0,0 @@
-# -*- coding: utf-8 -*-
-# Author: AxiaCore S.A.S. http://axiacore.com
-from django.core.cache import cache
-from django.core.management.base import BaseCommand
-
-from django_extensions.management.utils import signalcommand
-
-
-class Command(BaseCommand):
-    """A simple management command which clears the site-wide cache."""
-    help = 'Fully clear site-wide cache.'
-
-    @signalcommand
-    def handle(self, *args, **kwargs):
-        cache.clear()
-        self.stdout.write('Cache has been cleared!\n')

+ 0 - 74
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/create_command.py

@@ -1,74 +0,0 @@
-import os
-import sys
-from django.core.management.base import AppCommand
-from django_extensions.management.utils import _make_writeable, signalcommand
-from optparse import make_option
-
-
-class Command(AppCommand):
-    option_list = AppCommand.option_list + (
-        make_option('--name', '-n', action='store', dest='command_name', default='sample',
-                    help='The name to use for the management command'),
-        make_option('--base', '-b', action='store', dest='base_command', default='Base',
-                    help='The base class used for implementation of this command. Should be one of Base, App, Label, or NoArgs'),
-    )
-
-    help = ("Creates a Django management command directory structure for the given app name"
-            " in the app's directory.")
-    args = "[appname]"
-    label = 'application name'
-
-    requires_model_validation = False
-    # Can't import settings during this command, because they haven't
-    # necessarily been created.
-    can_import_settings = True
-
-    @signalcommand
-    def handle_app(self, app, **options):
-        app_dir = os.path.dirname(app.__file__)
-        copy_template('command_template', app_dir, options.get('command_name'), '%sCommand' % options.get('base_command'))
-
-
-def copy_template(template_name, copy_to, command_name, base_command):
-    """copies the specified template directory to the copy_to location"""
-    import django_extensions
-    import shutil
-
-    template_dir = os.path.join(django_extensions.__path__[0], 'conf', template_name)
-
-    handle_method = "handle(self, *args, **options)"
-    if base_command == 'AppCommand':
-        handle_method = "handle_app(self, app, **options)"
-    elif base_command == 'LabelCommand':
-        handle_method = "handle_label(self, label, **options)"
-    elif base_command == 'NoArgsCommand':
-        handle_method = "handle_noargs(self, **options)"
-
-    # walks the template structure and copies it
-    for d, subdirs, files in os.walk(template_dir):
-        relative_dir = d[len(template_dir) + 1:]
-        if relative_dir and not os.path.exists(os.path.join(copy_to, relative_dir)):
-            os.mkdir(os.path.join(copy_to, relative_dir))
-        for i, subdir in enumerate(subdirs):
-            if subdir.startswith('.'):
-                del subdirs[i]
-        for f in files:
-            if f.endswith('.pyc') or f.startswith('.DS_Store'):
-                continue
-            path_old = os.path.join(d, f)
-            path_new = os.path.join(copy_to, relative_dir, f.replace('sample', command_name))
-            if os.path.exists(path_new):
-                path_new = os.path.join(copy_to, relative_dir, f)
-                if os.path.exists(path_new):
-                    continue
-            path_new = path_new.rstrip(".tmpl")
-            fp_old = open(path_old, 'r')
-            fp_new = open(path_new, 'w')
-            fp_new.write(fp_old.read().replace('{{ command_name }}', command_name).replace('{{ base_command }}', base_command).replace('{{ handle_method }}', handle_method))
-            fp_old.close()
-            fp_new.close()
-            try:
-                shutil.copymode(path_old, path_new)
-                _make_writeable(path_new)
-            except OSError:
-                sys.stderr.write("Notice: Couldn't set permission bits on %s. You're probably using an uncommon filesystem setup. No problem.\n" % path_new)

+ 0 - 14
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/generate_secret_key.py

@@ -1,14 +0,0 @@
-from random import choice
-from django.core.management.base import NoArgsCommand
-
-from django_extensions.management.utils import signalcommand
-
-
-class Command(NoArgsCommand):
-    help = "Generates a new SECRET_KEY that can be used in a project settings file."
-
-    requires_model_validation = False
-
-    @signalcommand
-    def handle_noargs(self, **options):
-        return ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)])

+ 0 - 151
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/graph_models.py

@@ -1,151 +0,0 @@
-import six
-import sys
-from optparse import make_option, NO_DEFAULT
-from django.core.management.base import BaseCommand, CommandError
-from django.conf import settings
-from django_extensions.management.modelviz import generate_dot
-from django_extensions.management.utils import signalcommand
-
-
-try:
-    import pygraphviz
-    HAS_PYGRAPHVIZ = True
-except ImportError:
-    HAS_PYGRAPHVIZ = False
-
-try:
-    import pydot
-    HAS_PYDOT = True
-except ImportError:
-    HAS_PYDOT = False
-
-
-class Command(BaseCommand):
-    graph_models_options = (
-        make_option('--pygraphviz', action='store_true', dest='pygraphviz',
-                    help='Use PyGraphViz to generate the image.'),
-        make_option('--pydot', action='store_true', dest='pydot',
-                    help='Use PyDot to generate the image.'),
-        make_option('--disable-fields', '-d', action='store_true', dest='disable_fields',
-                    help='Do not show the class member fields'),
-        make_option('--group-models', '-g', action='store_true', dest='group_models',
-                    help='Group models together respective to their application'),
-        make_option('--all-applications', '-a', action='store_true', dest='all_applications',
-                    help='Automatically include all applications from INSTALLED_APPS'),
-        make_option('--output', '-o', action='store', dest='outputfile',
-                    help='Render output file. Type of output dependend on file extensions. Use png or jpg to render graph to image.'),
-        make_option('--layout', '-l', action='store', dest='layout', default='dot',
-                    help='Layout to be used by GraphViz for visualization. Layouts: circo dot fdp neato nop nop1 nop2 twopi'),
-        make_option('--verbose-names', '-n', action='store_true', dest='verbose_names',
-                    help='Use verbose_name of models and fields'),
-        make_option('--language', '-L', action='store', dest='language',
-                    help='Specify language used for verbose_name localization'),
-        make_option('--exclude-columns', '-x', action='store', dest='exclude_columns',
-                    help='Exclude specific column(s) from the graph. Can also load exclude list from file.'),
-        make_option('--exclude-models', '-X', action='store', dest='exclude_models',
-                    help='Exclude specific model(s) from the graph. Can also load exclude list from file.'),
-        make_option('--include-models', '-I', action='store', dest='include_models',
-                    help='Restrict the graph to specified models.'),
-        make_option('--inheritance', '-e', action='store_true', dest='inheritance', default=True,
-                    help='Include inheritance arrows (default)'),
-        make_option('--no-inheritance', '-E', action='store_false', dest='inheritance',
-                    help='Do not include inheritance arrows'),
-        make_option('--hide-relations-from-fields', '-R', action='store_false', dest="relations_as_fields",
-                    default=True, help="Do not show relations as fields in the graph."),
-        make_option('--disable-sort-fields', '-S', action="store_false", dest="sort_fields",
-                    default=True, help="Do not sort fields"),
-    )
-    option_list = BaseCommand.option_list + graph_models_options
-
-    help = "Creates a GraphViz dot file for the specified app names.  You can pass multiple app names and they will all be combined into a single model.  Output is usually directed to a dot file."
-    args = "[appname]"
-    label = 'application name'
-
-    can_import_settings = True
-
-    @signalcommand
-    def handle(self, *args, **options):
-        self.options_from_settings(options)
-
-        if len(args) < 1 and not options['all_applications']:
-            raise CommandError("need one or more arguments for appname")
-
-        use_pygraphviz = options.get('pygraphviz', False)
-        use_pydot = options.get('pydot', False)
-        cli_options = ' '.join(sys.argv[2:])
-        dotdata = generate_dot(args, cli_options=cli_options, **options)
-        if not six.PY3:
-            dotdata = dotdata.encode('utf-8')
-        if options['outputfile']:
-            if not use_pygraphviz and not use_pydot:
-                if HAS_PYGRAPHVIZ:
-                    use_pygraphviz = True
-                elif HAS_PYDOT:
-                    use_pydot = True
-            if use_pygraphviz:
-                self.render_output_pygraphviz(dotdata, **options)
-            elif use_pydot:
-                self.render_output_pydot(dotdata, **options)
-            else:
-                raise CommandError("Neither pygraphviz nor pydot could be found to generate the image")
-        else:
-            self.print_output(dotdata)
-
-    def options_from_settings(self, options):
-        defaults = getattr(settings, 'GRAPH_MODELS', None)
-        if defaults:
-            for option in self.graph_models_options:
-                long_opt = option._long_opts[0]
-                if long_opt:
-                    long_opt = long_opt.lstrip("-").replace("-", "_")
-                    if long_opt in defaults:
-                        default_value = None
-                        if not option.default == NO_DEFAULT:
-                            default_value = option.default
-                        if options[option.dest] == default_value:
-                            options[option.dest] = defaults[long_opt]
-
-    def print_output(self, dotdata):
-        if six.PY3 and isinstance(dotdata, six.binary_type):
-            dotdata = dotdata.decode()
-
-        print(dotdata)
-
-    def render_output_pygraphviz(self, dotdata, **kwargs):
-        """Renders the image using pygraphviz"""
-        if not HAS_PYGRAPHVIZ:
-            raise CommandError("You need to install pygraphviz python module")
-
-        version = pygraphviz.__version__.rstrip("-svn")
-        try:
-            if tuple(int(v) for v in version.split('.')) < (0, 36):
-                # HACK around old/broken AGraph before version 0.36 (ubuntu ships with this old version)
-                import tempfile
-                tmpfile = tempfile.NamedTemporaryFile()
-                tmpfile.write(dotdata)
-                tmpfile.seek(0)
-                dotdata = tmpfile.name
-        except ValueError:
-            pass
-
-        graph = pygraphviz.AGraph(dotdata)
-        graph.layout(prog=kwargs['layout'])
-        graph.draw(kwargs['outputfile'])
-
-    def render_output_pydot(self, dotdata, **kwargs):
-        """Renders the image using pydot"""
-        if not HAS_PYDOT:
-            raise CommandError("You need to install pydot python module")
-
-        graph = pydot.graph_from_dot_data(dotdata)
-        if not graph:
-            raise CommandError("pydot returned an error")
-        output_file = kwargs['outputfile']
-        formats = ['bmp', 'canon', 'cmap', 'cmapx', 'cmapx_np', 'dot', 'dia', 'emf',
-                   'em', 'fplus', 'eps', 'fig', 'gd', 'gd2', 'gif', 'gv', 'imap',
-                   'imap_np', 'ismap', 'jpe', 'jpeg', 'jpg', 'metafile', 'pdf',
-                   'pic', 'plain', 'plain-ext', 'png', 'pov', 'ps', 'ps2', 'svg',
-                   'svgz', 'tif', 'tiff', 'tk', 'vml', 'vmlz', 'vrml', 'wbmp', 'xdot']
-        ext = output_file[output_file.rfind('.') + 1:]
-        format = ext if ext in formats else 'raw'
-        graph.write(output_file, format=format)

+ 0 - 307
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/runserver_plus.py

@@ -1,307 +0,0 @@
-import os
-import re
-import socket
-import sys
-import time
-
-from optparse import make_option
-
-from django.conf import settings
-from django.core.management.base import BaseCommand, CommandError
-from django_extensions.management.utils import setup_logger, RedirectHandler,\
-    signalcommand
-from django_extensions.management.technical_response import null_technical_500_response
-
-
-try:
-    if 'django.contrib.staticfiles' in settings.INSTALLED_APPS:
-        from django.contrib.staticfiles.handlers import StaticFilesHandler
-        USE_STATICFILES = True
-    elif 'staticfiles' in settings.INSTALLED_APPS:
-        from staticfiles.handlers import StaticFilesHandler  # noqa
-        USE_STATICFILES = True
-    else:
-        USE_STATICFILES = False
-except ImportError:
-    USE_STATICFILES = False
-
-
-naiveip_re = re.compile(r"""^(?:
-(?P<addr>
-    (?P<ipv4>\d{1,3}(?:\.\d{1,3}){3}) |         # IPv4 address
-    (?P<ipv6>\[[a-fA-F0-9:]+\]) |               # IPv6 address
-    (?P<fqdn>[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*) # FQDN
-):)?(?P<port>\d+)$""", re.X)
-DEFAULT_PORT = "8000"
-
-
-import logging
-logger = logging.getLogger(__name__)
-
-
-class Command(BaseCommand):
-    option_list = BaseCommand.option_list + (
-        make_option('--ipv6', '-6', action='store_true', dest='use_ipv6', default=False,
-                    help='Tells Django to use a IPv6 address.'),
-        make_option('--noreload', action='store_false', dest='use_reloader', default=True,
-                    help='Tells Django to NOT use the auto-reloader.'),
-        make_option('--browser', action='store_true', dest='open_browser',
-                    help='Tells Django to open a browser.'),
-        make_option('--adminmedia', dest='admin_media_path', default='',
-                    help='Specifies the directory from which to serve admin media.'),
-        make_option('--nothreading', action='store_false', dest='threaded',
-                    help='Do not run in multithreaded mode.'),
-        make_option('--threaded', action='store_true', dest='threaded',
-                    help='Run in multithreaded mode.'),
-        make_option('--output', dest='output_file', default=None,
-                    help='Specifies an output file to send a copy of all messages (not flushed immediately).'),
-        make_option('--print-sql', action='store_true', default=False,
-                    help="Print SQL queries as they're executed"),
-        make_option('--cert', dest='cert_path', action="store", type="string",
-                    help='To use SSL, specify certificate path.'),
-
-    )
-    if USE_STATICFILES:
-        option_list += (
-            make_option('--nostatic', action="store_false", dest='use_static_handler', default=True,
-                        help='Tells Django to NOT automatically serve static files at STATIC_URL.'),
-            make_option('--insecure', action="store_true", dest='insecure_serving', default=False,
-                        help='Allows serving static files even if DEBUG is False.'),
-        )
-    help = "Starts a lightweight Web server for development."
-    args = '[optional port number, or ipaddr:port]'
-
-    # Validation is called explicitly each time the server is reloaded.
-    requires_model_validation = False
-
-    @signalcommand
-    def handle(self, addrport='', *args, **options):
-        import django
-
-        # Do not use default ending='\n', because StreamHandler() takes care of it
-        if hasattr(self.stderr, 'ending'):
-            self.stderr.ending = None
-
-        setup_logger(logger, self.stderr, filename=options.get('output_file', None))  # , fmt="[%(name)s] %(message)s")
-        logredirect = RedirectHandler(__name__)
-
-        # Redirect werkzeug log items
-        werklogger = logging.getLogger('werkzeug')
-        werklogger.setLevel(logging.INFO)
-        werklogger.addHandler(logredirect)
-        werklogger.propagate = False
-
-        if options.get("print_sql", False):
-            try:
-                # Django 1.7 onwards
-                from django.db.backends import utils
-            except ImportError:
-                # Django 1.6 below
-                from django.db.backends import util as utils
-
-            try:
-                import sqlparse
-            except ImportError:
-                sqlparse = None  # noqa
-
-            class PrintQueryWrapper(utils.CursorDebugWrapper):
-                def execute(self, sql, params=()):
-                    starttime = time.time()
-                    try:
-                        return self.cursor.execute(sql, params)
-                    finally:
-                        raw_sql = self.db.ops.last_executed_query(self.cursor, sql, params)
-                        execution_time = time.time() - starttime
-                        therest = ' -- [Execution time: %.6fs] [Database: %s]' % (execution_time, self.db.alias)
-                        if sqlparse:
-                            logger.info(sqlparse.format(raw_sql, reindent=True) + therest)
-                        else:
-                            logger.info(raw_sql + therest)
-
-            utils.CursorDebugWrapper = PrintQueryWrapper
-
-        try:
-            from django.core.servers.basehttp import AdminMediaHandler
-            USE_ADMINMEDIAHANDLER = True
-        except ImportError:
-            USE_ADMINMEDIAHANDLER = False
-
-        try:
-            from django.core.servers.basehttp import get_internal_wsgi_application as WSGIHandler
-        except ImportError:
-            from django.core.handlers.wsgi import WSGIHandler  # noqa
-
-        try:
-            from werkzeug import run_simple, DebuggedApplication
-
-            # Set colored output
-            if settings.DEBUG:
-                try:
-                    set_werkzeug_log_color()
-                except:     # We are dealing with some internals, anything could go wrong
-                    print("Wrapping internal werkzeug logger for color highlighting has failed!")
-                    pass
-
-        except ImportError:
-            raise CommandError("Werkzeug is required to use runserver_plus.  Please visit http://werkzeug.pocoo.org/ or install via pip. (pip install Werkzeug)")
-
-        # usurp django's handler
-        from django.views import debug
-        debug.technical_500_response = null_technical_500_response
-
-        self.use_ipv6 = options.get('use_ipv6')
-        if self.use_ipv6 and not socket.has_ipv6:
-            raise CommandError('Your Python does not support IPv6.')
-        self._raw_ipv6 = False
-        if not addrport:
-            try:
-                addrport = settings.RUNSERVERPLUS_SERVER_ADDRESS_PORT
-            except AttributeError:
-                pass
-        if not addrport:
-            self.addr = ''
-            self.port = DEFAULT_PORT
-        else:
-            m = re.match(naiveip_re, addrport)
-            if m is None:
-                raise CommandError('"%s" is not a valid port number '
-                                   'or address:port pair.' % addrport)
-            self.addr, _ipv4, _ipv6, _fqdn, self.port = m.groups()
-            if not self.port.isdigit():
-                raise CommandError("%r is not a valid port number." %
-                                   self.port)
-            if self.addr:
-                if _ipv6:
-                    self.addr = self.addr[1:-1]
-                    self.use_ipv6 = True
-                    self._raw_ipv6 = True
-                elif self.use_ipv6 and not _fqdn:
-                    raise CommandError('"%s" is not a valid IPv6 address.'
-                                       % self.addr)
-        if not self.addr:
-            self.addr = '::1' if self.use_ipv6 else '127.0.0.1'
-
-        threaded = options.get('threaded', True)
-        use_reloader = options.get('use_reloader', True)
-        open_browser = options.get('open_browser', False)
-        cert_path = options.get("cert_path")
-        quit_command = (sys.platform == 'win32') and 'CTRL-BREAK' or 'CONTROL-C'
-        bind_url = "http://%s:%s/" % (
-            self.addr if not self._raw_ipv6 else '[%s]' % self.addr, self.port)
-
-        def inner_run():
-            print("Validating models...")
-            self.validate(display_num_errors=True)
-            print("\nDjango version %s, using settings %r" % (django.get_version(), settings.SETTINGS_MODULE))
-            print("Development server is running at %s" % (bind_url,))
-            print("Using the Werkzeug debugger (http://werkzeug.pocoo.org/)")
-            print("Quit the server with %s." % quit_command)
-            path = options.get('admin_media_path', '')
-            if not path:
-                admin_media_path = os.path.join(django.__path__[0], 'contrib/admin/static/admin')
-                if os.path.isdir(admin_media_path):
-                    path = admin_media_path
-                else:
-                    path = os.path.join(django.__path__[0], 'contrib/admin/media')
-            handler = WSGIHandler()
-            if USE_ADMINMEDIAHANDLER:
-                handler = AdminMediaHandler(handler, path)
-            if USE_STATICFILES:
-                use_static_handler = options.get('use_static_handler', True)
-                insecure_serving = options.get('insecure_serving', False)
-                if use_static_handler and (settings.DEBUG or insecure_serving):
-                    handler = StaticFilesHandler(handler)
-            if open_browser:
-                import webbrowser
-                webbrowser.open(bind_url)
-            if cert_path:
-                """
-                OpenSSL is needed for SSL support.
-
-                This will make flakes8 throw warning since OpenSSL is not used
-                directly, alas, this is the only way to show meaningful error
-                messages. See:
-                http://lucumr.pocoo.org/2011/9/21/python-import-blackbox/
-                for more information on python imports.
-                """
-                try:
-                    import OpenSSL  # NOQA
-                except ImportError:
-                    raise CommandError("Python OpenSSL Library is "
-                                       "required to use runserver_plus with ssl support. "
-                                       "Install via pip (pip install pyOpenSSL).")
-
-                dir_path, cert_file = os.path.split(cert_path)
-                if not dir_path:
-                    dir_path = os.getcwd()
-                root, ext = os.path.splitext(cert_file)
-                certfile = os.path.join(dir_path, root + ".crt")
-                keyfile = os.path.join(dir_path, root + ".key")
-                try:
-                    from werkzeug.serving import make_ssl_devcert
-                    if os.path.exists(certfile) and \
-                            os.path.exists(keyfile):
-                                ssl_context = (certfile, keyfile)
-                    else:  # Create cert, key files ourselves.
-                        ssl_context = make_ssl_devcert(
-                            os.path.join(dir_path, root), host='localhost')
-                except ImportError:
-                    print("Werkzeug version is less than 0.9, trying adhoc certificate.")
-                    ssl_context = "adhoc"
-
-            else:
-                ssl_context = None
-            run_simple(
-                self.addr,
-                int(self.port),
-                DebuggedApplication(handler, True),
-                use_reloader=use_reloader,
-                use_debugger=True,
-                threaded=threaded,
-                ssl_context=ssl_context
-            )
-        inner_run()
-
-
-def set_werkzeug_log_color():
-    """Try to set color to the werkzeug log.
-    """
-    from django.core.management.color import color_style
-    from werkzeug.serving import WSGIRequestHandler
-    from werkzeug._internal import _log
-
-    _style = color_style()
-    _orig_log = WSGIRequestHandler.log
-
-    def werk_log(self, type, message, *args):
-        try:
-            msg = '%s - - [%s] %s' % (
-                self.address_string(),
-                self.log_date_time_string(),
-                message % args,
-            )
-            http_code = str(args[1])
-        except:
-            return _orig_log(type, message, *args)
-
-        # Utilize terminal colors, if available
-        if http_code[0] == '2':
-            # Put 2XX first, since it should be the common case
-            msg = _style.HTTP_SUCCESS(msg)
-        elif http_code[0] == '1':
-            msg = _style.HTTP_INFO(msg)
-        elif http_code == '304':
-            msg = _style.HTTP_NOT_MODIFIED(msg)
-        elif http_code[0] == '3':
-            msg = _style.HTTP_REDIRECT(msg)
-        elif http_code == '404':
-            msg = _style.HTTP_NOT_FOUND(msg)
-        elif http_code[0] == '4':
-            msg = _style.HTTP_BAD_REQUEST(msg)
-        else:
-            # Any 5XX, or any other response
-            msg = _style.HTTP_SERVER_ERROR(msg)
-
-        _log(type, msg)
-
-    WSGIRequestHandler.log = werk_log

+ 0 - 291
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/shell_plus.py

@@ -1,291 +0,0 @@
-import os
-import six
-import time
-import traceback
-from optparse import make_option
-
-from django.core.management.base import NoArgsCommand
-from django.conf import settings
-
-from django_extensions.management.shells import import_objects
-from django_extensions.management.utils import signalcommand
-
-
-class Command(NoArgsCommand):
-    def use_vi_mode():
-        editor = os.environ.get('EDITOR')
-        if not editor:
-            return False
-        editor = os.path.basename(editor)
-        return editor.startswith('vi') or editor.endswith('vim')
-
-    option_list = NoArgsCommand.option_list + (
-        make_option('--plain', action='store_true', dest='plain',
-                    help='Tells Django to use plain Python, not BPython nor IPython.'),
-        make_option('--bpython', action='store_true', dest='bpython',
-                    help='Tells Django to use BPython, not IPython.'),
-        make_option('--ptpython', action='store_true', dest='ptpython',
-                    help='Tells Django to use PTPython, not IPython.'),
-        make_option('--ptipython', action='store_true', dest='ptipython',
-                    help='Tells Django to use PT-IPython, not IPython.'),
-        make_option('--ipython', action='store_true', dest='ipython',
-                    help='Tells Django to use IPython, not BPython.'),
-        make_option('--notebook', action='store_true', dest='notebook',
-                    help='Tells Django to use IPython Notebook.'),
-        make_option('--kernel', action='store_true', dest='kernel',
-                    help='Tells Django to start an IPython Kernel.'),
-        make_option('--use-pythonrc', action='store_true', dest='use_pythonrc',
-                    help='Tells Django to execute PYTHONSTARTUP file (BE CAREFULL WITH THIS!)'),
-        make_option('--print-sql', action='store_true', default=False,
-                    help="Print SQL queries as they're executed"),
-        make_option('--dont-load', action='append', dest='dont_load', default=[],
-                    help='Ignore autoloading of some apps/models. Can be used several times.'),
-        make_option('--quiet-load', action='store_true', default=False, dest='quiet_load',
-                    help='Do not display loaded models messages'),
-        make_option('--vi', action='store_true', default=use_vi_mode(), dest='vi_mode',
-                    help='Load Vi key bindings (for --ptpython and --ptipython)'),
-        make_option('--no-browser', action='store_true', default=False, dest='no_browser',
-                    help='Don\'t open the notebook in a browser after startup.'),
-    )
-    help = "Like the 'shell' command but autoloads the models of all installed Django apps."
-
-    @signalcommand
-    def handle_noargs(self, **options):
-        use_kernel = options.get('kernel', False)
-        use_notebook = options.get('notebook', False)
-        use_ipython = options.get('ipython', False)
-        use_bpython = options.get('bpython', False)
-        use_plain = options.get('plain', False)
-        use_ptpython = options.get('ptpython', False)
-        use_ptipython = options.get('ptipython', False)
-        use_pythonrc = options.get('use_pythonrc', True)
-        no_browser = options.get('no_browser', False)
-        verbosity = int(options.get('verbosity', 1))
-
-        if options.get("print_sql", False):
-            # Code from http://gist.github.com/118990
-            try:
-                # Django 1.7 onwards
-                from django.db.backends import utils
-            except ImportError:
-                # Django 1.6 and below
-                from django.db.backends import util as utils
-
-            sqlparse = None
-            try:
-                import sqlparse
-            except ImportError:
-                pass
-
-            class PrintQueryWrapper(utils.CursorDebugWrapper):
-                def execute(self, sql, params=()):
-                    starttime = time.time()
-                    try:
-                        return self.cursor.execute(sql, params)
-                    finally:
-                        execution_time = time.time() - starttime
-                        raw_sql = self.db.ops.last_executed_query(self.cursor, sql, params)
-                        if sqlparse:
-                            print(sqlparse.format(raw_sql, reindent=True))
-                        else:
-                            print(raw_sql)
-                        print("")
-                        print('Execution time: %.6fs [Database: %s]' % (execution_time, self.db.alias))
-                        print("")
-
-            utils.CursorDebugWrapper = PrintQueryWrapper
-
-        def get_kernel():
-            try:
-                from IPython import release
-                if release.version_info[0] < 2:
-                    print(self.style.ERROR("--kernel requires at least IPython version 2.0"))
-                    return
-                from IPython import embed_kernel
-            except ImportError:
-                return traceback.format_exc()
-
-            def run_kernel():
-                imported_objects = import_objects(options, self.style)
-                embed_kernel(local_ns=imported_objects)
-            return run_kernel
-
-        def get_notebook():
-            from django.conf import settings
-            try:
-                from IPython.html.notebookapp import NotebookApp
-            except ImportError:
-                try:
-                    from IPython.frontend.html.notebook import notebookapp
-                    NotebookApp = notebookapp.NotebookApp
-                except ImportError:
-                    return traceback.format_exc()
-
-            def run_notebook():
-                app = NotebookApp.instance()
-                ipython_arguments = getattr(settings, 'IPYTHON_ARGUMENTS', ['--ext', 'django_extensions.management.notebook_extension'])
-                if no_browser and '--no-browser' not in ipython_arguments:
-                    ipython_arguments.append('--no-browser')
-                if 'django_extensions.management.notebook_extension' not in ipython_arguments:
-                    print(self.style.ERROR("""WARNING:
-IPython Notebook Extension 'django_extensions.management.notebook_extension' not
-found in IPYTHON_ARGUMENTS. Without it the IPython Notebook will not initialize
-Django and will not automatically load your models.
-
-Please read the documentation carefully:
-  http://django-extensions.readthedocs.org/en/latest/shell_plus.html#configuration
-"""))
-                app.initialize(ipython_arguments)
-                app.start()
-            return run_notebook
-
-        def get_plain():
-            # Using normal Python shell
-            import code
-            imported_objects = import_objects(options, self.style)
-            try:
-                # Try activating rlcompleter, because it's handy.
-                import readline
-            except ImportError:
-                pass
-            else:
-                # We don't have to wrap the following import in a 'try', because
-                # we already know 'readline' was imported successfully.
-                import rlcompleter
-                readline.set_completer(rlcompleter.Completer(imported_objects).complete)
-                readline.parse_and_bind("tab:complete")
-
-            # We want to honor both $PYTHONSTARTUP and .pythonrc.py, so follow system
-            # conventions and get $PYTHONSTARTUP first then import user.
-            if use_pythonrc:
-                pythonrc = os.environ.get("PYTHONSTARTUP")
-                if pythonrc and os.path.isfile(pythonrc):
-                    global_ns = {}
-                    with open(pythonrc) as rcfile:
-                        try:
-                            six.exec_(compile(rcfile.read(), pythonrc, 'exec'), global_ns)
-                            imported_objects.update(global_ns)
-                        except NameError:
-                            pass
-                # This will import .pythonrc.py as a side-effect
-                try:
-                    import user  # NOQA
-                except ImportError:
-                    pass
-
-            def run_plain():
-                code.interact(local=imported_objects)
-            return run_plain
-
-        def get_bpython():
-            try:
-                from bpython import embed
-            except ImportError:
-                return traceback.format_exc()
-
-            def run_bpython():
-                imported_objects = import_objects(options, self.style)
-                embed(imported_objects)
-            return run_bpython
-
-        def get_ipython():
-            try:
-                from IPython import embed
-
-                def run_ipython():
-                    imported_objects = import_objects(options, self.style)
-                    embed(user_ns=imported_objects)
-                return run_ipython
-            except ImportError:
-                str_exc = traceback.format_exc()
-                # IPython < 0.11
-                # Explicitly pass an empty list as arguments, because otherwise
-                # IPython would use sys.argv from this script.
-                # Notebook not supported for IPython < 0.11.
-                try:
-                    from IPython.Shell import IPShell
-                except ImportError:
-                    return str_exc + "\n" + traceback.format_exc()
-
-                def run_ipython():
-                    imported_objects = import_objects(options, self.style)
-                    shell = IPShell(argv=[], user_ns=imported_objects)
-                    shell.mainloop()
-                return run_ipython
-
-        def get_ptpython():
-            try:
-                from prompt_toolkit.contrib.repl import embed
-            except ImportError:
-                return traceback.format_exc()
-
-            def run_ptpython():
-                imported_objects = import_objects(options, self.style)
-                history_filename = os.path.expanduser('~/.ptpython_history')
-                embed(globals=imported_objects, history_filename=history_filename,
-                      vi_mode=options.get('vi_mode', False))
-            return run_ptpython
-
-        def get_ptipython():
-            try:
-                from prompt_toolkit.contrib.ipython import embed
-            except ImportError:
-                return traceback.format_exc()
-
-            def run_ptipython():
-                imported_objects = import_objects(options, self.style)
-                history_filename = os.path.expanduser('~/.ptpython_history')
-                embed(user_ns=imported_objects, history_filename=history_filename,
-                      vi_mode=options.get('vi_mode', False))
-            return run_ptipython
-
-        shells = (
-            ('ptipython', get_ptipython),
-            ('ptpython', get_ptpython),
-            ('bpython', get_bpython),
-            ('ipython', get_ipython),
-            ('plain', get_plain),
-        )
-        SETTINGS_SHELL_PLUS = getattr(settings, 'SHELL_PLUS', None)
-
-        shell = None
-        shell_name = "any"
-        if use_kernel:
-            shell = get_kernel()
-            shell_name = "IPython Kernel"
-        elif use_notebook:
-            shell = get_notebook()
-            shell_name = "IPython Notebook"
-        elif use_plain:
-            shell = get_plain()
-            shell_name = "plain"
-        elif use_ipython:
-            shell = get_ipython()
-            shell_name = "IPython"
-        elif use_bpython:
-            shell = get_bpython()
-            shell_name = "BPython"
-        elif use_ptpython:
-            shell = get_ptpython()
-            shell_name = "ptpython"
-        elif use_ptipython:
-            shell = get_ptipython()
-            shell_name = "ptipython"
-        elif SETTINGS_SHELL_PLUS:
-            shell_name = SETTINGS_SHELL_PLUS
-            shell = dict(shells)[shell_name]()
-        else:
-            for shell_name, func in shells:
-                shell = func()
-                if callable(shell):
-                    if verbosity > 1:
-                        print(self.style.NOTICE("Using shell %s." % shell_name))
-                    break
-
-        if not callable(shell):
-            if shell:
-                print(shell)
-            print(self.style.ERROR("Could not load %s interactive Python environment." % shell_name))
-            return
-
-        shell()

+ 0 - 176
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/show_urls.py

@@ -1,176 +0,0 @@
-import re
-import functools
-from optparse import make_option
-
-from django.conf import settings
-from django.core.exceptions import ViewDoesNotExist
-from django.core.urlresolvers import RegexURLPattern, RegexURLResolver
-from django.core.management.base import BaseCommand, CommandError
-from django.contrib.admindocs.views import simplify_regex
-from django.utils.translation import activate
-
-from django_extensions.management.color import color_style
-from django_extensions.management.utils import signalcommand
-
-
-FMTR = {
-    'dense': "{url}\t{module}\t{url_name}\t{decorator}",
-    'table': "{url},{module},{url_name},{decorator}",
-    'aligned': "{url},{module},{url_name},{decorator}",
-    'verbose': "{url}\n\tController: {module}\n\tURL Name: {url_name}\n\tDecorators: {decorator}\n",
-}
-
-
-def extract_views_from_urlpatterns(urlpatterns, base='', namespace=None):
-    """
-    Return a list of views from a list of urlpatterns.
-
-    Each object in the returned list is a two-tuple: (view_func, regex)
-    """
-    views = []
-    for p in urlpatterns:
-        if isinstance(p, RegexURLPattern):
-            try:
-                if not p.name:
-                    name = p.name
-                elif namespace:
-                    name = '{0}:{1}'.format(namespace, p.name)
-                else:
-                    name = p.name
-                views.append((p.callback, base + p.regex.pattern, name))
-            except ViewDoesNotExist:
-                continue
-        elif isinstance(p, RegexURLResolver):
-            try:
-                patterns = p.url_patterns
-            except ImportError:
-                continue
-            views.extend(extract_views_from_urlpatterns(patterns, base + p.regex.pattern, namespace=(namespace or p.namespace)))
-        elif hasattr(p, '_get_callback'):
-            try:
-                views.append((p._get_callback(), base + p.regex.pattern, p.name))
-            except ViewDoesNotExist:
-                continue
-        elif hasattr(p, 'url_patterns') or hasattr(p, '_get_url_patterns'):
-            try:
-                patterns = p.url_patterns
-            except ImportError:
-                continue
-            views.extend(extract_views_from_urlpatterns(patterns, base + p.regex.pattern, namespace=namespace))
-        else:
-            raise TypeError("%s does not appear to be a urlpattern object" % p)
-    return views
-
-
-class Command(BaseCommand):
-    option_list = BaseCommand.option_list + (
-        make_option("--unsorted", "-u", action="store_true", dest="unsorted",
-                    help="Show urls unsorted but same order as found in url patterns"),
-        make_option("--language", "-l", dest="language",
-                    help="Set the language code (useful for i18n_patterns)"),
-        make_option("--decorator", "-d", action="append", dest="decorator", default=[],
-                    help="Show the presence of given decorator on views"),
-        make_option("--format", "-f", dest="format_style", default="dense",
-                    help="Style of the output. Choices: %s" % FMTR.keys())
-    )
-
-    help = "Displays all of the url matching routes for the project."
-
-    @signalcommand
-    def handle(self, *args, **options):
-        if args:
-            appname, = args
-
-        style = color_style()
-
-        if getattr(settings, 'ADMIN_FOR', None):
-            settings_modules = [__import__(m, {}, {}, ['']) for m in settings.ADMIN_FOR]
-        else:
-            settings_modules = [settings]
-
-        language = options.get('language', None)
-        if language is not None:
-            activate(language)
-
-        decorator = options.get('decorator')
-        if not decorator:
-            decorator = ['login_required']
-
-        format_style = options.get('format_style')
-        if format_style not in FMTR:
-            raise CommandError("Format style '%s' does not exist. Options: %s" % (format_style, FMTR.keys()))
-        fmtr = FMTR[format_style]
-
-        views = []
-        for settings_mod in settings_modules:
-            try:
-                urlconf = __import__(settings_mod.ROOT_URLCONF, {}, {}, [''])
-            except Exception as e:
-                if options.get('traceback', None):
-                    import traceback
-                    traceback.print_exc()
-                print(style.ERROR("Error occurred while trying to load %s: %s" % (settings_mod.ROOT_URLCONF, str(e))))
-                continue
-
-            view_functions = extract_views_from_urlpatterns(urlconf.urlpatterns)
-            for (func, regex, url_name) in view_functions:
-
-                if hasattr(func, '__globals__'):
-                    func_globals = func.__globals__
-                elif hasattr(func, 'func_globals'):
-                    func_globals = func.func_globals
-                else:
-                    func_globals = {}
-
-                decorators = [d for d in decorator if d in func_globals]
-
-                if isinstance(func, functools.partial):
-                    func = func.func
-                    decorators.insert(0, 'functools.partial')
-
-                if hasattr(func, '__name__'):
-                    func_name = func.__name__
-                elif hasattr(func, '__class__'):
-                    func_name = '%s()' % func.__class__.__name__
-                else:
-                    func_name = re.sub(r' at 0x[0-9a-f]+', '', repr(func))
-
-                views.append(fmtr.format(
-                    module='{0}.{1}'.format(style.MODULE(func.__module__), style.MODULE_NAME(func_name)),
-                    url_name=style.URL_NAME(url_name or ''),
-                    url=style.URL(simplify_regex(regex)),
-                    decorator=', '.join(decorators),
-                ))
-
-        if not options.get('unsorted', False):
-            views = sorted(views)
-
-        if format_style == 'aligned':
-            views = [row.split(',', 3) for row in views]
-            widths = [len(max(columns, key=len)) for columns in zip(*views)]
-            views = [
-                '   '.join('{0:<{1}}'.format(cdata, width) for width, cdata in zip(widths, row))
-                for row in views
-            ]
-        elif format_style == 'table':
-            # Reformat all data and show in a table format
-
-            views = [row.split(',', 3) for row in views]
-            widths = [len(max(columns, key=len)) for columns in zip(*views)]
-            table_views = []
-
-            header = (style.MODULE_NAME('URL'), style.MODULE_NAME('Module'), style.MODULE_NAME('Name'), style.MODULE_NAME('Decorator'))
-            table_views.append(
-                ' | '.join('{0:<{1}}'.format(title, width) for width, title in zip(widths, header))
-            )
-            table_views.append('-+-'.join('-' * width for width in widths))
-
-            for row in views:
-                table_views.append(
-                    ' | '.join('{0:<{1}}'.format(cdata, width) for width, cdata in zip(widths, row))
-                )
-
-            # Replace original views so we can return the same object
-            views = table_views
-
-        return "\n".join([v for v in views]) + "\n"

+ 0 - 41
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/update_permissions.py

@@ -1,41 +0,0 @@
-from django.core.management.base import BaseCommand
-from django.contrib.auth.management import create_permissions as _create_permissions
-
-from django_extensions.management.utils import signalcommand
-
-try:
-    from django.apps import apps as django_apps
-    get_models = lambda: None
-    get_app = django_apps.get_app_config
-    get_all_apps = django_apps.get_app_configs
-
-    def create_permissions(app, models, verbosity):
-        _create_permissions(app, verbosity)
-
-except ImportError:
-    from django.db.models import get_models, get_app
-    django_apps = None
-
-    def get_all_apps():
-        apps = set()
-        for model in get_models():
-            apps.add(get_app(model._meta.app_label))
-        return apps
-    create_permissions = _create_permissions
-
-
-class Command(BaseCommand):
-    args = '<app app ...>'
-    help = 'reloads permissions for specified apps, or all apps if no args are specified'
-
-    @signalcommand
-    def handle(self, *args, **options):
-        apps = set()
-        if not args:
-            apps = get_all_apps()
-        else:
-            for arg in args:
-                apps.add(get_app(arg))
-
-        for app in apps:
-            create_permissions(app, get_models(), int(options.get('verbosity', 3)))

+ 0 - 73
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/validate_templates.py

@@ -1,73 +0,0 @@
-import os
-from optparse import make_option
-from django.core.management.base import BaseCommand, CommandError
-from django.core.management.color import color_style
-from django.template.base import add_to_builtins
-from django.template.loaders.filesystem import Loader
-from django_extensions.utils import validatingtemplatetags
-from django_extensions.management.utils import signalcommand
-
-#
-# TODO: Render the template with fake request object ?
-#
-
-
-class Command(BaseCommand):
-    args = ''
-    help = "Validate templates on syntax and compile errors"
-    option_list = BaseCommand.option_list + (
-        make_option('--break', '-b', action='store_true', dest='break',
-                    default=False, help="Break on first error."),
-        make_option('--check-urls', '-u', action='store_true', dest='check_urls',
-                    default=False, help="Check url tag view names are quoted appropriately"),
-        make_option('--force-new-urls', '-n', action='store_true', dest='force_new_urls',
-                    default=False, help="Error on usage of old style url tags (without {% load urls from future %}"),
-        make_option('--include', '-i', action='append', dest='includes',
-                    default=[], help="Append these paths to TEMPLATE_DIRS")
-    )
-
-    @signalcommand
-    def handle(self, *args, **options):
-        from django.conf import settings
-        style = color_style()
-        template_dirs = set(settings.TEMPLATE_DIRS)
-        template_dirs |= set(options.get('includes', []))
-        template_dirs |= set(getattr(settings, 'VALIDATE_TEMPLATES_EXTRA_TEMPLATE_DIRS', []))
-        settings.TEMPLATE_DIRS = list(template_dirs)
-        settings.TEMPLATE_DEBUG = True
-        verbosity = int(options.get('verbosity', 1))
-        errors = 0
-
-        template_loader = Loader()
-
-        # Replace built in template tags with our own validating versions
-        if options.get('check_urls', False):
-            add_to_builtins('django_extensions.utils.validatingtemplatetags')
-
-        for template_dir in template_dirs:
-            for root, dirs, filenames in os.walk(template_dir):
-                for filename in filenames:
-                    if filename.endswith(".swp"):
-                        continue
-                    if filename.endswith("~"):
-                        continue
-                    filepath = os.path.join(root, filename)
-                    if verbosity > 1:
-                        print(filepath)
-                    validatingtemplatetags.before_new_template(options.get('force_new_urls', False))
-                    try:
-                        template_loader.load_template(filename, [root])
-                    except Exception as e:
-                        errors += 1
-                        print("%s: %s" % (filepath, style.ERROR("%s %s" % (e.__class__.__name__, str(e)))))
-                    template_errors = validatingtemplatetags.get_template_errors()
-                    for origin, line, message in template_errors:
-                        errors += 1
-                        print("%s(%s): %s" % (origin, line, style.ERROR(message)))
-                    if errors and options.get('break', False):
-                        raise CommandError("Errors found")
-
-        if errors:
-            raise CommandError("%s errors found" % errors)
-        print("%s errors found" % errors)
-

+ 0 - 301
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/modelviz.py

@@ -1,301 +0,0 @@
-"""
-modelviz.py - DOT file generator for Django Models
-
-Based on:
-  Django model to DOT (Graphviz) converter
-  by Antonio Cavedoni <antonio@cavedoni.org>
-  Adapted to be used with django-extensions
-"""
-
-__version__ = "1.0"
-__license__ = "Python"
-__author__ = "Bas van Oostveen <v.oostveen@gmail.com>",
-__contributors__ = [
-    "Antonio Cavedoni <http://cavedoni.com/>"
-    "Stefano J. Attardi <http://attardi.org/>",
-    "limodou <http://www.donews.net/limodou/>",
-    "Carlo C8E Miron",
-    "Andre Campos <cahenan@gmail.com>",
-    "Justin Findlay <jfindlay@gmail.com>",
-    "Alexander Houben <alexander@houben.ch>",
-    "Joern Hees <gitdev@joernhees.de>",
-    "Kevin Cherepski <cherepski@gmail.com>",
-]
-
-import os
-import six
-import datetime
-from django.utils.translation import activate as activate_language
-from django.utils.safestring import mark_safe
-from django.template import Context, loader, Template
-from django.db import models
-from django.db.models import get_models
-from django.db.models.fields.related import ForeignKey, OneToOneField, ManyToManyField, RelatedField
-
-try:
-    from django.db.models.fields.generic import GenericRelation
-    assert GenericRelation
-except ImportError:
-    from django.contrib.contenttypes.generic import GenericRelation
-
-
-def parse_file_or_list(arg):
-    if not arg:
-        return []
-    if ',' not in arg and os.path.isfile(arg):
-        return [e.strip() for e in open(arg).readlines()]
-    return arg.split(',')
-
-
-def generate_dot(app_labels, **kwargs):
-    cli_options = kwargs.get('cli_options', None)
-    disable_fields = kwargs.get('disable_fields', False)
-    include_models = parse_file_or_list(kwargs.get('include_models', ""))
-    all_applications = kwargs.get('all_applications', False)
-    use_subgraph = kwargs.get('group_models', False)
-    verbose_names = kwargs.get('verbose_names', False)
-    inheritance = kwargs.get('inheritance', True)
-    relations_as_fields = kwargs.get("relations_as_fields", True)
-    sort_fields = kwargs.get("sort_fields", True)
-    language = kwargs.get('language', None)
-    if language is not None:
-        activate_language(language)
-    exclude_columns = parse_file_or_list(kwargs.get('exclude_columns', ""))
-    exclude_models = parse_file_or_list(kwargs.get('exclude_models', ""))
-
-    def skip_field(field):
-        if exclude_columns:
-            if verbose_names and field.verbose_name:
-                if field.verbose_name in exclude_columns:
-                    return True
-            if field.name in exclude_columns:
-                return True
-        return False
-
-    apps = []
-    if all_applications:
-        apps = models.get_apps()
-
-    for app_label in app_labels:
-        app = models.get_app(app_label)
-        if app not in apps:
-            apps.append(app)
-
-    graphs = []
-    for app in apps:
-        graph = Context({
-            'name': '"%s"' % app.__name__,
-            'app_name': "%s" % '.'.join(app.__name__.split('.')[:-1]),
-            'cluster_app_name': "cluster_%s" % app.__name__.replace(".", "_"),
-            'models': []
-        })
-
-        appmodels = get_models(app)
-        abstract_models = []
-        for appmodel in appmodels:
-            abstract_models = abstract_models + [abstract_model for abstract_model in appmodel.__bases__ if hasattr(abstract_model, '_meta') and abstract_model._meta.abstract]
-        abstract_models = list(set(abstract_models))  # remove duplicates
-        appmodels = abstract_models + appmodels
-
-        for appmodel in appmodels:
-            appmodel_abstracts = [abstract_model.__name__ for abstract_model in appmodel.__bases__ if hasattr(abstract_model, '_meta') and abstract_model._meta.abstract]
-
-            # collect all attribs of abstract superclasses
-            def getBasesAbstractFields(c):
-                _abstract_fields = []
-                for e in c.__bases__:
-                    if hasattr(e, '_meta') and e._meta.abstract:
-                        _abstract_fields.extend(e._meta.fields)
-                        _abstract_fields.extend(getBasesAbstractFields(e))
-                return _abstract_fields
-            abstract_fields = getBasesAbstractFields(appmodel)
-
-            model = {
-                'app_name': appmodel.__module__.replace(".", "_"),
-                'name': appmodel.__name__,
-                'abstracts': appmodel_abstracts,
-                'fields': [],
-                'relations': []
-            }
-
-            # consider given model name ?
-            def consider(model_name):
-                if exclude_models and model_name in exclude_models:
-                    return False
-                elif include_models and model_name not in include_models:
-                    return False
-                return not include_models or model_name in include_models
-
-            if not consider(appmodel._meta.object_name):
-                continue
-
-            if verbose_names and appmodel._meta.verbose_name:
-                model['label'] = appmodel._meta.verbose_name.decode("utf8")
-            else:
-                model['label'] = model['name']
-
-            # model attributes
-            def add_attributes(field):
-                if verbose_names and field.verbose_name:
-                    label = field.verbose_name.decode("utf8")
-                    if label.islower():
-                        label = label.capitalize()
-                else:
-                    label = field.name
-
-                t = type(field).__name__
-                if isinstance(field, (OneToOneField, ForeignKey)):
-                    t += " ({0})".format(field.rel.field_name)
-                # TODO: ManyToManyField, GenericRelation
-
-                model['fields'].append({
-                    'name': field.name,
-                    'label': label,
-                    'type': t,
-                    'blank': field.blank,
-                    'abstract': field in abstract_fields,
-                    'relation': isinstance(field, RelatedField),
-                    'primary_key': field.primary_key,
-                })
-
-            attributes = [field for field in appmodel._meta.local_fields]
-            if not relations_as_fields:
-                # Find all the 'real' attributes. Relations are depicted as graph edges instead of attributes
-                attributes = [field for field in attributes if not isinstance(field, RelatedField)]
-
-            # find primary key and print it first, ignoring implicit id if other pk exists
-            pk = appmodel._meta.pk
-            if pk and not appmodel._meta.abstract and pk in attributes:
-                add_attributes(pk)
-
-            for field in attributes:
-                if skip_field(field):
-                    continue
-                if pk and field == pk:
-                    continue
-                add_attributes(field)
-
-            if sort_fields:
-                model['fields'] = sorted(model['fields'], key=lambda field: (not field['primary_key'], not field['relation'], field['label']))
-
-            # FIXME: actually many_to_many fields aren't saved in this model's db table, so why should we add an attribute-line for them in the resulting graph?
-            #if appmodel._meta.many_to_many:
-            #    for field in appmodel._meta.many_to_many:
-            #        if skip_field(field):
-            #            continue
-            #        add_attributes(field)
-
-            # relations
-            def add_relation(field, extras=""):
-                if verbose_names and field.verbose_name:
-                    label = field.verbose_name.decode("utf8")
-                    if label.islower():
-                        label = label.capitalize()
-                else:
-                    label = field.name
-
-                # show related field name
-                if hasattr(field, 'related_query_name'):
-                    related_query_name = field.related_query_name()
-                    if verbose_names and related_query_name.islower():
-                        related_query_name = related_query_name.replace('_', ' ').capitalize()
-                    label += ' (%s)' % related_query_name
-
-                # handle self-relationships and lazy-relationships
-                if isinstance(field.rel.to, six.string_types):
-                    if field.rel.to == 'self':
-                        target_model = field.model
-                    else:
-                        raise Exception("Lazy relationship for model (%s) must be explicit for field (%s)" % (field.model.__name__, field.name))
-                else:
-                    target_model = field.rel.to
-
-                _rel = {
-                    'target_app': target_model.__module__.replace('.', '_'),
-                    'target': target_model.__name__,
-                    'type': type(field).__name__,
-                    'name': field.name,
-                    'label': label,
-                    'arrows': extras,
-                    'needs_node': True
-                }
-                if _rel not in model['relations'] and consider(_rel['target']):
-                    model['relations'].append(_rel)
-
-            for field in appmodel._meta.local_fields:
-                if field.attname.endswith('_ptr_id'):  # excluding field redundant with inheritance relation
-                    continue
-                if field in abstract_fields:  # excluding fields inherited from abstract classes. they too show as local_fields
-                    continue
-                if skip_field(field):
-                    continue
-                if isinstance(field, OneToOneField):
-                    add_relation(field, '[arrowhead=none, arrowtail=none, dir=both]')
-                elif isinstance(field, ForeignKey):
-                    add_relation(field, '[arrowhead=none, arrowtail=dot, dir=both]')
-
-            for field in appmodel._meta.local_many_to_many:
-                if skip_field(field):
-                    continue
-                if isinstance(field, ManyToManyField):
-                    if (getattr(field, 'creates_table', False) or  # django 1.1.
-                            (hasattr(field.rel.through, '_meta') and field.rel.through._meta.auto_created)):  # django 1.2
-                        add_relation(field, '[arrowhead=dot arrowtail=dot, dir=both]')
-                elif isinstance(field, GenericRelation):
-                    add_relation(field, mark_safe('[style="dotted", arrowhead=normal, arrowtail=normal, dir=both]'))
-
-            if inheritance:
-                # add inheritance arrows
-                for parent in appmodel.__bases__:
-                    if hasattr(parent, "_meta"):  # parent is a model
-                        l = "multi-table"
-                        if parent._meta.abstract:
-                            l = "abstract"
-                        if appmodel._meta.proxy:
-                            l = "proxy"
-                        l += r"\ninheritance"
-                        _rel = {
-                            'target_app': parent.__module__.replace(".", "_"),
-                            'target': parent.__name__,
-                            'type': "inheritance",
-                            'name': "inheritance",
-                            'label': l,
-                            'arrows': '[arrowhead=empty, arrowtail=none, dir=both]',
-                            'needs_node': True,
-                        }
-                        # TODO: seems as if abstract models aren't part of models.getModels, which is why they are printed by this without any attributes.
-                        if _rel not in model['relations'] and consider(_rel['target']):
-                            model['relations'].append(_rel)
-
-            graph['models'].append(model)
-        if graph['models']:
-            graphs.append(graph)
-
-    nodes = []
-    for graph in graphs:
-        nodes.extend([e['name'] for e in graph['models']])
-
-    for graph in graphs:
-        for model in graph['models']:
-            for relation in model['relations']:
-                if relation['target'] in nodes:
-                    relation['needs_node'] = False
-
-    now = datetime.datetime.now()
-    t = loader.get_template('django_extensions/graph_models/digraph.dot')
-
-    if not isinstance(t, Template):
-        raise Exception("Default Django template loader isn't used. "
-                        "This can lead to the incorrect template rendering. "
-                        "Please, check the settings.")
-
-    c = Context({
-        'created_at': now.strftime("%Y-%m-%d %H:%M"),
-        'cli_options': cli_options,
-        'disable_fields': disable_fields,
-        'use_subgraph': use_subgraph,
-        'graphs': graphs,
-    })
-    dot = t.render(c)
-
-    return dot

+ 0 - 17
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/migrations/0001_empty.py

@@ -1,17 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.v2 import SchemaMigration
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        pass
-
-    def backwards(self, orm):
-        pass
-
-    models = {
-
-    }
-
-    complete_apps = ['django_extensions']

File diff suppressed because it is too large
+ 0 - 1
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/static/django_extensions/js/jquery-1.7.2.min.js


+ 0 - 10
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/static/django_extensions/js/jquery.bgiframe.min.js

@@ -1,10 +0,0 @@
-/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- *
- * $LastChangedDate: 2007-07-22 01:45:56 +0200 (Son, 22 Jul 2007) $
- * $Rev: 2447 $
- *
- * Version 2.1.1
- */
-(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})((typeof window.jQuery=='undefined' && typeof window.django!='undefined')? django.jQuery : jQuery);

+ 0 - 26
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/__init__.py

@@ -1,26 +0,0 @@
-from django.db import models  # NOQA
-from django_extensions.tests.test_dumpscript import DumpScriptTests
-from django_extensions.tests.utils import TruncateLetterTests
-from django_extensions.tests.json_field import JsonFieldTest
-from django_extensions.tests.uuid_field import (UUIDFieldTest,
-                                                PostgreSQLUUIDFieldTest)
-from django_extensions.tests.shortuuid_field import ShortUUIDFieldTest
-from django_extensions.tests.fields import AutoSlugFieldTest
-from django_extensions.tests.management_command import CommandTest, \
-    ShowTemplateTagsTests, UpdatePermissionsTests, CommandSignalTests
-from django_extensions.tests.test_templatetags import TemplateTagsTests
-from django_extensions.tests.test_clean_pyc import CleanPycTests
-from django_extensions.tests.test_compile_pyc import CompilePycTests
-
-__test_classes__ = [
-    DumpScriptTests, JsonFieldTest, UUIDFieldTest, AutoSlugFieldTest,
-    CommandTest, ShowTemplateTagsTests, TruncateLetterTests, TemplateTagsTests,
-    ShortUUIDFieldTest, PostgreSQLUUIDFieldTest, CleanPycTests, CompilePycTests,
-    UpdatePermissionsTests, CommandSignalTests
-]
-
-try:
-    from django_extensions.tests.encrypted_fields import EncryptedFieldsTestCase
-    __test_classes__.append(EncryptedFieldsTestCase)
-except ImportError:
-    pass

+ 0 - 258
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/encrypted_fields.py

@@ -1,258 +0,0 @@
-from contextlib import contextmanager
-import functools
-
-from django.conf import settings
-from django.db import connection, models
-from django.db.models import loading
-
-from django_extensions.tests.models import Secret
-from django_extensions.tests.fields import FieldTestCase
-
-# Only perform encrypted fields tests if keyczar is present. Resolves
-# http://github.com/django-extensions/django-extensions/issues/#issue/17
-try:
-    from django_extensions.db.fields.encrypted import EncryptedTextField, EncryptedCharField  # NOQA
-    from keyczar import keyczar, keyczart, keyinfo  # NOQA
-    keyczar_active = True
-except ImportError:
-    keyczar_active = False
-
-
-def run_if_active(func):
-    "Method decorator that only runs a test if KeyCzar is available."
-
-    @functools.wraps(func)
-    def inner(self):
-        if not keyczar_active:
-            return
-        return func(self)
-    return inner
-
-
-# Locations of both private and public keys.
-KEY_LOCS = getattr(settings, 'ENCRYPTED_FIELD_KEYS_DIR', {})
-
-
-@contextmanager
-def keys(purpose, mode=None):
-    """
-    A context manager that sets up the correct KeyCzar environment for a test.
-
-    Arguments:
-        purpose: Either keyczar.keyinfo.DECRYPT_AND_ENCRYPT or
-                 keyczar.keyinfo.ENCRYPT.
-        mode: If truthy, settings.ENCRYPTED_FIELD_MODE will be set to (and then
-              reverted from) this value. If falsy, settings.ENCRYPTED_FIELD_MODE
-              will not be changed. Optional. Default: None.
-
-    Yields:
-        A Keyczar subclass for the stated purpose. This will be keyczar.Crypter
-        for DECRYPT_AND_ENCRYPT or keyczar.Encrypter for ENCRYPT. In addition,
-        settings.ENCRYPTED_FIELD_KEYS_DIR will be set correctly, and then
-        reverted when the manager exits.
-    """
-    # Store the original settings so we can restore when the manager exits.
-    orig_setting_dir = getattr(settings, 'ENCRYPTED_FIELD_KEYS_DIR', None)
-    orig_setting_mode = getattr(settings, 'ENCRYPTED_FIELD_MODE', None)
-    try:
-        if mode:
-            settings.ENCRYPTED_FIELD_MODE = mode
-
-        if purpose == keyinfo.DECRYPT_AND_ENCRYPT:
-            settings.ENCRYPTED_FIELD_KEYS_DIR = KEY_LOCS['DECRYPT_AND_ENCRYPT']
-            yield keyczar.Crypter.Read(settings.ENCRYPTED_FIELD_KEYS_DIR)
-        else:
-            settings.ENCRYPTED_FIELD_KEYS_DIR = KEY_LOCS['ENCRYPT']
-            yield keyczar.Encrypter.Read(settings.ENCRYPTED_FIELD_KEYS_DIR)
-
-    except:
-        raise  # Reraise any exceptions.
-
-    finally:
-        # Restore settings.
-        settings.ENCRYPTED_FIELD_KEYS_DIR = orig_setting_dir
-        if mode:
-            if orig_setting_mode:
-                settings.ENCRYPTED_FIELD_MODE = orig_setting_mode
-            else:
-                del settings.ENCRYPTED_FIELD_MODE
-
-
-@contextmanager
-def secret_model():
-    """
-    A context manager that yields a Secret model defined at runtime.
-
-    All EncryptedField init logic occurs at model class definition time, not at
-    object instantiation time. This means that in order to test different keys
-    and modes, we must generate a new class definition at runtime, after
-    establishing the correct KeyCzar settings. This context manager handles
-    that process.
-
-    See http://dynamic-models.readthedocs.org/en/latest/ and
-    https://docs.djangoproject.com/en/dev/topics/db/models/
-        #differences-between-proxy-inheritance-and-unmanaged-models
-    """
-
-    # Store Django's cached model, if present, so we can restore when the
-    # manager exits.
-    orig_model = None
-    try:
-        orig_model = loading.cache.app_models['tests']['secret']
-        del loading.cache.app_models['tests']['secret']
-    except KeyError:
-        pass
-
-    try:
-        # Create a new class that shadows tests.models.Secret.
-        attrs = {
-            'name': EncryptedCharField("Name", max_length=Secret._meta.get_field('name').max_length),
-            'text': EncryptedTextField("Text"),
-            '__module__': 'django_extensions.tests.models',
-            'Meta': type('Meta', (object, ), {
-                'managed': False,
-                'db_table': Secret._meta.db_table
-            })
-        }
-        yield type('Secret', (models.Model, ), attrs)
-
-    except:
-        raise  # Reraise any exceptions.
-
-    finally:
-        # Restore Django's model cache.
-        try:
-            loading.cache.app_models['tests']['secret'] = orig_model
-        except KeyError:
-            pass
-
-
-class EncryptedFieldsTestCase(FieldTestCase):
-    @run_if_active
-    def testCharFieldCreate(self):
-        """
-        Uses a private key to encrypt data on model creation.
-        Verifies the data is encrypted in the database and can be decrypted.
-        """
-        with keys(keyinfo.DECRYPT_AND_ENCRYPT) as crypt:
-            with secret_model() as model:
-                test_val = "Test Secret"
-                secret = model.objects.create(name=test_val)
-
-                cursor = connection.cursor()
-                query = "SELECT name FROM %s WHERE id = %d" % (model._meta.db_table, secret.id)
-                cursor.execute(query)
-                db_val, = cursor.fetchone()
-                decrypted_val = crypt.Decrypt(db_val[len(EncryptedCharField.prefix):])
-                self.assertEqual(test_val, decrypted_val)
-
-    @run_if_active
-    def testCharFieldRead(self):
-        """
-        Uses a private key to encrypt data on model creation.
-        Verifies the data is decrypted when reading the value back from the
-        model.
-        """
-        with keys(keyinfo.DECRYPT_AND_ENCRYPT):
-            with secret_model() as model:
-                test_val = "Test Secret"
-                secret = model.objects.create(name=test_val)
-                retrieved_secret = model.objects.get(id=secret.id)
-                self.assertEqual(test_val, retrieved_secret.name)
-
-    @run_if_active
-    def testTextFieldCreate(self):
-        """
-        Uses a private key to encrypt data on model creation.
-        Verifies the data is encrypted in the database and can be decrypted.
-        """
-        with keys(keyinfo.DECRYPT_AND_ENCRYPT) as crypt:
-            with secret_model() as model:
-                test_val = "Test Secret"
-                secret = model.objects.create(text=test_val)
-                cursor = connection.cursor()
-                query = "SELECT text FROM %s WHERE id = %d" % (model._meta.db_table, secret.id)
-                cursor.execute(query)
-                db_val, = cursor.fetchone()
-                decrypted_val = crypt.Decrypt(db_val[len(EncryptedCharField.prefix):])
-                self.assertEqual(test_val, decrypted_val)
-
-    @run_if_active
-    def testTextFieldRead(self):
-        """
-        Uses a private key to encrypt data on model creation.
-        Verifies the data is decrypted when reading the value back from the
-        model.
-        """
-        with keys(keyinfo.DECRYPT_AND_ENCRYPT):
-            with secret_model() as model:
-                test_val = "Test Secret"
-                secret = model.objects.create(text=test_val)
-                retrieved_secret = model.objects.get(id=secret.id)
-                self.assertEqual(test_val, retrieved_secret.text)
-
-    @run_if_active
-    def testCannotDecrypt(self):
-        """
-        Uses a public key to encrypt data on model creation.
-        Verifies that the data cannot be decrypted using the same key.
-        """
-        with keys(keyinfo.ENCRYPT, mode=keyinfo.ENCRYPT.name):
-            with secret_model() as model:
-                test_val = "Test Secret"
-                secret = model.objects.create(name=test_val)
-                retrieved_secret = model.objects.get(id=secret.id)
-                self.assertNotEqual(test_val, retrieved_secret.name)
-                self.assertTrue(retrieved_secret.name.startswith(EncryptedCharField.prefix))
-
-    @run_if_active
-    def testUnacceptablePurpose(self):
-        """
-        Tries to create an encrypted field with a mode mismatch.
-        A purpose of "DECRYPT_AND_ENCRYPT" cannot be used with a public key,
-        since public keys cannot be used for decryption. This should raise an
-        exception.
-        """
-        with self.assertRaises(keyczar.errors.KeyczarError):
-            with keys(keyinfo.ENCRYPT):
-                with secret_model():
-                    # A KeyCzar exception should get raised during class
-                    # definition time, so any code in here would never get run.
-                    pass
-
-    @run_if_active
-    def testDecryptionForbidden(self):
-        """
-        Uses a private key to encrypt data, but decryption is not allowed.
-        ENCRYPTED_FIELD_MODE is explicitly set to ENCRYPT, meaning data should
-        not be decrypted, even though the key would allow for it.
-        """
-        with keys(keyinfo.DECRYPT_AND_ENCRYPT, mode=keyinfo.ENCRYPT.name):
-            with secret_model() as model:
-                test_val = "Test Secret"
-                secret = model.objects.create(name=test_val)
-                retrieved_secret = model.objects.get(id=secret.id)
-                self.assertNotEqual(test_val, retrieved_secret.name)
-                self.assertTrue(retrieved_secret.name.startswith(EncryptedCharField.prefix))
-
-    @run_if_active
-    def testEncryptPublicDecryptPrivate(self):
-        """
-        Uses a public key to encrypt, and a private key to decrypt data.
-        """
-        test_val = "Test Secret"
-
-        # First, encrypt data with public key and save to db.
-        with keys(keyinfo.ENCRYPT, mode=keyinfo.ENCRYPT.name):
-            with secret_model() as model:
-                secret = model.objects.create(name=test_val)
-                enc_retrieved_secret = model.objects.get(id=secret.id)
-                self.assertNotEqual(test_val, enc_retrieved_secret.name)
-                self.assertTrue(enc_retrieved_secret.name.startswith(EncryptedCharField.prefix))
-
-        # Next, retrieve data from db, and decrypt with private key.
-        with keys(keyinfo.DECRYPT_AND_ENCRYPT):
-            with secret_model() as model:
-                retrieved_secret = model.objects.get(id=secret.id)
-                self.assertEqual(test_val, retrieved_secret.name)
-

+ 0 - 159
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/fields.py

@@ -1,159 +0,0 @@
-import django
-from django.conf import settings
-from django.core.management import call_command
-from django.db.models import loading
-from django.db import models
-from django.utils import unittest
-
-from django_extensions.db.fields import AutoSlugField
-from django_extensions.tests.testapp.models import SluggedTestModel, ChildSluggedTestModel
-
-if django.VERSION[:2] >= (1, 7):
-    from django.db import migrations  # NOQA
-    from django.db.migrations.writer import MigrationWriter  # NOQA
-    from django.utils import six  # NOQA
-    import django_extensions  # NOQA
-
-
-class FieldTestCase(unittest.TestCase):
-    def setUp(self):
-        self.old_installed_apps = settings.INSTALLED_APPS
-        #settings.INSTALLED_APPS = list(settings.INSTALLED_APPS)
-        #settings.INSTALLED_APPS.append('django_extensions.tests.testapp')
-        loading.cache.loaded = False
-
-        # Don't migrate if south is installed
-        migrate = 'south' not in settings.INSTALLED_APPS
-        call_command('syncdb', verbosity=0, migrate=migrate)
-
-    def tearDown(self):
-        settings.INSTALLED_APPS = self.old_installed_apps
-
-    def safe_exec(self, string, value=None):
-        l = {}
-        try:
-            exec(string, globals(), l)
-        except Exception as e:
-            if value:
-                self.fail("Could not exec %r (from value %r): %s" % (string.strip(), value, e))
-            else:
-                self.fail("Could not exec %r: %s" % (string.strip(), e))
-        return l
-
-
-class AutoSlugFieldTest(FieldTestCase):
-    def tearDown(self):
-        super(AutoSlugFieldTest, self).tearDown()
-
-        SluggedTestModel.objects.all().delete()
-
-    def testAutoCreateSlug(self):
-        m = SluggedTestModel(title='foo')
-        m.save()
-        self.assertEqual(m.slug, 'foo')
-
-    def testAutoCreateNextSlug(self):
-        m = SluggedTestModel(title='foo')
-        m.save()
-
-        m = SluggedTestModel(title='foo')
-        m.save()
-        self.assertEqual(m.slug, 'foo-2')
-
-    def testAutoCreateSlugWithNumber(self):
-        m = SluggedTestModel(title='foo 2012')
-        m.save()
-        self.assertEqual(m.slug, 'foo-2012')
-
-    def testAutoUpdateSlugWithNumber(self):
-        m = SluggedTestModel(title='foo 2012')
-        m.save()
-        m.save()
-        self.assertEqual(m.slug, 'foo-2012')
-
-    def testUpdateSlug(self):
-        m = SluggedTestModel(title='foo')
-        m.save()
-        self.assertEqual(m.slug, 'foo')
-
-        # update m instance without using `save'
-        SluggedTestModel.objects.filter(pk=m.pk).update(slug='foo-2012')
-        # update m instance with new data from the db
-        m = SluggedTestModel.objects.get(pk=m.pk)
-        self.assertEqual(m.slug, 'foo-2012')
-
-        m.save()
-        self.assertEqual(m.title, 'foo')
-        self.assertEqual(m.slug, 'foo-2012')
-
-        # Check slug is not overwrite
-        m.title = 'bar'
-        m.save()
-        self.assertEqual(m.title, 'bar')
-        self.assertEqual(m.slug, 'foo-2012')
-
-    def testSimpleSlugSource(self):
-        m = SluggedTestModel(title='-foo')
-        m.save()
-        self.assertEqual(m.slug, 'foo')
-
-        n = SluggedTestModel(title='-foo')
-        n.save()
-        self.assertEqual(n.slug, 'foo-2')
-
-        n.save()
-        self.assertEqual(n.slug, 'foo-2')
-
-    def testEmptySlugSource(self):
-        # regression test
-
-        m = SluggedTestModel(title='')
-        m.save()
-        self.assertEqual(m.slug, '-2')
-
-        n = SluggedTestModel(title='')
-        n.save()
-        self.assertEqual(n.slug, '-3')
-
-        n.save()
-        self.assertEqual(n.slug, '-3')
-
-    def testInheritanceCreatesNextSlug(self):
-        m = SluggedTestModel(title='foo')
-        m.save()
-
-        n = ChildSluggedTestModel(title='foo')
-        n.save()
-        self.assertEqual(n.slug, 'foo-2')
-
-        o = SluggedTestModel(title='foo')
-        o.save()
-        self.assertEqual(o.slug, 'foo-3')
-
-    @unittest.skipIf(django.VERSION[0] <= 1 and django.VERSION[1] <= 6,
-                     "Migrations are handled by south in Django <1.7")
-    def test_17_migration(self):
-        """
-        Tests making migrations with Django 1.7+'s migration framework
-        """
-
-        fields = {
-            'autoslugfield': AutoSlugField(populate_from='otherfield'),
-        }
-
-        migration = type(str("Migration"), (migrations.Migration,), {
-            "operations": [
-                migrations.CreateModel("MyModel", tuple(fields.items()),
-                                       {'populate_from': 'otherfield'},
-                                       (models.Model,)),
-            ],
-        })
-        writer = MigrationWriter(migration)
-        output = writer.as_string()
-        # It should NOT be unicode.
-        self.assertIsInstance(output, six.binary_type,
-                              "Migration as_string returned unicode")
-        # We don't test the output formatting - that's too fragile.
-        # Just make sure it runs for now, and that things look alright.
-        result = self.safe_exec(output)
-        self.assertIn("Migration", result)

+ 0 - 17
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/json_field.py

@@ -1,17 +0,0 @@
-from django_extensions.tests.fields import FieldTestCase
-from django_extensions.tests.testapp.models import JSONFieldTestModel
-
-
-class JsonFieldTest(FieldTestCase):
-    def testCharFieldCreate(self):
-        j = JSONFieldTestModel.objects.create(a=6, j_field=dict(foo='bar'))
-        self.assertEqual(j.a, 6)
-
-    def testDefault(self):
-        j = JSONFieldTestModel.objects.create(a=1)
-        self.assertEqual(j.j_field, {})
-
-    def testEmptyList(self):
-        j = JSONFieldTestModel.objects.create(a=6, j_field=[])
-        self.assertTrue(isinstance(j.j_field, list))
-        self.assertEqual(j.j_field, [])

+ 0 - 10
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/management/commands/error_raising_command.py

@@ -1,10 +0,0 @@
-
-from django_extensions.management.base import LoggingBaseCommand
-
-
-class Command(LoggingBaseCommand):
-    help = 'Test error'
-
-    def handle(self, *args, **options):
-        raise Exception("Test Error")
-

+ 0 - 107
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/management_command.py

@@ -1,107 +0,0 @@
-# -*- coding: utf-8 -*-
-import sys
-import logging
-
-try:
-    from cStringIO import StringIO  # NOQA
-except ImportError:
-    from io import StringIO  # NOQA
-
-try:
-    import importlib  # NOQA
-except ImportError:
-    from django.utils import importlib  # NOQA
-
-from django.core.management import call_command
-from django.test import TestCase
-
-
-class MockLoggingHandler(logging.Handler):
-    """ Mock logging handler to check for expected logs. """
-
-    def __init__(self, *args, **kwargs):
-        self.reset()
-        logging.Handler.__init__(self, *args, **kwargs)
-
-    def emit(self, record):
-        self.messages[record.levelname.lower()].append(record.getMessage())
-
-    def reset(self):
-        self.messages = {
-            'debug': [],
-            'info': [],
-            'warning': [],
-            'error': [],
-            'critical': [],
-        }
-
-
-class CommandTest(TestCase):
-    def test_error_logging(self):
-        # Ensure command errors are properly logged and reraised
-        from django_extensions.management.base import logger
-        logger.addHandler(MockLoggingHandler())
-        module_path = "django_extensions.tests.management.commands.error_raising_command"
-        module = importlib.import_module(module_path)
-        error_raising_command = module.Command()
-        self.assertRaises(Exception, error_raising_command.execute)
-        handler = logger.handlers[0]
-        self.assertEqual(len(handler.messages['error']), 1)
-
-
-class ShowTemplateTagsTests(TestCase):
-    def test_some_output(self):
-        out = StringIO()
-        call_command('show_templatetags', stdout=out)
-        output = out.getvalue()
-        # Once django_extension is installed during tests it should appear with
-        # its templatetags
-        self.assertIn('django_extensions', output)
-        # let's check at least one
-        self.assertIn('truncate_letters', output)
-
-
-class UpdatePermissionsTests(TestCase):
-    def test_works(self):
-        from django.db import models
-
-        class PermModel(models.Model):
-            class Meta:
-                app_label = 'django_extensions'
-                permissions = (('test_permission', 'test_permission'),)
-
-        original_stdout = sys.stdout
-        out = sys.stdout = StringIO()
-        call_command('update_permissions', stdout=out, verbosity=3)
-        sys.stdout = original_stdout
-        self.assertIn("Can change perm model", out.getvalue())
-
-
-class CommandSignalTests(TestCase):
-    pre = None
-    post = None
-
-    def test_works(self):
-        from django_extensions.management.signals import post_command, \
-            pre_command
-        from django_extensions.management.commands.show_templatetags import \
-            Command
-
-        def pre(sender, **kwargs):
-            CommandSignalTests.pre = dict(**kwargs)
-
-        def post(sender, **kwargs):
-            CommandSignalTests.post = dict(**kwargs)
-
-        pre_command.connect(pre, Command)
-        post_command.connect(post, Command)
-
-        out = StringIO()
-        call_command('show_templatetags', stdout=out)
-
-        self.assertIn('args', CommandSignalTests.pre)
-        self.assertIn('kwargs', CommandSignalTests.pre)
-
-        self.assertIn('args', CommandSignalTests.post)
-        self.assertIn('kwargs', CommandSignalTests.post)
-        self.assertIn('outcome', CommandSignalTests.post)

+ 0 - 39
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/shortuuid_field.py

@@ -1,39 +0,0 @@
-import six
-from django.conf import settings
-from django.core.management import call_command
-from django.db.models import loading
-from django.utils import unittest
-
-from django_extensions.tests.testapp.models import ShortUUIDTestModel_field, ShortUUIDTestModel_pk, ShortUUIDTestAgregateModel, ShortUUIDTestManyToManyModel
-
-
-class ShortUUIDFieldTest(unittest.TestCase):
-    def setUp(self):
-        self.old_installed_apps = settings.INSTALLED_APPS
-        settings.INSTALLED_APPS = list(settings.INSTALLED_APPS)
-        settings.INSTALLED_APPS.append('django_extensions.tests')
-        loading.cache.loaded = False
-        call_command('syncdb', verbosity=0)
-
-    def tearDown(self):
-        settings.INSTALLED_APPS = self.old_installed_apps
-
-    def testUUIDFieldCreate(self):
-        j = ShortUUIDTestModel_field.objects.create(a=6, uuid_field=six.u('vytxeTZskVKR7C7WgdSP3d'))
-        self.assertEqual(j.uuid_field, six.u('vytxeTZskVKR7C7WgdSP3d'))
-
-    def testUUIDField_pkCreate(self):
-        j = ShortUUIDTestModel_pk.objects.create(uuid_field=six.u('vytxeTZskVKR7C7WgdSP3d'))
-        self.assertEqual(j.uuid_field, six.u('vytxeTZskVKR7C7WgdSP3d'))
-        self.assertEqual(j.pk, six.u('vytxeTZskVKR7C7WgdSP3d'))
-
-    def testUUIDField_pkAgregateCreate(self):
-        j = ShortUUIDTestAgregateModel.objects.create(a=6)
-        self.assertEqual(j.a, 6)
-        self.assertIsInstance(j.pk, six.string_types)
-        self.assertTrue(len(j.pk) < 23)
-
-    def testUUIDFieldManyToManyCreate(self):
-        j = ShortUUIDTestManyToManyModel.objects.create(uuid_field=six.u('vytxeTZskVKR7C7WgdSP3e'))
-        self.assertEqual(j.uuid_field, six.u('vytxeTZskVKR7C7WgdSP3e'))
-        self.assertEqual(j.pk, six.u('vytxeTZskVKR7C7WgdSP3e'))

+ 0 - 61
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_clean_pyc.py

@@ -1,61 +0,0 @@
-import os
-import six
-import shutil
-import fnmatch
-from django.test import TestCase
-from django.core.management import call_command
-from django_extensions.management.utils import get_project_root
-
-
-class CleanPycTests(TestCase):
-    def setUp(self):
-        self._settings = os.environ.get('DJANGO_SETTINGS_MODULE')
-        os.environ['DJANGO_SETTINGS_MODULE'] = 'django_extensions.settings'
-
-    def tearDown(self):
-        if self._settings:
-            os.environ['DJANGO_SETTINGS_MODULE'] = self._settings
-
-    def _find_pyc(self, path):
-        pyc_glob = []
-        for root, dirnames, filenames in os.walk(path):
-            for filename in fnmatch.filter(filenames, '*.pyc'):
-                pyc_glob.append(os.path.join(root, filename))
-        return pyc_glob
-
-    def test_removes_pyc_files(self):
-        with self.settings(BASE_DIR=get_project_root()):
-            call_command('compile_pyc')
-        pyc_glob = self._find_pyc(get_project_root())
-        self.assertTrue(len(pyc_glob) > 0)
-        with self.settings(BASE_DIR=get_project_root()):
-            call_command('clean_pyc')
-        pyc_glob = self._find_pyc(get_project_root())
-        self.assertEqual(len(pyc_glob), 0)
-
-    def test_takes_path(self):
-        out = six.StringIO()
-        project_root = os.path.join(get_project_root(), 'tests', 'testapp')
-        call_command('compile_pyc', path=project_root)
-        pyc_glob = self._find_pyc(project_root)
-        self.assertTrue(len(pyc_glob) > 0)
-        call_command('clean_pyc', verbosity=2, path=project_root, stdout=out)
-        output = out.getvalue().splitlines()
-        self.assertEqual(sorted(pyc_glob), sorted(output))
-
-    def test_removes_pyo_files(self):
-        out = six.StringIO()
-        project_root = os.path.join(get_project_root(), 'tests', 'testapp')
-        call_command('compile_pyc', path=project_root)
-        pyc_glob = self._find_pyc(project_root)
-        self.assertTrue(len(pyc_glob) > 0)
-        # Create some fake .pyo files since we can't force them to be created.
-        pyo_glob = []
-        for fn in pyc_glob:
-            pyo = '%s.pyo' % os.path.splitext(fn)[0]
-            shutil.copyfile(fn, pyo)
-            pyo_glob.append(pyo)
-        call_command('clean_pyc', verbosity=2, path=project_root,
-                     optimize=True, stdout=out)
-        output = out.getvalue().splitlines()
-        self.assertEqual(sorted(pyc_glob + pyo_glob), sorted(output))

+ 0 - 51
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_compile_pyc.py

@@ -1,51 +0,0 @@
-import os
-import six
-import fnmatch
-from django.test import TestCase
-from django.core.management import call_command
-from django_extensions.management.utils import get_project_root
-
-
-class CompilePycTests(TestCase):
-    def setUp(self):
-        self._settings = os.environ.get('DJANGO_SETTINGS_MODULE')
-        os.environ['DJANGO_SETTINGS_MODULE'] = 'django_extensions.settings'
-
-    def tearDown(self):
-        if self._settings:
-            os.environ['DJANGO_SETTINGS_MODULE'] = self._settings
-
-    def _find_pyc(self, path, mask='*.pyc'):
-        pyc_glob = []
-        for root, dirs, filenames in os.walk(path):
-            for filename in fnmatch.filter(filenames, mask):
-                pyc_glob.append(os.path.join(root, filename))
-        return pyc_glob
-
-    def test_compiles_pyc_files(self):
-        with self.settings(BASE_DIR=get_project_root()):
-            call_command('clean_pyc')
-        pyc_glob = self._find_pyc(get_project_root())
-        self.assertEqual(len(pyc_glob), 0)
-        with self.settings(BASE_DIR=get_project_root()):
-            call_command('compile_pyc')
-        pyc_glob = self._find_pyc(get_project_root())
-        self.assertTrue(len(pyc_glob) > 0)
-        with self.settings(BASE_DIR=get_project_root()):
-            call_command('clean_pyc')
-
-    def test_takes_path(self):
-        out = six.StringIO()
-        project_root = os.path.join(get_project_root(), 'tests', 'testapp')
-        with self.settings(BASE_DIR=get_project_root()):
-            call_command('clean_pyc', path=project_root)
-        pyc_glob = self._find_pyc(project_root)
-        self.assertEqual(len(pyc_glob), 0)
-        with self.settings(BASE_DIR=get_project_root()):
-            call_command('compile_pyc', verbosity=2, path=project_root, stdout=out)
-        expected = ['Compiling %s...' % fn for fn in
-                    sorted(self._find_pyc(project_root, mask='*.py'))]
-        output = out.getvalue().splitlines()
-        self.assertEqual(expected, sorted(output))
-        with self.settings(BASE_DIR=get_project_root()):
-            call_command('clean_pyc')

+ 0 - 86
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_dumpscript.py

@@ -1,86 +0,0 @@
-import sys
-import six
-
-if sys.version_info[:2] >= (2, 6):
-    import ast as compiler  # NOQA
-else:
-    import compiler  # NOQA
-
-from django.core.management import call_command
-
-from django_extensions.tests.testapp.models import Name, Note, Person
-from django_extensions.tests.fields import FieldTestCase
-
-
-class DumpScriptTests(FieldTestCase):
-    def setUp(self):
-        super(DumpScriptTests, self).setUp()
-
-        self.real_stdout = sys.stdout
-        self.real_stderr = sys.stderr
-        sys.stdout = six.StringIO()
-        sys.stderr = six.StringIO()
-
-    def tearDown(self):
-        super(DumpScriptTests, self).tearDown()
-
-        sys.stdout = self.real_stdout
-        sys.stderr = self.real_stderr
-
-    def test_runs(self):
-        # lame test...does it run?
-        n = Name(name='Gabriel')
-        n.save()
-        call_command('dumpscript', 'django_extensions')
-        self.assertTrue('Gabriel' in sys.stdout.getvalue())
-
-    #----------------------------------------------------------------------
-    def test_replaced_stdout(self):
-        # check if stdout can be replaced
-        sys.stdout = six.StringIO()
-        n = Name(name='Mike')
-        n.save()
-        tmp_out = six.StringIO()
-        call_command('dumpscript', 'django_extensions', stdout=tmp_out)
-        self.assertTrue('Mike' in tmp_out.getvalue())  # script should go to tmp_out
-        self.assertEqual(0, len(sys.stdout.getvalue()))  # there should not be any output to sys.stdout
-        tmp_out.close()
-
-    #----------------------------------------------------------------------
-    def test_replaced_stderr(self):
-        # check if stderr can be replaced, without changing stdout
-        n = Name(name='Fred')
-        n.save()
-        tmp_err = six.StringIO()
-        sys.stderr = six.StringIO()
-        call_command('dumpscript', 'django_extensions', stderr=tmp_err)
-        self.assertTrue('Fred' in sys.stdout.getvalue())  # script should still go to stdout
-        self.assertTrue('Name' in tmp_err.getvalue())  # error output should go to tmp_err
-        self.assertEqual(0, len(sys.stderr.getvalue()))  # there should not be any output to sys.stderr
-        tmp_err.close()
-
-    #----------------------------------------------------------------------
-    def test_valid_syntax(self):
-        n1 = Name(name='John')
-        n1.save()
-        p1 = Person(name=n1, age=40)
-        p1.save()
-        n2 = Name(name='Jane')
-        n2.save()
-        p2 = Person(name=n2, age=18)
-        p2.save()
-        p2.children.add(p1)
-        note1 = Note(note="This is the first note.")
-        note1.save()
-        note2 = Note(note="This is the second note.")
-        note2.save()
-        p2.notes.add(note1, note2)
-        tmp_out = six.StringIO()
-        call_command('dumpscript', 'django_extensions', stdout=tmp_out)
-        ast_syntax_tree = compiler.parse(tmp_out.getvalue())
-        if hasattr(ast_syntax_tree, 'body'):
-            self.assertTrue(len(ast_syntax_tree.body) > 1)
-        else:
-            self.assertTrue(len(ast_syntax_tree.asList()) > 1)
-        tmp_out.close()
-

+ 0 - 42
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_models.py

@@ -1,42 +0,0 @@
-from django.test import TestCase
-
-from django_extensions.db.models import ActivatorModel
-from django_extensions.tests.testapp.models import Post
-
-
-class ActivatorModelTestCase(TestCase):
-    def test_active_includes_active(self):
-        post = Post.objects.create(status=ActivatorModel.ACTIVE_STATUS)
-        active = Post.objects.active()
-        self.assertIn(post, active)
-        post.delete()
-
-    def test_active_excludes_inactive(self):
-        post = Post.objects.create(status=ActivatorModel.INACTIVE_STATUS)
-        active = Post.objects.active()
-        self.assertNotIn(post, active)
-        post.delete()
-
-    def test_inactive_includes_inactive(self):
-        post = Post.objects.create(status=ActivatorModel.INACTIVE_STATUS)
-        inactive = Post.objects.inactive()
-        self.assertIn(post, inactive)
-        post.delete()
-
-    def test_inactive_excludes_active(self):
-        post = Post.objects.create(status=ActivatorModel.ACTIVE_STATUS)
-        inactive = Post.objects.inactive()
-        self.assertNotIn(post, inactive)
-        post.delete()
-
-    def test_active_is_chainable(self):
-        post = Post.objects.create(title='Foo', status=ActivatorModel.ACTIVE_STATUS)
-        specific_post = Post.objects.filter(title='Foo').active()
-        self.assertIn(post, specific_post)
-        post.delete()
-
-    def test_inactive_is_chainable(self):
-        post = Post.objects.create(title='Foo', status=ActivatorModel.INACTIVE_STATUS)
-        specific_post = Post.objects.filter(title='Foo').inactive()
-        self.assertIn(post, specific_post)
-        post.delete()

+ 0 - 15
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_templatetags.py

@@ -1,15 +0,0 @@
-import six
-
-from django.test import TestCase
-
-from django_extensions.templatetags.widont import widont, widont_html
-
-
-class TemplateTagsTests(TestCase):
-    def test_widont(self):
-        widont('Test Value')
-        widont(six.u('Test Value'))
-
-    def test_widont_html(self):
-        widont_html('Test Value')
-        widont_html(six.u('Test Value'))

+ 0 - 0
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/testapp/__init__.py


+ 0 - 125
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/testapp/models.py

@@ -1,125 +0,0 @@
-from django.db import models
-
-from django_extensions.db.models import ActivatorModel
-from django_extensions.db.fields import AutoSlugField
-from django_extensions.db.fields import UUIDField
-from django_extensions.db.fields import ShortUUIDField
-from django_extensions.db.fields.json import JSONField
-
-
-class Secret(models.Model):
-    name = models.CharField(blank=True, max_length=255, null=True)
-    text = models.TextField(blank=True, null=True)
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class Name(models.Model):
-    name = models.CharField(max_length=50)
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class Note(models.Model):
-    note = models.TextField()
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class Person(models.Model):
-    name = models.ForeignKey(Name)
-    age = models.PositiveIntegerField()
-    children = models.ManyToManyField('self')
-    notes = models.ManyToManyField(Note)
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class Post(ActivatorModel):
-    title = models.CharField(max_length=255)
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class SluggedTestModel(models.Model):
-    title = models.CharField(max_length=42)
-    slug = AutoSlugField(populate_from='title')
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class ChildSluggedTestModel(SluggedTestModel):
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class JSONFieldTestModel(models.Model):
-    a = models.IntegerField()
-    j_field = JSONField()
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class UUIDTestModel_field(models.Model):
-    a = models.IntegerField()
-    uuid_field = UUIDField()
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class UUIDTestModel_pk(models.Model):
-    uuid_field = UUIDField(primary_key=True)
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class UUIDTestAgregateModel(UUIDTestModel_pk):
-    a = models.IntegerField()
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class UUIDTestManyToManyModel(UUIDTestModel_pk):
-    many = models.ManyToManyField(UUIDTestModel_field)
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class ShortUUIDTestModel_field(models.Model):
-    a = models.IntegerField()
-    uuid_field = ShortUUIDField()
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class ShortUUIDTestModel_pk(models.Model):
-    uuid_field = ShortUUIDField(primary_key=True)
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class ShortUUIDTestAgregateModel(ShortUUIDTestModel_pk):
-    a = models.IntegerField()
-
-    class Meta:
-        app_label = 'django_extensions'
-
-
-class ShortUUIDTestManyToManyModel(ShortUUIDTestModel_pk):
-    many = models.ManyToManyField(ShortUUIDTestModel_field)
-
-    class Meta:
-        app_label = 'django_extensions'

+ 0 - 0
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/testapp/urls.py


+ 0 - 76
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/utils.py

@@ -1,76 +0,0 @@
-# -*- coding: utf-8 -*-
-import sys
-import six
-
-from django.test import TestCase
-from django.utils.unittest import skipIf
-
-from django_extensions.utils.text import truncate_letters
-try:
-    import uuid
-    assert uuid
-except ImportError:
-    from django_extensions.utils import uuid
-
-
-class TruncateLetterTests(TestCase):
-    def test_truncate_more_than_text_length(self):
-        self.assertEqual(six.u("hello tests"), truncate_letters("hello tests", 100))
-
-    def test_truncate_text(self):
-        self.assertEqual(six.u("hello..."), truncate_letters("hello tests", 5))
-
-    def test_truncate_with_range(self):
-        for i in range(10, -1, -1):
-            self.assertEqual(
-                six.u('hello tests'[:i]) + '...',
-                truncate_letters("hello tests", i)
-            )
-
-    def test_with_non_ascii_characters(self):
-        self.assertEqual(
-            six.u('\u5ce0 (\u3068\u3046\u3052 t\u014dg...'),
-            truncate_letters("峠 (とうげ tōge - mountain pass)", 10)
-        )
-
-
-class UUIDTests(TestCase):
-    @skipIf(sys.version_info >= (2, 5, 0), 'uuid already in stdlib')
-    def test_uuid3(self):
-        # make a UUID using an MD5 hash of a namespace UUID and a name
-        self.assertEqual(
-            uuid.UUID('6fa459ea-ee8a-3ca4-894e-db77e160355e'),
-            uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org')
-        )
-
-    @skipIf(sys.version_info >= (2, 5, 0), 'uuid already in stdlib')
-    def test_uuid5(self):
-        # make a UUID using a SHA-1 hash of a namespace UUID and a name
-        self.assertEqual(
-            uuid.UUID('886313e1-3b8a-5372-9b90-0c9aee199e5d'),
-            uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')
-        )
-
-    @skipIf(sys.version_info >= (2, 5, 0), 'uuid already in stdlib')
-    def test_uuid_str(self):
-        # make a UUID from a string of hex digits (braces and hyphens ignored)
-        x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')
-        # convert a UUID to a string of hex digits in standard form
-        self.assertEqual('00010203-0405-0607-0809-0a0b0c0d0e0f', str(x))
-
-    @skipIf(sys.version_info >= (2, 5, 0), 'uuid already in stdlib')
-    def test_uuid_bytes(self):
-        # make a UUID from a string of hex digits (braces and hyphens ignored)
-        x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')
-        # get the raw 16 bytes of the UUID
-        self.assertEqual(
-            '\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f',
-            x.bytes
-        )
-
-    @skipIf(sys.version_info >= (2, 5, 0), 'uuid already in stdlib')
-    def test_make_uuid_from_byte_string(self):
-        self.assertEqual(
-            uuid.UUID(bytes='\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f'),
-            uuid.UUID('00010203-0405-0607-0809-0a0b0c0d0e0f')
-        )

+ 0 - 47
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/uuid_field.py

@@ -1,47 +0,0 @@
-import re
-import uuid
-
-import six
-
-from django_extensions.db.fields import PostgreSQLUUIDField
-from django_extensions.tests.fields import FieldTestCase
-from django_extensions.tests.testapp.models import UUIDTestModel_field, UUIDTestModel_pk, UUIDTestAgregateModel, UUIDTestManyToManyModel
-
-
-class UUIDFieldTest(FieldTestCase):
-    def testUUIDFieldCreate(self):
-        j = UUIDTestModel_field.objects.create(a=6, uuid_field=six.u('550e8400-e29b-41d4-a716-446655440000'))
-        self.assertEqual(j.uuid_field, six.u('550e8400-e29b-41d4-a716-446655440000'))
-
-    def testUUIDField_pkCreate(self):
-        j = UUIDTestModel_pk.objects.create(uuid_field=six.u('550e8400-e29b-41d4-a716-446655440000'))
-        self.assertEqual(j.uuid_field, six.u('550e8400-e29b-41d4-a716-446655440000'))
-        self.assertEqual(j.pk, six.u('550e8400-e29b-41d4-a716-446655440000'))
-
-    def testUUIDField_pkAgregateCreate(self):
-        j = UUIDTestAgregateModel.objects.create(a=6, uuid_field=six.u('550e8400-e29b-41d4-a716-446655440001'))
-        self.assertEqual(j.a, 6)
-        self.assertIsInstance(j.pk, six.string_types)
-        self.assertEqual(len(j.pk), 36)
-
-    def testUUIDFieldManyToManyCreate(self):
-        j = UUIDTestManyToManyModel.objects.create(uuid_field=six.u('550e8400-e29b-41d4-a716-446655440010'))
-        self.assertEqual(j.uuid_field, six.u('550e8400-e29b-41d4-a716-446655440010'))
-        self.assertEqual(j.pk, six.u('550e8400-e29b-41d4-a716-446655440010'))
-
-
-class PostgreSQLUUIDFieldTest(FieldTestCase):
-    def test_uuid_casting(self):
-        # As explain by postgres documentation
-        # http://www.postgresql.org/docs/9.1/static/datatype-uuid.html
-        # an uuid needs to be a sequence of lower-case hexadecimal digits, in
-        # several groups separated by hyphens, specifically a group of 8 digits
-        # followed by three groups of 4 digits followed by a group of 12 digits
-        matcher = re.compile('^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}'
-                             '-[\da-f]{12}$')
-        field = PostgreSQLUUIDField()
-        for value in (str(uuid.uuid4()), uuid.uuid4().urn, uuid.uuid4().hex,
-                      uuid.uuid4().int, uuid.uuid4().bytes):
-            prepared_value = field.get_db_prep_value(value, None)
-            self.assertTrue(matcher.match(prepared_value) is not None,
-                            prepared_value)

+ 0 - 0
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/utils/__init__.py


+ 0 - 23
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/utils/text.py

@@ -1,23 +0,0 @@
-import six
-
-from django.utils.functional import allow_lazy
-
-# conditional import, force_unicode was renamed in Django 1.5
-try:
-    from django.utils.encoding import force_unicode  # NOQA
-except ImportError:
-    from django.utils.encoding import force_text as force_unicode  # NOQA
-
-
-def truncate_letters(s, num):
-    """
-    truncates a string to a number of letters, similar to truncate_words
-    """
-    s = force_unicode(s)
-    length = int(num)
-    if len(s) > length:
-        s = s[:length]
-        if not s.endswith('...'):
-            s += '...'
-    return s
-truncate_letters = allow_lazy(truncate_letters, six.text_type)

+ 0 - 91
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/utils/validatingtemplatetags.py

@@ -1,91 +0,0 @@
-from django.template.base import Library, Node
-from django.template import defaulttags
-from django.templatetags import future
-register = Library()
-
-error_on_old_style_url_tag = False
-new_style_url_tag = False
-errors = []
-
-
-def before_new_template(force_new_urls):
-    """Reset state ready for new template"""
-    global new_style_url_tag, error_on_old_style_url_tag, errors
-    new_style_url_tag = False
-    error_on_old_style_url_tag = force_new_urls
-    errors = []
-
-
-def get_template_errors():
-    return errors
-
-
-# Disable extends and include as they are not needed, slow parsing down, and cause duplicate errors
-class NoOpNode(Node):
-    def render(self, context):
-        return ''
-
-
-@register.tag
-def extends(parser, token):
-    return NoOpNode()
-
-
-@register.tag
-def include(parser, token):
-    return NoOpNode()
-
-
-# We replace load to determine whether new style urls are in use and re-patch url after
-# a future version is loaded
-@register.tag
-def load(parser, token):
-    global new_style_url_tag
-    bits = token.contents.split()
-
-    reloaded_url_tag = False
-    if len(bits) >= 4 and bits[-2] == "from" and bits[-1] == "future":
-        for name in bits[1:-2]:
-            if name == "url":
-                new_style_url_tag = True
-                reloaded_url_tag = True
-
-    try:
-        return defaulttags.load(parser, token)
-    finally:
-        if reloaded_url_tag:
-            parser.tags['url'] = new_style_url
-
-
-@register.tag(name='url')
-def old_style_url(parser, token):
-    global error_on_old_style_url_tag
-
-    bits = token.split_contents()
-    view = bits[1]
-
-    if error_on_old_style_url_tag:
-        _error("Old style url tag used (only reported once per file): {%% %s %%}" % (" ".join(bits)), token)
-        error_on_old_style_url_tag = False
-
-    if view[0] in "\"'" and view[0] == view[-1]:
-        _error("Old style url tag with quotes around view name: {%% %s %%}" % (" ".join(bits)), token)
-
-    return defaulttags.url(parser, token)
-
-
-def new_style_url(parser, token):
-    bits = token.split_contents()
-    view = bits[1]
-
-    if view[0] not in "\"'" or view[0] != view[-1]:
-        _error("New style url tag without quotes around view name: {%% %s %%}" % (" ".join(bits)), token)
-
-    return future.url(parser, token)
-
-
-def _error(message, token):
-    origin, (start, upto) = token.source
-    source = origin.reload()
-    line = source.count("\n", 0, start) + 1  # 1 based line numbering
-    errors.append((origin, line, message))

BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/admin_extensions.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/command_extension_ideas.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/command_extensions.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/create_app.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/dumpscript.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/environment.pickle


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/export_emails.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/field_extensions.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/graph_models.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/index.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/installation_instructions.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/jobs_scheduling.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/model_extensions.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/namespace_proposal.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/print_settings.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/runprofileserver.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/runscript.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/runserver_plus.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/shell_plus.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/sqlcreate.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/sqldiff.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/sync_s3.doctree


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/doctrees/validate_templates.doctree


+ 0 - 4
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/.buildinfo

@@ -1,4 +0,0 @@
-# Sphinx build info version 1
-# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 6df91c5f3729816803eed093fe3f80db
-tags: 645f666f9bcd5a90fca523b33c5a78b7

+ 0 - 53
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/admin_extensions.txt

@@ -1,53 +0,0 @@
-Current Admin Extensions
-========================
-
-:synopsis: Current Field Extensions
-
-
-* *ForeignKeyAutocompleteAdmin* - ForeignKeyAutocompleteAdmin will enable the
-  admin app to show ForeignKey fields with an search input field. The search
-  field is rendered by the ForeignKeySearchInput form widget and uses jQuery
-  to do configureable autocompletion.
-
-
-Example Usage
--------------
-
-To enable the Admin Autocomplete you can follow this code example
-in your admin.py file:
-
-::
-
-    from django.contrib import admin
-    from foo.models import Permission
-    from django_extensions.admin import ForeignKeyAutocompleteAdmin
-
-
-    class PermissionAdmin(ForeignKeyAutocompleteAdmin):
-        # User is your FK attribute in your model
-        # first_name and email are attributes to search for in the FK model
-        related_search_fields = {
-           'user': ('first_name', 'email'),
-        }
-
-        fields = ('user', 'avatar', 'is_active')
-
-        ...
-
-    admin.site.register(Permission, PermissionAdmin)
-
-
-If you are using django-reversion you should follow this code example:
-
-::
-
-    from django.contrib import admin
-    from foo.models import MyVersionModel
-    from reversion.admin import VersionAdmin
-    from django_extensions.admin import ForeignKeyAutocompleteAdmin
-
-
-    class MyVersionModelAdmin(VersionAdmin, ForeignKeyAutocompleteAdmin):
-        ...
-
-    admin.site.register(MyVersionModel, MyVersionModelAdmin)

+ 0 - 7
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/command_extension_ideas.txt

@@ -1,7 +0,0 @@
-Ideas for New Command Extensions
-================================
-
-:synopsis: Here are some ideas for some future command extensions.
-
-* create form/manager for App
-* CSS and JS concatenation and minification scripts

+ 0 - 104
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/command_extensions.txt

@@ -1,104 +0,0 @@
-Current Command Extensions
-==========================
-
-:synopsis: Current Command Extensions
-
-* :doc:`shell_plus` - An enhanced version of the Django shell.  It will autoload
-  all your models making it easy to work with the ORM right away.
-
-* *admin_generator* - Generate automatic Django Admin classes by providing an app name. Outputs
-  source code at STDOUT.
-
-* `create_app`_ - Creates an application directory structure for the specified
-  app name.  This command allows you to specify the --template option where you
-  can indicate a template directory structure to use as your default.
-
-* *create_command* - Creates a command extension directory structure within the
-  specified application.  This makes it easy to get started with adding a
-  command extension to your application.
-
-* *create_template_tags* - Creates a template tag directory structure within the
-  specified application.
-
-* *create_jobs* - Creates a Django jobs command directory structure for the
-  given app name in the current directory.  This is part of the impressive jobs
-  system.
-
-* *create_superuser* - Makes it easy to create a superuser for the
-  django.contrib.auth.
-
-* *clear_cache* - Clear django cache, useful when testing or deploying.
-
-* *describe_form* - Used to display a form definition for a model. Copy and
-  paste the contents into your forms.py and you're ready to go.
-
-* :doc:`dumpscript <dumpscript>` - Generates a Python script that will
-  repopulate the database using objects. The advantage of this approach is that
-  it is easy to understand, and more flexible than directly populating the
-  database, or using XML.
-
-* `export_emails`_ - export the email addresses for your
-  users in one of many formats.  Currently supports Address, Google, Outlook,
-  LinkedIn, and VCard formats.
-
-* *generate_secret_key* - Creates a new secret key that you can put in your
-  settings.py module.
-
-* `graph_models`_ - Creates a GraphViz_ dot file.  You need
-  to send this output to a file yourself.  Great for graphing your models. Pass
-  multiple application names to combine all the models into a single dot file.
-
-* *mail_debug* - Starts a mail server which echos out the contents of the email
-  instead of sending it.
-
-* *passwd* - Makes it easy to reset a user's password.
-
-* `print_settings`_ - Similar to ``diffsettings`` but shows *selected*
-  active Django settings or *all* if no args passed.
-
-* *print_user_for_session* - Print the user information for the provided
-  session key. this is very helpful when trying to track down the person who
-  experienced a site crash.
-
-* *reset_db* - Resets a database (currently sqlite3, mysql, postgres). Uses "DROP DATABASE" and "CREATE DATABASE".
-
-* *runjob* - Run a single maintenance job.  Part of the jobs system.
-
-* *runjobs* - Runs scheduled maintenance jobs. Specify hourly, daily, weekly,
-  monthly.  Part of the jobs system.
-
-* :doc:`runprofileserver <runprofileserver>` - Starts *runserver* with hotshot/profiling tools enabled.
-  I haven't had a chance to check this one out, but it looks really cool.
-
-* `runscript`_ - Runs a script in the django context.
-
-* `runserver_plus`_ - The standard runserver stuff but with
-  the Werkzeug debugger baked in. Requires Werkzeug_. This one kicks ass.
-
-* *set_fake_passwords* -  Sets all user passwords to a common value (*password* by default). *DEBUG only*.
-
-* *show_urls* - Displays the url routes that are defined in your project. Very
-  crude at this point.
-
-* :doc:`sqldiff` - Prints the (approximated) difference between an app's models and
-  what is in the database.  This is very nice, but also very experimental at
-  the moment.  It can not catch everything but it's a great sanity check.
-
-* :doc:`sqlcreate` - Generates the SQL to create your database for you, as specified
-  in settings.py.
-
-* `sync_s3`_ - Copies files found in settings.MEDIA_ROOT to S3.
-  Optionally can also gzip CSS and Javascript files and set the
-  Content-Encoding header, and also set a far future expires header for browser
-  caching.
-
-
-.. _`create_app`: create_app.html
-.. _`export_emails`: export_emails.html
-.. _`graph_models`: graph_models.html
-.. _`print_settings`: print_settings.html
-.. _`runscript`: runscript.html
-.. _`runserver_plus`: runserver_plus.html
-.. _`sync_s3`: sync_s3.html
-.. _GraphViz: http://www.graphviz.org/
-.. _Werkzeug: http://werkzeug.pocoo.org/

+ 0 - 41
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/create_app.txt

@@ -1,41 +0,0 @@
-create_app
-==========
-
-:synopsis: Creates an application directory structure for the specified application name.
-
-This command allows you to specify the --template option where you can indicate
-a template directory structure to use as your default.
-
-The --diagram option generates the models.py and admin.py from a .dia file.
-
-
-Example Usage
--------------
-
-All examples assume your current directory is the project directory and
-settings.py is under it.
-
-::
-
-  # Get command help
-  ./manage.py create_app --help
-
-::
-
-  # Generate models.py and admin.py from [APP_NAME].dia file. This file should
-  # be placed in the settings.py directory.
-  ./manage.py create_app -d APP_NAME
-
-
-Example generated from sample.dia
----------------------------------
-
-::
-
-  ./manage.py create_app --diagram=sample.dia webdata
-
--d switch or --diagram option use dia2django_ to generate models.py and is
-better documented in `django wiki`_.
-
-.. _dia2django: https://svn.devnull.li/main/pythonware/dia2django/trunk/doc/
-.. _`django wiki`: http://code.djangoproject.com/wiki/Dia2Django

+ 0 - 99
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/dumpscript.txt

@@ -1,99 +0,0 @@
-dumpscript
-==========
-
-:synopsis: Generates a standalone Python script that will repopulate the database using objects.
-
-The `dumpscript` command generates a standalone Python script that will
-repopulate the database using objects. The advantage of this approach is that
-it is easy to understand, and more flexible than directly populating the
-database, or using XML.
-
-Why?
-----
-
-There are a few benefits to this:
-
-* less drama with model evolution: foreign keys handled naturally without IDs,
-  new and removed columns are ignored
-* edit script to create 1,000s of generated entries using for loops, generated
-  names, python modules etc.
-
-For example, an edited script can populate the database with test data::
-
-  for i in xrange(2000):
-      poll = Poll()
-      poll.question = "Question #%d" % i
-      poll.pub_date = date(2001,01,01) + timedelta(days=i)
-      poll.save()
-
-Real databases will probably be bigger and more complicated so it is useful
-to enter some values using the admin interface and then edit the generated
-scripts.
-
-
-Features
---------
-
-* *ForeignKey* and *ManyToManyFields* (using python variables, not object IDs)
-* Self-referencing *ForeignKey* (and M2M) fields
-* Sub-classed models
-* *ContentType* fields and generic relationships (but see issue 43)
-* Recursive references
-* *AutoFields* are excluded
-* Parent models are only included when no other child model links to it
-* Individual models can be referenced
-
-
-What it can't do (yet!)
------------------------
-
-* Ideal handling of generic relationships (ie no *AutoField* references):
-  issue 43
-* Intermediate join tables: issue 48
-* GIS fields: issue 72
-
-
-How?
-----
-
-To dump the data from all the models in a given Django app (`appname`)::
-
-  $ ./manage.py dumpscript appname > scripts/testdata.py
-
-To dump the data from just a single model (`appname.ModelName`)::
-
-  $ ./manage.py dumpscript appname.ModelName > scripts/testdata.py
-
-To reset a given app, and reload with the saved data::
-
-  $ ./manage.py reset appname
-  $ ./manage.py runscript testdata
-
-Note: Runscript needs *scripts* to be a module, so create the directory and a
-*__init__.py* file.
-
-
-Caveats
--------
-
-Naming conflicts
-~~~~~~~~~~~~~~~~
-
-Please take care that when naming the output files these filenames do not
-clash with other names in your import path. For instance, if the appname is
-the same as the script name, an importerror can occur because rather than importing 
-the application modules it tries to load the modules from the dumpscript file itself.
-
-Examples::
-
-  # Wrong
-  $ ./manage.py dumpscript appname > dumps/appname.py
-  
-  # Right
-  $ ./manage.py dumpscript appname > dumps/appname_all.py
-  
-  # Right
-  $ ./manage.py dumpscript appname.Somemodel > dumps/appname_somemodel.py
-
-
-

+ 0 - 81
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/export_emails.txt

@@ -1,81 +0,0 @@
-export_emails
-=============
-
-:synopsis: export the email addresses for your users in one of many formats
-
-Most Django sites include a registered user base. There are times when you
-would like to import these e-mail addresses into other systems (generic mail
-program, GMail, google docs invites, give edit permissions, LinkedLn Group
-pre-approved listing). The export_emails command extension gives you this
-ability. The users exported can be filtered by Group name association.
-
-
-Example Usage
--------------
-
-::
-
-  # Export all the addresses in the '"First Last" <my@addr.com>;' format.
-  $ ./manage.py export_emails > addresses.txt
-
-::
-
-  # Export users from the group 'Attendees' in the linked in pre-approve Group csv format.
-  $ ./manage.py export_emails -g Attendees -f linkedin pycon08.csv
-
-::
-
-  # Create a csv file importable by GMail or Google Docs
-  $ ./manage.py export_emails --format=google google.csv
-
-
-Supported Formats
------------------
-
-address
-^^^^^^^
-
-This is the default basic text format. Each entry is on its own line in the
-format::
-
-  "First Last" <user@host.com>;
-
-This can be used with all known mail programs (that I know about anyway).
-
-
-google
-^^^^^^
-
-A CSV (comma separated value) format which Google applications can import.
-This can be used to import directly into GMail, a GMail mailing group, Google
-Docs invite (to read), Google Docs grant edit permissions, Google Calendar
-invites, etc.
-
-Only two columns are supplied. One for the person's name and one for the email address.
-This is also nice for importing into spreadsheets.
-
-
-outlook
-^^^^^^^
-
-A CSV (comma separated value) format which Outlook can parse and import.
-Supplies all the columns that Outlook 'requires', but only the name and email
-address are supplied.
-
-
-linkedin
-^^^^^^^^
-
-A CSV (comma separated value) format which can be imported by `LinkedIn Groups`_
-to pre-approve a list of people for joining the group.
-
-This supplies 3 columns: first name, last name, and email address. This is the
-best generic csv file for importing into spreadsheets as well.
-
-
-vcard
-^^^^^
-
-A vCard format which Apple Address Book can parse and import.
-
-.. _`LinkedIn Groups`: http://www.linkedin.com/static?key=groups_info

+ 0 - 37
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/field_extensions.txt

@@ -1,37 +0,0 @@
-Field Extensions
-================
-
-:synopsis: Current Field Extensions
-
-
-Current Database Model Field Extensions
----------------------------------------
-
-* *AutoSlugField* - AutoSlugfield will automatically create a unique slug
-  incrementing an appended number on the slug until it is unique. Inspired by
-  SmileyChris' Unique Slugify snippet.
-
-* *CreationDateTimeField* - DateTimeField that will automatically set its date
-  when the object is first saved to the database. Works in the same way as the
-  auto_now_add keyword.
-
-* *ModificationDateTimeField* - DateTimeField that will automatically set its
-  date when an object is saved to the database. Works in the same way as the
-  auto_now keyword.
-
-* *UUIDField* - UUIDField for Django, supports all uuid versions that are
-  natively supported by the uuid python module.
-
-  .. deprecated:: 1.4.7
-     Django 1.8 features a native UUIDField. Django-Extensions will support *UUIDField* until Django 1.7 becomes unsupported.
-
-* *PostgreSQLUUIDField* - UUIDField for Django, uses PostgreSQL uuid type.
-
-  .. deprecated:: 1.4.7
-     Django 1.8 features a native UUIDField. Django-Extensions will support *UUIDField* until Django 1.7 becomes unsupported.
-
-* *EncryptedCharField* - CharField which transparently encrypts its value as it goes in and out of the database.  Encryption is handled by `Keyczar <http://www.keyczar.org/>`_.  To use this field you must have Keyczar installed, have generated a primary encryption key, and have ``settings.ENCRYPTED_FIELD_KEYS_DIR`` set to the full path of your keys directory.
-
-* *EncryptedTextField* - CharField which transparently encrypts its value as it goes in and out of the database.  Encryption is handled by `Keyczar <http://www.keyczar.org/>`_.  To use this field you must have Keyczar installed, have generated a primary encryption key, and have ``settings.ENCRYPTED_FIELD_KEYS_DIR`` set to the full path of your keys directory.
-
-* *ShortUUIDField* - CharField which transparently generates a UUID and pass it to base57. It result in shorter 22 characters values useful e.g. for concise, unambiguous URLS. It's possible to get shorter values with length parameter: they are not Universal Unique any more but probability of collision is still low

+ 0 - 110
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/graph_models.txt

@@ -1,110 +0,0 @@
-Graph models
-============
-
-:synopsis: Renders a graphical overview of your project or specified apps.
-
-Creates a GraphViz_ dot file for the specified app names based on their models.py.
-You can pass multiple app names and they will all be combined into a single model.
-Output is usually directed to a dot file.
-
-Several options are available: grouping models, including inheritance,
-excluding models and columns, and changing the layout when rendering to an output
-image.
-
-With the latest revisions it's also possible to specify an output file if
-pygraphviz_ is installed and render directly to an image or other supported
-file-type.
-
-
-Selecting a library
--------------------
-
-You need to select the library to generate the image. You can do so by passing
-the --pygraphviz or --pydot parameter, depending on which library you want to use.
-
-When neither of the command line parameters are given the default is to try and load
-pygraphviz or pydot (in that order) to generate the image.
-
-To install pygraphviz you usually need to run this command::
-
-  $ pip install pygraphviz
-
-It is possible you can't install it because it needs some C extensions to build. In
-that case you can try other methods to install or you can use PyDot.
-
-To install pydot you need to run this command::
-
-  $ pip install pyparsing==1.5.7
-  $ pip install pydot
-
-Installation should be fast and easy. Remember to install this exact version of
-pyparsing, otherwise it's possible you get this error:
-
-    Couldn't import dot_parser, loading of dot files will not be possible.
-
-
-Default Settings
-----------------
-
-The option GRAPH_MODELS = {} can be used in the settings file to specify default options::
-
-  GRAPH_MODELS = {
-    'all_applications': True,
-    'group_models': True,
-  }
-
-It uses the same names as on the command line only with the leading two dashes removed and
-the other dashes replaced by underscores.
-
-
-Templates
----------
-
-Django templates are used to generate the dot code. This in turn can be drawn into a image
-by libraries like *pygraphviz* or *pydot*. You can extend or override the templates if needed.
-
-Templates used:
-
- - django_extensions/graph_models/digraph.dot
- - django_extensions/graph_models/label.dot
- - django_extensions/graph_models/relation.dot
-
-Documentation on how to create dot files can be found here: http://www.graphviz.org/Documentation.php
-
-.. warning::
-  Modifying Django's default templates behaviour might break *graph_models*
-
-  Please be aware that if you use any *template_loaders* or extensions that change the
-  way templates are rendered that this can cause *graph_models* to fail.
-
-  An example of this is
-  the Django app *django-template-minifier* this automatically removed the newlines before/after
-  template tags even for none-html templates which leads to a mallformed file.
-
-Example Usage
--------------
-
-With *django-extensions* installed you can create a dot-file or an
-image by using the *graph_models* command::
-
-  # Create a dot file
-  $ ./manage.py graph_models -a > my_project.dot
-
-::
-
-  # Create a PNG image file called my_project_visualized.png with application grouping
-  $ ./manage.py graph_models -a -g -o my_project_visualized.png
-
-  # Same example but with explicit selection of pygraphviz or pydot
-  $ ./manage.py graph_models --pygraphviz -a -g -o my_project_visualized.png
-  $ ./manage.py graph_models --pydot -a -g -o my_project_visualized.png
-
-::
-
-  # Create a dot file for only the 'foo' and 'bar' applications of your project
-  $ ./manage.py graph_models foo bar > my_project.dot
-
-
-.. _GraphViz: http://www.graphviz.org/
-.. _pygraphviz: https://networkx.lanl.gov/wiki/pygraphviz
-.. _pydot: https://pypi.python.org/pypi/pydot

+ 0 - 81
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/index.txt

@@ -1,81 +0,0 @@
-.. django-extensions documentation master file, created by
-   sphinx-quickstart on Wed Apr  1 20:39:40 2009.
-   You can adapt this file completely to your liking, but it should at least
-   contain the root `toctree` directive.
-
-Welcome to the django-extensions documentation!
-===============================================
-
-Django Extensions is a collection of custom extensions for the Django Framework.
-
-These include management commands, additional database fields, admin extensions and
-much more.
-
-`这篇文档当然还有中文版 <http://django-extensions-zh.readthedocs.org/zh_CN/latest/>`_
-
-Getting Started
-===============
-
-The easiest way to figure out what Django Extensions are all about is to watch the `excellent screencast by Eric Holscher`__. In a couple minutes Eric walks you through a half a dozen command extensions.
-
-Getting it
-==========
-
-You can get Django Extensions by using pip or easy_install::
-
- $ pip install django-extensions
- or
- $ easy_install django-extensions
-
-If you want to install it from source, grab the git repository and run setup.py::
-
- $ git clone git://github.com/django-extensions/django-extensions.git
- $ cd django-extensions
- $ python setup.py install
-
-For more detailed instructions check out our :doc:`installation_instructions`. Enjoy.
-
-Compatibility with versions of Python and Django
-=================================================
-
-We follow the Django guidelines for supported Python and Django versions. See more at `Django Supported Versions <https://docs.djangoproject.com/en/dev/internals/release-process/#supported-versions>`_
-
-This might mean the django-extensions may work with older or unsupported versions but we do not guarantee it and most likely will not fix bugs related to incompatibilities with older versions.
-
-At the time of writing we support: Python 2.6, 2.7 and 3.3. Django supported versions are 1.4, 1.5 and 1.6.
-
-Contents
-========
-
-.. toctree::
-   :maxdepth: 3
-
-   installation_instructions
-   command_extensions
-   command_extension_ideas
-   admin_extensions
-   shell_plus
-   create_app
-   dumpscript
-   runscript
-   export_emails
-   field_extensions
-   graph_models
-   jobs_scheduling
-   model_extensions
-   namespace_proposal
-   print_settings
-   runprofileserver
-   runserver_plus
-   sync_s3
-   sqldiff
-   sqlcreate
-   validate_templates
-
-
-Indices and tables
-==================
-
-* :ref:`search`
-
-__ http://ericholscher.com/blog/2008/sep/12/screencast-django-command-extensions/

+ 0 - 100
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/installation_instructions.txt

@@ -1,100 +0,0 @@
-Installation instructions
-=========================
-
-:synopsis: Installing django-extensions
-
-
-Download and installation
--------------------------
-
-Pip and easy_install
-^^^^^^^^^^^^^^^^^^^^
-
-You can use pip or easy_install to install django-extensions::
-
-  $ pip install django-extensions
-
-or::
-
-  $ easy_install django-extensions
-
-Download
-^^^^^^^^
-
-Download the latest packaged version from
-http://pypi.python.org/pypi/django-extensions/ and unpack it. Inside is a
-script called setup.py. Enter this command::
-
-  python setup.py install
-
-...and the package will install automatically.
-
-Installation
-^^^^^^^^^^^^
-
-You will need to add the *django_extensions* application to the INSTALLED_APPS
-setting of your Django project *settings.py* file.::
-
-  INSTALLED_APPS = (
-      ...
-      'django_extensions',
-  )
-
-This will make sure that Django finds the additional management commands
-provided by *django-extensions*.
-
-The next time you invoke *./manage.py help* you should be able to see all the
-newly available commands.
-
-Some commands or options require additional applications or python libraries,
-for example:
-
-  * 'export_emails' will require the *python vobject* module to create vcard
-    files.
-  * 'graph_models' requires *pygraphviz* to render directly to image file.
-
-If the given application or python library is not installed on your system (or
-not in the python path) the executed command will raise an exception and inform
-you of the missing dependency.
-
-Version Control
----------------
-
-Django-extensions is hosted on github::
-
- https://github.com/django-extensions/django-extensions
-
-Source code can be accessed by performing a Git clone.
-
-Tracking the development version of *django command extensions* should be
-pretty stable and will keep you up-to-date with the latests fixes.
-
-The following command will check the application's source code out to a
-directory called *django-extensions*:
-
-Git::
-
-  git clone git://github.com/django-extensions/django-extensions.git
-
-You should either install the resulting project with *python setup.py install*
-or put the *extensions* directory into your PYTHONPATH. The most common way
-is to symlink (junction, if you're on Windows) the extensions directory inside
-a directory which is on your PYTHONPATH, such as your python installation's
-site-packages directory.
-
-::
-
-  ln -sf /full/path/to/django-extensions/django_extensions /usr/lib/python2.7/site-packages/django_extensions
-
-You can verify that the application is available on your PYTHONPATH by opening a python interpreter and entering the following commands:
-
-::
-
-  >>> import django_extensions
-  >>> django_extensions.VERSION
-  (0, 8)
-
-Keep in mind that the current code in the git repository may be different from the
-packaged release. It may contain bugs and backwards-incompatible changes but most
-likely also new goodies to play with.
-

+ 0 - 49
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/jobs_scheduling.txt

@@ -1,49 +0,0 @@
-Jobs scheduling
-===============
-
-:synopsis: Documentation on creating/using jobs in Django-extensions
-
-
-JobsScheduling
---------------
-
-
-This page is very much a  Work In Progress
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Creating jobs works much like management commands work in Django.
-Use create_jobs to make a 'jobs' directory inside of an application.
-After that create one python file per job.
-
-Some simple examples are provided by the django_extensions.jobs package.
-
-A job is a python script with a mandatory Job class which extends from
-HourlyJob, DailyJob, WeeklyJob or MonthlyJob. It has one method that must be
-implemented called 'execute', which is called when the job is run.
-
-The following commands are related to jobs:
-
-* create_jobs, create the directory structure for jobs
-* runjob, run a single job
-* runjobs, run all hourly/daily/weekly/monthly jobs
-
-Use "runjob(s) -l" to list all jobs recognized.
-
-Jobs do not run automatically !
-
-You must either run a job manually specifying  the exact time on
-which the command is to be run, or use crontab: ::
-
-@hourly /path/to/my/project/manage.py runjobs hourly
-
-::
-
-@daily /path/to/my/project/manage.py runjobs daily
-
-::
-
-@weekly /path/to/my/project/manage.py runjobs weekly
-
-::
-
-@monthly /path/to/my/project/manage.py runjobs monthly

+ 0 - 11
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/model_extensions.txt

@@ -1,11 +0,0 @@
-Model extensions
-================
-
-:synopsis: Current Model Extensions
-
-
-Current Database Model Extensions
----------------------------------
-
-* *TimeStampedModel* - TimeStampedModel An abstract base class model that
-  provides self-managed "created" and "modified" fields.

+ 0 - 29
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/namespace_proposal.txt

@@ -1,29 +0,0 @@
-Namespace proposal
-==================
-
-:synopsis: Namespace Proposal
-
-
-Introduction
-------------
-
-Please change / write your proposal for splitting django_extensions into
-namespaces here.
-
-
-Proposal of a Namespace
------------------------
-
-Rough proposal for splitting into functional parts:
-
-* django_extensions.commands (20% that everbody uses / production)
-* django_extensions.commands.development (everything development)
-* django_extensions.commands.extra (not fitting about category's?)
-* django_extensions.db
-* django_extensions.templates
-* django_extensions.jobs
-
-The db part should be okay where it is right now. It's only used when
-somebody explicitly imports::
-
-  from django_extensions.db.models import something

+ 0 - 60
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/print_settings.txt

@@ -1,60 +0,0 @@
-print_settings
-==============
-
-:synopsis: Django managment command similar to ``diffsettings`` but shows *selected* active Django settings or *all* if no args passed.
-
-
-Introduction
-------------
-
-Django comes with a ``diffsettings`` command that shows how your project's
-settings differ from the Django defaults.  Sometimes it is useful to just see
-the settings that are in effect for your project. This is particularly
-true if you have a more complex system for settings than just a single
-:file:`settings.py` file. For example, you might have settings files that
-import other settings file, such as dev, test, and production settings files
-that source a base settings file.
-
-This command also supports dumping the data in a few different formats.
-
-More Info
----------------
-
-The simplest way to run it is with no arguments::
-
-    $ python manage.py print_settings
-
-Some variations::
-
-    $ python manage.py print_settings --format=json
-    $ python manage.py print_settings --format=yaml    # Requires PyYAML
-
-Show just selected settings::
-
-    $ python manage.py print_settings DEBUG INSTALLED_APPS
-    $ python manage.py print_settings DEBUG INSTALLED_APPS --format=pprint
-
-For more info, take a look at the built-in help::
-
-    $ python manage.py print_settings --help
-    Usage: manage.py print_settings [options]
-
-    Print the active Django settings.
-
-    Options:
-      -v VERBOSITY, --verbosity=VERBOSITY
-                            Verbosity level; 0=minimal output, 1=normal output,
-                            2=verbose output, 3=very verbose output
-      --settings=SETTINGS   The Python path to a settings module, e.g.
-                            "myproject.settings.main". If this isn't provided, the
-                            DJANGO_SETTINGS_MODULE environment variable will be
-                            used.
-      --pythonpath=PYTHONPATH
-                            A directory to add to the Python path, e.g.
-                            "/home/djangoprojects/myproject".
-      --traceback           Print traceback on exception
-      --format=FORMAT       Specifies output format.
-      --indent=INDENT       Specifies indent level for JSON and YAML
-      --version             show program's version number and exit
-      -h, --help            show this help message and exit
-

+ 0 - 86
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/runprofileserver.txt

@@ -1,86 +0,0 @@
-RunProfileServer
-================
-
-*We recommend that before you start profiling any language or
-framework you learn enough about it so that you feel comfortable with digging
-into its internals.*
-
-*Without sufficient knowledge it will not only be (very)
-hard but you're likely to make wrong assumptions (and fixes). As a rule of thumb,
-clean, well written code will help you a lot more than overzealous
-micro-optimizations will.*
-
-*This document is work in progress. If you feel you can help with
-better/clearer or additional information about profiling Django please leave a
-comment.*
-
-
-Introduction
-------------
-
-*runprofileserver* starts Django's runserver command with hotshot/profiling
-tools enabled. It will save .prof files containing the profiling information
-into the --prof-path directory. Note that for each request made one profile
-data file is saved.
-
-By default the profile-data-files are saved in /tmp use the --prof-path option
-to specify your own target directory. Saving the data in a meaningful directory
-structure helps to keep your profile data organized and keeps /tmp uncluttered. 
-(Yes this probably malfunctions systems such as Windows where /tmp does not exist)
-
-To define profile filenames use --prof-file option. Default format
-is "{path}.{duration:06d}ms.{time}" (Python
-`Format Specification <http://docs.python.org/3/library/string.html#formatspec>`_
-is used).
-
-Examples:
-
-  * "{time}-{path}-{duration}ms" - to order profile-data-files by request time
-  * "{duration:06d}ms.{path}.{time}" - to order by request duration
-
-gather_profile_stats.py
------------------------
-
-Django comes packed with a tool to aggregate these different prof files into
-one aggregated profile file. This tool is called *gather_profile_stats.py* and
-is located inside the *bin* directory of your Django distribution.
-
-
-KCacheGrind
------------
-
-Recent versions of *runprofileserver* have an option to save the profile data
-into a KCacheGrind compatible format. So you can use the excellent KCacheGrind
-tool for analyzing the profile data.
-
-Example::
-
-  $ mkdir /tmp/my-profile-data
-  $ ./manage.py runprofileserver --kcachegrind --prof-path=/tmp/my-profile-data
-  Validating models...
-  0 errors found
-
-  Django version 1.0-post-release-SVN-SVN-unknown, using settings 'complete_project.settings'
-  Development server is running at http://127.0.0.1:8000/
-  Quit the server with CONTROL-C.
-  [13/Nov/2008 06:29:38] "GET / HTTP/1.1" 200 41107
-  [13/Nov/2008 06:29:39] "GET /site_media/base.css?743 HTTP/1.1" 200 17227
-  [13/Nov/2008 06:29:39] "GET /site_media/logo.png HTTP/1.1" 200 3474
-  [13/Nov/2008 06:29:39] "GET /site_media/jquery.js HTTP/1.1" 200 31033
-  [13/Nov/2008 06:29:39] "GET /site_media/heading.png HTTP/1.1" 200 247
-  [13/Nov/2008 06:29:39] "GET /site_media/base.js HTTP/1.1" 200 751
-  <ctrl-c>
-  $ kcachegrind /tmp/my-profile-data/root.12574391.592.prof
-
-Here is a screenshot of how the above commands might look in KCacheGrind:
-
-  http://trbs.net/media/misc/django-runprofileserver-kcachegrind-full.jpg
-
-Links
------
-
-* http://code.djangoproject.com/wiki/ProfilingDjango
-* http://www.rkblog.rk.edu.pl/w/p/django-profiling-hotshot-and-kcachegrind/
-* http://code.djangoproject.com/browser/django/trunk/django/bin/profiling/gather_profile_stats.py
-* http://www.oluyede.org/blog/2007/03/07/profiling-django/
-* http://simonwillison.net/2008/May/22/debugging/

+ 0 - 88
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/runscript.txt

@@ -1,88 +0,0 @@
-RunScript
-=============
-
-:synopsis: Runs a script in the django context.
-
-
-Introduction
-------------
-
-The runscript command lets you run an arbritrary set of python commands within
-the django context. It offers the same usability and functionality as running a
-set of commands in shell accessed by::
-
-  $ python manage.py shell
-
-
-Getting Started
----------------
-
-To get started create a scripts directory in your project root, next to
-manage.py::
-
-  $ mkdir scripts
-  $ touch scripts/__init__.py
-
-Note: The *__init__.py* file is necessary so that the folder is picked up as a
-python package.
-
-Next, create a python file with the name of the script you want to run within
-the scripts directory::
-
-  $ touch scripts/delete_all_polls.py
-
-This file must implement a *run()* function. This is what gets called when you
-run the script. You can import any models or other parts of your django project
-to use in these scripts.
-
-For example::
-
-  # scripts/delete_all_polls.py
-
-  from Polls.models import Poll
-
-  def run():
-      # Get all polls
-      all_polls = Poll.objects.all()
-      # Delete polls
-      all_polls.delete()
-
-Note: You can put a script inside a *scripts* folder in any of your apps too.
-
-Usage
------
-
-To run any script you use the command *runscript* with the name of the script
-that you want to run.
-
-For example::
-
-  $ python manage.py runscript delete_all_polls
-
-Note: The command first checks for scripts in your apps i.e. *app_name/scripts*
-folder and runs them before checking for and running scripts in the
-*project_root/scripts* folder. You can have multiple scripts with the same name
-and they will all be run sequentially.
-
-Passing arguments
------------------
-
-You can pass arguments from the command line to your script by passing a comma-separated
-list of values with ``--script-args``. For example::
-
-  $ python manage.py runscript delete_all_polls --script-args=staleonly
-
-The list of argument values gets passed as arguments to your *run()* function. For
-example::
-
-  # scripts/delete_all_polls.py
-  
-  from Polls.models import Poll
-  
-  def run(*args):
-      # Get all polls
-      all_polls = Poll.object.all()
-      if 'staleonly' in args:
-          all_polls = all_polls.filter(active=False)
-      # Delete polls
-      all_polls.delete()

+ 0 - 152
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/runserver_plus.txt

@@ -1,152 +0,0 @@
-RunServerPlus
-=============
-
-:synopsis: RunServerPlus-typical runserver with Werkzeug debugger baked in
-
-
-Introduction
-------------
-
-This item requires that you have the `Werkzeug WSGI utilities` (version 0.3)
-installed.  Included with Werkzeug is a kick ass debugger that renders nice
-debugging tracebacks and adds an AJAX based debugger (which allows code execution 
-in the context of the traceback’s frames).  Additionally it provides a nice 
-access view to the source code.
-
-
-Getting Started
----------------
-
-To get started we just use the *runserver_plus* command instead of the normal
-*runserver* command::
-
-  $ python manage.py runserver_plus
-
-  * Running on http://127.0.0.1:8000/
-  * Restarting with reloader...
-
-  Validating models...
-  0 errors found
-
-  Django version 0.97-newforms-admin-SVN-unknown, using settings 'screencasts.settings'
-  Development server is running at http://127.0.0.1:8000/
-  Using the Werkzeug debugger (http://werkzeug.pocoo.org/)
-  Quit the server with CONTROL-C.
-
-Note: all normal runserver options apply. In other words, if you need to change
-the port number or the host information, you can do so like you would normally.
-
-
-Usage
------
-
-Instead of the default Django traceback page, the Werkzeug traceback page 
-will be shown when an exception occurs.
-
-.. image:: https://f.cloud.github.com/assets/202559/1261027/2637f826-2c22-11e3-83c6-646acc87808b.png
-    :alt: werkzeug-traceback
-
-Along with the typical traceback information we have a couple of options. These
-options appear when hovering over a particular traceback line.  Notice that
-two buttons appear to the right:
-
-.. image:: https://f.cloud.github.com/assets/202559/1261035/558ad0ee-2c22-11e3-8ddd-6678d84d77e7.png
-    :alt: werkzeug-options
-
-The options are:
-
-
-View Source
-^^^^^^^^^^^
-
-This displays the source underneath the traceback:
-
-.. image:: https://f.cloud.github.com/assets/202559/1261036/583c8c42-2c22-11e3-9eb9-5c16b8732512.png
-    :alt: werkzeug-source
-
-Being able to view the source file is handy because it provides more
-context information around the error.  The actual traceback areas are 
-highlighted so they are easy to spot.
-
-One awkward aspect of th UI is that the page is not scrolled to the bottom.
-At first I thought nothing was happening because of this.
-
-
-Interactive Debugging Console
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Clicking on this button opens up a new pane under the traceback line
-you're on. This is the money shot:
-
-.. image:: https://f.cloud.github.com/assets/202559/1261037/5d12eda6-2c22-11e3-802a-2639ff8813fa.png
-    :alt: werkzeug-debugger
-
-An ajax based console appears in the pane and you can start debugging.
-Notice in the screenshot above I did a `print environ` to see what was in the
-environment parameter coming into the function.
-
-*WARNING*: This should *never* be used in any kind of production environment.
-Not even for a quick problem check.  I cannot emphasize this enough. The
-interactive debugger allows you to evaluate python code right against the
-server.  You've been warned.
-
-.. _`Werkzeug WSGI utilities`: http://werkzeug.pocoo.org/
-
-
-SSL
-^^^
-
-runserver_plus also supports SSL, so that you can easily debug bugs that to pop up 
-when https is used. To use SSL simply provide a file name for certificates;  
-a key and certificate file will be automatically generated::
-
-  $ python manage.py runserver_plus --cert cert
-  Validating models...
-  0 errors found
-
-  Django version 1.6.dev20130122125534, using settings 'mysite.settings'
-  Development server is running at http://127.0.0.1:8000/
-  Using the Werkzeug debugger (http://werkzeug.pocoo.org/)
-  Quit the server with CONTROL-C.
-   * Running on https://127.0.0.1:8000/
-   * Restarting with reloader
-  Validating models...
-  0 errors found
-
-  Django version 1.6.dev20130122125534, using settings 'mysite.settings'
-  Development server is running at http://127.0.0.1:8000/
-  Using the Werkzeug debugger (http://werkzeug.pocoo.org/)
-  Quit the server with CONTROL-C.
-  
-After running this command, your web application can be accessed through 
-https://127.0.0.1:8000. 
-
-You will also find that two files are created in  the current working directory: 
-a key file and a certificate file. If you run the above command again, these 
-certificate files will be reused so that you do not have to keep accepting the 
-self-generated certificates from your browser every time. You can also provide 
-a specific file for the certificate to be used if you already have one::
-
-  $ python manage.py runserver_plus --cert /tmp/cert 
-  
-Note that you need the OpenSSL library to use SSL, and Werkzeug 0.9 or later 
-if you want to reuse existing certificates. 
-
-To install OpenSSL::
-
-  $ pip install pyOpenSSL
-
-Configuration
-^^^^^^^^^^^^^
-
-The `RUNSERVERPLUS_SERVER_ADDRESS_PORT` setting can be configured to specify
-which address and port the development server should bind to.
-
-If you find yourself frequently starting the server with::
-
-  $ python manage.py runserver_plus 0.0.0.0:8000 
-
-You can use settings to automatically default your development to an address/port::
-
-    RUNSERVERPLUS_SERVER_ADDRESS_PORT = '0.0.0.0:8000'
-

+ 0 - 126
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/shell_plus.txt

@@ -1,126 +0,0 @@
-shell_plus
-==========
-
-:synopsis: Django shell with autoloading of the apps database models
-
-
-Interactive Python Shells
--------------------------
-
-There is support for three different types of interactive python shells.
-
-IPython::
-
-  $ ./manage.py shell_plus --ipython
-
-
-BPython::
-
-  $ ./manage.py shell_plus --bpython
-
-
-Python::
-
-  $ ./manage.py shell_plus --plain
-
-
-The default resolution order is: bpython, ipython, python.
-
-You can also set the configuration option SHELL_PLUS to explicitly specify which version you want.
-
-::
-
-  # Always use IPython for shell_plus
-  SHELL_PLUS = "ipython"
-
-
-
-Configuration
--------------
-
-Sometimes, models from your own apps and other people's apps have colliding names,
-or you may want to completely skip loading an app's models. Here are some examples of how to do that.
-
-Note: These settings are only used inside shell_plus and will not affect your environment.
-
-::
-
-  # Rename the automatic loaded module Messages in the app blog to blog_messages.
-  SHELL_PLUS_MODEL_ALIASES = {'blog': {'Messages': 'blog_messages'},}
-  }
-
-::
-
-  # Dont load the 'sites' app, and skip the model 'pictures' in the app 'blog'
-  SHELL_PLUS_DONT_LOAD = ['sites', 'blog.pictures']
-  }
-
-
-You can also combine model_aliases and dont_load.
-
-It is possible to ignore autoloaded modules when using manage.py, like::
-
-  $ ./manage.py shell_plus --dont-load app1 --dont-load app2.module1
-
-Commandline parameters and settings in the configuration file are merged, so you can
-safely append modules to ignore from the commandline for one-time usage.
-
-It is possible to use `IPython Notebook`_, an interactive Python shell which
-uses a web browser as its user interface, as an alternative shell::
-
-    $ ./manage.py shell_plus --notebook
-
-The Django settings module and database models are auto-loaded into the
-interactive shell's global namespace also for IPython Notebook.
-
-Auto-loading is done by a custom IPython extension which is activated by
-default by passing the
-``--ext django_extensions.management.notebook_extension``
-argument to the Notebook.  If you need to pass custom options to the IPython
-Notebook, you can override the default options in your Django settings using
-the ``IPYTHON_ARGUMENTS`` setting.  For example::
-
-    IPYTHON_ARGUMENTS = [
-        '--ext', 'django_extensions.management.notebook_extension',
-        '--ext', 'myproject.notebook_extension',
-        '--debug',
-    ]
-
-To activate auto-loading, remember to either include the django-extensions' default
-notebook extension or copy its auto-loading code into your own extension.
-
-Note that the IPython Notebook feature doesn't currently honor the
-``--dont-load`` option.
-
-.. _`IPython Notebook`: http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html
-
-
-
-Additional Imports
-------------------
-
-In addition to importing the models you can specify other items to import by default.
-These are specified in SHELL_PLUS_PRE_IMPORTS and SHELL_PLUS_POST_IMPORTS. The former is imported
-before any other imports (such as the default models import) and the latter is imported after any
-other imports. Both have similar syntax. So in your settings.py file:
-
-::
-
-    SHELL_PLUS_PRE_IMPORTS = (
-        ('module.submodule1', ('class1', 'function2')),
-        ('module.submodule2', 'function3'),
-        ('module.submodule3', '*'),
-        'module.submodule4'
-    )
-
-The above example would directly translate to the following python code which would be executed before
-the automatic imports:
-
-::
-
-    from module.submodule1 import class1, function2
-    from module.submodule2 import function3
-    from module.submodule3 import *
-    import module.submodule4
-
-These symbols will be available as soon as the shell starts.

+ 0 - 45
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/sqlcreate.txt

@@ -1,45 +0,0 @@
-sqlcreate
-==========
-
-:synopsis: Helps you setup your database(s) more easily
-
-
-Introduction
--------------
-
-Stop creating databases by hand.  Your settings.py file already contains the correct
-information, so DRY.
-
-Usage
--------------
-
-  $ python manage.py sqlcreate [--router=<routername>] | <my_database_shell_command>
-  
-It will spit out SQL which you can review (if you want). Ultimately you want to
-pipe it into the database shell command of your choice.
-
-If there were a good way to ensure that the user in the database settings had the
-proper permissions, we could submit the commands straight to the database.
-However, due to the nature of this portion of the project setup, that will never happen.
-
-Example
--------------
-
-PostgreSQL
-~~~~~~~~~~
-  $ ./manage.py sqlcreate [--router=<routername>] | psql -U <db_administrator> -W
-  
-
-MySQL
-~~~~~
-  $ ./manage.py sqlcreate [--router=<routername>] | mysql -u <db_administrator> -p
-  
-
-Known Issues
-------------
-
- * CREATE DATABASE is not SQL standard so might not work everywhere.
- * When using fallback user is not created and password is not set.
-   But it does try to do a GRANT to the database user.
- * Missing options for tablespaces, etc.
-

+ 0 - 44
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/sqldiff.txt

@@ -1,44 +0,0 @@
-sqldiff
-=======
-
-:synopsis: Prints the ALTER TABLE statements for the given appnames.
-
-Django command that scans all models for the given appnames and compares
-their database schema with the real database tables.
-
-It indicates how columns in the database are different from the SQL that would
-be generated by Django. This command is not a database migration tool, though
-it might certainly be of help during migrations. Its purpose is to show the
-current differences as a way to check or debug your models compared to
-the real database tables and columns.
-
-Supported Databases
--------------------
-
-Currently the following databases are supported:
-
-* PostgreSQL
-* Sqlite3
-* MySQL
-* Oracle
-
-Patches to support other databases are welcome! :-)
-
-Exit Codes
-----------
-
-Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
-
-
-Example Usage
--------------
-
-::
-
-  # View SQL differences for all installed applications
-  $ ./manage.py sqldiff -a
-
-::
-
-  # View SQL differences for all installed applications using text instead of SQL
-  $ ./manage.py sqldiff -a -t

+ 0 - 70
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/sync_s3.txt

@@ -1,70 +0,0 @@
-sync_s3
-=======
-
-:synopsis: sync your MEDIA_ROOT and STATIC_ROOT folders to S3
-
-Django command that scans all files in your settings.MEDIA_ROOT and
-settings.STATIC_ROOT folders, then uploads them to S3 with the same
-directory structure.
-
-This command can optionally do the following but it is off by default:
-
-  * gzip compress any CSS and Javascript files it finds and adds the
-    appropriate 'Content-Encoding' header.
-  * set a far future 'Expires' header for optimal caching.
-  * upload only media or static files.
-  * use any other provider compatible with Amazon S3.
-  * set other than 'public-read' ACL.
-
-Example Usage
--------------
-
-::
-
-  # Upload files to S3 into the bucket 'mybucket'
-  $ ./manage.py sync_s3 mybucket
-
-::
-
-  # Upload files to S3 into the bucket 'mybucket' and enable gzipping CSS/JS files and setting of a far future expires header
-  $ ./manage.py sync_s3 mybucket --gzip --expires
-
-::
-
-  # Upload only media files to S3 into the bucket 'mybucket'
-  $ ./manage.py sync_s3 mybucket  --media-only  # or --static-only
-
-::
-
-  # Upload only media files to a S3 compatible provider into the bucket 'mybucket' and set private file ACLs
-  $ ./manage.py sync_s3 mybucket  --media-only  --s3host=cs.example.com --acl=private
-
-Required libraries and settings
--------------------------------
-
-This management command requires the boto library and was tested with version
-1.4c:
-
-  https://github.com/boto/boto
-
-It also requires an account with Amazon Web Services (AWS) and the AWS S3 keys.
-Bucket name is required and cannot be empty.
-The keys and bucket name are added to your settings.py file, for example::
-
-  # settings.py
-  AWS_ACCESS_KEY_ID = ''
-  AWS_SECRET_ACCESS_KEY = ''
-  AWS_BUCKET_NAME = 'bucket'
-
-Optional settings
------------------
-
-It is possible to customize sync_s3 directly from django settings file, for example::
-
-  # settings.py
-  AWS_S3_HOST = 'cs.example.com'
-  AWS_DEFAULT_ACL = 'private'
-  SYNC_S3_PREFIX = 'some_prefix'
-  FILTER_LIST = 'dir1, dir2'
-  AWS_CLOUDFRONT_DISTRIBUTION = 'E27LVI50CSW06W'
-  SYNC_S3_RENAME_GZIP_EXT = '.gz'

+ 0 - 38
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_sources/validate_templates.txt

@@ -1,38 +0,0 @@
-validate_templates
-==================
-
-:synopsis: Checks templates on syntax or compile errors.
-
-Options
--------
-
-verbosity
-~~~~~~~~~
-A higher verbosity level will print out all the files that are processed 
-instead of only the ones that contain errors.
-
-break
-~~~~~
-Do not continue scanning other templates after the first failure.
-
-includes
-~~~~~~~~
-Use -i (can be used multiple times) to add directories to the TEMPLATE_DIRS.
-
-Settings
---------
-
-VALIDATE_TEMPLATES_EXTRA_TEMPLATE_DIRS
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-You can use `VALIDATE_TEMPLATES_EXTRA_TEMPLATE_DIRS` to include a number of template 
-dirs by default directly from the settings file. This can be useful for situations 
-where TEMPLATE_DIRS is dynamically generated or switched in middleware, or when you 
-have other template dirs for external applications like celery, and you want to 
-check those as well.
-
-Usage Example
--------------
-
- ./manage.py validate_templates
-

BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/ajax-loader.gif


+ 0 - 537
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/basic.css

@@ -1,537 +0,0 @@
-/*
- * basic.css
- * ~~~~~~~~~
- *
- * Sphinx stylesheet -- basic theme.
- *
- * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/* -- main layout ----------------------------------------------------------- */
-
-div.clearer {
-    clear: both;
-}
-
-/* -- relbar ---------------------------------------------------------------- */
-
-div.related {
-    width: 100%;
-    font-size: 90%;
-}
-
-div.related h3 {
-    display: none;
-}
-
-div.related ul {
-    margin: 0;
-    padding: 0 0 0 10px;
-    list-style: none;
-}
-
-div.related li {
-    display: inline;
-}
-
-div.related li.right {
-    float: right;
-    margin-right: 5px;
-}
-
-/* -- sidebar --------------------------------------------------------------- */
-
-div.sphinxsidebarwrapper {
-    padding: 10px 5px 0 10px;
-}
-
-div.sphinxsidebar {
-    float: left;
-    width: 230px;
-    margin-left: -100%;
-    font-size: 90%;
-}
-
-div.sphinxsidebar ul {
-    list-style: none;
-}
-
-div.sphinxsidebar ul ul,
-div.sphinxsidebar ul.want-points {
-    margin-left: 20px;
-    list-style: square;
-}
-
-div.sphinxsidebar ul ul {
-    margin-top: 0;
-    margin-bottom: 0;
-}
-
-div.sphinxsidebar form {
-    margin-top: 10px;
-}
-
-div.sphinxsidebar input {
-    border: 1px solid #98dbcc;
-    font-family: sans-serif;
-    font-size: 1em;
-}
-
-div.sphinxsidebar #searchbox input[type="text"] {
-    width: 170px;
-}
-
-div.sphinxsidebar #searchbox input[type="submit"] {
-    width: 30px;
-}
-
-img {
-    border: 0;
-    max-width: 100%;
-}
-
-/* -- search page ----------------------------------------------------------- */
-
-ul.search {
-    margin: 10px 0 0 20px;
-    padding: 0;
-}
-
-ul.search li {
-    padding: 5px 0 5px 20px;
-    background-image: url(file.png);
-    background-repeat: no-repeat;
-    background-position: 0 7px;
-}
-
-ul.search li a {
-    font-weight: bold;
-}
-
-ul.search li div.context {
-    color: #888;
-    margin: 2px 0 0 30px;
-    text-align: left;
-}
-
-ul.keywordmatches li.goodmatch a {
-    font-weight: bold;
-}
-
-/* -- index page ------------------------------------------------------------ */
-
-table.contentstable {
-    width: 90%;
-}
-
-table.contentstable p.biglink {
-    line-height: 150%;
-}
-
-a.biglink {
-    font-size: 1.3em;
-}
-
-span.linkdescr {
-    font-style: italic;
-    padding-top: 5px;
-    font-size: 90%;
-}
-
-/* -- general index --------------------------------------------------------- */
-
-table.indextable {
-    width: 100%;
-}
-
-table.indextable td {
-    text-align: left;
-    vertical-align: top;
-}
-
-table.indextable dl, table.indextable dd {
-    margin-top: 0;
-    margin-bottom: 0;
-}
-
-table.indextable tr.pcap {
-    height: 10px;
-}
-
-table.indextable tr.cap {
-    margin-top: 10px;
-    background-color: #f2f2f2;
-}
-
-img.toggler {
-    margin-right: 3px;
-    margin-top: 3px;
-    cursor: pointer;
-}
-
-div.modindex-jumpbox {
-    border-top: 1px solid #ddd;
-    border-bottom: 1px solid #ddd;
-    margin: 1em 0 1em 0;
-    padding: 0.4em;
-}
-
-div.genindex-jumpbox {
-    border-top: 1px solid #ddd;
-    border-bottom: 1px solid #ddd;
-    margin: 1em 0 1em 0;
-    padding: 0.4em;
-}
-
-/* -- general body styles --------------------------------------------------- */
-
-a.headerlink {
-    visibility: hidden;
-}
-
-h1:hover > a.headerlink,
-h2:hover > a.headerlink,
-h3:hover > a.headerlink,
-h4:hover > a.headerlink,
-h5:hover > a.headerlink,
-h6:hover > a.headerlink,
-dt:hover > a.headerlink {
-    visibility: visible;
-}
-
-div.body p.caption {
-    text-align: inherit;
-}
-
-div.body td {
-    text-align: left;
-}
-
-.field-list ul {
-    padding-left: 1em;
-}
-
-.first {
-    margin-top: 0 !important;
-}
-
-p.rubric {
-    margin-top: 30px;
-    font-weight: bold;
-}
-
-img.align-left, .figure.align-left, object.align-left {
-    clear: left;
-    float: left;
-    margin-right: 1em;
-}
-
-img.align-right, .figure.align-right, object.align-right {
-    clear: right;
-    float: right;
-    margin-left: 1em;
-}
-
-img.align-center, .figure.align-center, object.align-center {
-  display: block;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-.align-left {
-    text-align: left;
-}
-
-.align-center {
-    text-align: center;
-}
-
-.align-right {
-    text-align: right;
-}
-
-/* -- sidebars -------------------------------------------------------------- */
-
-div.sidebar {
-    margin: 0 0 0.5em 1em;
-    border: 1px solid #ddb;
-    padding: 7px 7px 0 7px;
-    background-color: #ffe;
-    width: 40%;
-    float: right;
-}
-
-p.sidebar-title {
-    font-weight: bold;
-}
-
-/* -- topics ---------------------------------------------------------------- */
-
-div.topic {
-    border: 1px solid #ccc;
-    padding: 7px 7px 0 7px;
-    margin: 10px 0 10px 0;
-}
-
-p.topic-title {
-    font-size: 1.1em;
-    font-weight: bold;
-    margin-top: 10px;
-}
-
-/* -- admonitions ----------------------------------------------------------- */
-
-div.admonition {
-    margin-top: 10px;
-    margin-bottom: 10px;
-    padding: 7px;
-}
-
-div.admonition dt {
-    font-weight: bold;
-}
-
-div.admonition dl {
-    margin-bottom: 0;
-}
-
-p.admonition-title {
-    margin: 0px 10px 5px 0px;
-    font-weight: bold;
-}
-
-div.body p.centered {
-    text-align: center;
-    margin-top: 25px;
-}
-
-/* -- tables ---------------------------------------------------------------- */
-
-table.docutils {
-    border: 0;
-    border-collapse: collapse;
-}
-
-table.docutils td, table.docutils th {
-    padding: 1px 8px 1px 5px;
-    border-top: 0;
-    border-left: 0;
-    border-right: 0;
-    border-bottom: 1px solid #aaa;
-}
-
-table.field-list td, table.field-list th {
-    border: 0 !important;
-}
-
-table.footnote td, table.footnote th {
-    border: 0 !important;
-}
-
-th {
-    text-align: left;
-    padding-right: 5px;
-}
-
-table.citation {
-    border-left: solid 1px gray;
-    margin-left: 1px;
-}
-
-table.citation td {
-    border-bottom: none;
-}
-
-/* -- other body styles ----------------------------------------------------- */
-
-ol.arabic {
-    list-style: decimal;
-}
-
-ol.loweralpha {
-    list-style: lower-alpha;
-}
-
-ol.upperalpha {
-    list-style: upper-alpha;
-}
-
-ol.lowerroman {
-    list-style: lower-roman;
-}
-
-ol.upperroman {
-    list-style: upper-roman;
-}
-
-dl {
-    margin-bottom: 15px;
-}
-
-dd p {
-    margin-top: 0px;
-}
-
-dd ul, dd table {
-    margin-bottom: 10px;
-}
-
-dd {
-    margin-top: 3px;
-    margin-bottom: 10px;
-    margin-left: 30px;
-}
-
-dt:target, .highlighted {
-    background-color: #fbe54e;
-}
-
-dl.glossary dt {
-    font-weight: bold;
-    font-size: 1.1em;
-}
-
-.field-list ul {
-    margin: 0;
-    padding-left: 1em;
-}
-
-.field-list p {
-    margin: 0;
-}
-
-.optional {
-    font-size: 1.3em;
-}
-
-.versionmodified {
-    font-style: italic;
-}
-
-.system-message {
-    background-color: #fda;
-    padding: 5px;
-    border: 3px solid red;
-}
-
-.footnote:target  {
-    background-color: #ffa;
-}
-
-.line-block {
-    display: block;
-    margin-top: 1em;
-    margin-bottom: 1em;
-}
-
-.line-block .line-block {
-    margin-top: 0;
-    margin-bottom: 0;
-    margin-left: 1.5em;
-}
-
-.guilabel, .menuselection {
-    font-family: sans-serif;
-}
-
-.accelerator {
-    text-decoration: underline;
-}
-
-.classifier {
-    font-style: oblique;
-}
-
-abbr, acronym {
-    border-bottom: dotted 1px;
-    cursor: help;
-}
-
-/* -- code displays --------------------------------------------------------- */
-
-pre {
-    overflow: auto;
-    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
-}
-
-td.linenos pre {
-    padding: 5px 0px;
-    border: 0;
-    background-color: transparent;
-    color: #aaa;
-}
-
-table.highlighttable {
-    margin-left: 0.5em;
-}
-
-table.highlighttable td {
-    padding: 0 0.5em 0 0.5em;
-}
-
-tt.descname {
-    background-color: transparent;
-    font-weight: bold;
-    font-size: 1.2em;
-}
-
-tt.descclassname {
-    background-color: transparent;
-}
-
-tt.xref, a tt {
-    background-color: transparent;
-    font-weight: bold;
-}
-
-h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
-    background-color: transparent;
-}
-
-.viewcode-link {
-    float: right;
-}
-
-.viewcode-back {
-    float: right;
-    font-family: sans-serif;
-}
-
-div.viewcode-block:target {
-    margin: -1px -10px;
-    padding: 0 10px;
-}
-
-/* -- math display ---------------------------------------------------------- */
-
-img.math {
-    vertical-align: middle;
-}
-
-div.body div.math p {
-    text-align: center;
-}
-
-span.eqno {
-    float: right;
-}
-
-/* -- printout stylesheet --------------------------------------------------- */
-
-@media print {
-    div.document,
-    div.documentwrapper,
-    div.bodywrapper {
-        margin: 0 !important;
-        width: 100%;
-    }
-
-    div.sphinxsidebar,
-    div.related,
-    div.footer,
-    #top-link {
-        display: none;
-    }
-}

BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/comment-bright.png


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/comment-close.png


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/comment.png


+ 0 - 256
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/default.css

@@ -1,256 +0,0 @@
-/*
- * default.css_t
- * ~~~~~~~~~~~~~
- *
- * Sphinx stylesheet -- default theme.
- *
- * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-@import url("basic.css");
-
-/* -- page layout ----------------------------------------------------------- */
-
-body {
-    font-family: sans-serif;
-    font-size: 100%;
-    background-color: #11303d;
-    color: #000;
-    margin: 0;
-    padding: 0;
-}
-
-div.document {
-    background-color: #1c4e63;
-}
-
-div.documentwrapper {
-    float: left;
-    width: 100%;
-}
-
-div.bodywrapper {
-    margin: 0 0 0 230px;
-}
-
-div.body {
-    background-color: #ffffff;
-    color: #000000;
-    padding: 0 20px 30px 20px;
-}
-
-div.footer {
-    color: #ffffff;
-    width: 100%;
-    padding: 9px 0 9px 0;
-    text-align: center;
-    font-size: 75%;
-}
-
-div.footer a {
-    color: #ffffff;
-    text-decoration: underline;
-}
-
-div.related {
-    background-color: #133f52;
-    line-height: 30px;
-    color: #ffffff;
-}
-
-div.related a {
-    color: #ffffff;
-}
-
-div.sphinxsidebar {
-}
-
-div.sphinxsidebar h3 {
-    font-family: 'Trebuchet MS', sans-serif;
-    color: #ffffff;
-    font-size: 1.4em;
-    font-weight: normal;
-    margin: 0;
-    padding: 0;
-}
-
-div.sphinxsidebar h3 a {
-    color: #ffffff;
-}
-
-div.sphinxsidebar h4 {
-    font-family: 'Trebuchet MS', sans-serif;
-    color: #ffffff;
-    font-size: 1.3em;
-    font-weight: normal;
-    margin: 5px 0 0 0;
-    padding: 0;
-}
-
-div.sphinxsidebar p {
-    color: #ffffff;
-}
-
-div.sphinxsidebar p.topless {
-    margin: 5px 10px 10px 10px;
-}
-
-div.sphinxsidebar ul {
-    margin: 10px;
-    padding: 0;
-    color: #ffffff;
-}
-
-div.sphinxsidebar a {
-    color: #98dbcc;
-}
-
-div.sphinxsidebar input {
-    border: 1px solid #98dbcc;
-    font-family: sans-serif;
-    font-size: 1em;
-}
-
-
-
-/* -- hyperlink styles ------------------------------------------------------ */
-
-a {
-    color: #355f7c;
-    text-decoration: none;
-}
-
-a:visited {
-    color: #355f7c;
-    text-decoration: none;
-}
-
-a:hover {
-    text-decoration: underline;
-}
-
-
-
-/* -- body styles ----------------------------------------------------------- */
-
-div.body h1,
-div.body h2,
-div.body h3,
-div.body h4,
-div.body h5,
-div.body h6 {
-    font-family: 'Trebuchet MS', sans-serif;
-    background-color: #f2f2f2;
-    font-weight: normal;
-    color: #20435c;
-    border-bottom: 1px solid #ccc;
-    margin: 20px -20px 10px -20px;
-    padding: 3px 0 3px 10px;
-}
-
-div.body h1 { margin-top: 0; font-size: 200%; }
-div.body h2 { font-size: 160%; }
-div.body h3 { font-size: 140%; }
-div.body h4 { font-size: 120%; }
-div.body h5 { font-size: 110%; }
-div.body h6 { font-size: 100%; }
-
-a.headerlink {
-    color: #c60f0f;
-    font-size: 0.8em;
-    padding: 0 4px 0 4px;
-    text-decoration: none;
-}
-
-a.headerlink:hover {
-    background-color: #c60f0f;
-    color: white;
-}
-
-div.body p, div.body dd, div.body li {
-    text-align: justify;
-    line-height: 130%;
-}
-
-div.admonition p.admonition-title + p {
-    display: inline;
-}
-
-div.admonition p {
-    margin-bottom: 5px;
-}
-
-div.admonition pre {
-    margin-bottom: 5px;
-}
-
-div.admonition ul, div.admonition ol {
-    margin-bottom: 5px;
-}
-
-div.note {
-    background-color: #eee;
-    border: 1px solid #ccc;
-}
-
-div.seealso {
-    background-color: #ffc;
-    border: 1px solid #ff6;
-}
-
-div.topic {
-    background-color: #eee;
-}
-
-div.warning {
-    background-color: #ffe4e4;
-    border: 1px solid #f66;
-}
-
-p.admonition-title {
-    display: inline;
-}
-
-p.admonition-title:after {
-    content: ":";
-}
-
-pre {
-    padding: 5px;
-    background-color: #eeffcc;
-    color: #333333;
-    line-height: 120%;
-    border: 1px solid #ac9;
-    border-left: none;
-    border-right: none;
-}
-
-tt {
-    background-color: #ecf0f3;
-    padding: 0 1px 0 1px;
-    font-size: 0.95em;
-}
-
-th {
-    background-color: #ede;
-}
-
-.warning tt {
-    background: #efc2c2;
-}
-
-.note tt {
-    background: #d6d6d6;
-}
-
-.viewcode-back {
-    font-family: sans-serif;
-}
-
-div.viewcode-block:target {
-    background-color: #f4debf;
-    border-top: 1px solid #ac9;
-    border-bottom: 1px solid #ac9;
-}

+ 0 - 238
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/doctools.js

@@ -1,238 +0,0 @@
-/*
- * doctools.js
- * ~~~~~~~~~~~
- *
- * Sphinx JavaScript utilities for all documentation.
- *
- * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/**
- * select a different prefix for underscore
- */
-$u = _.noConflict();
-
-/**
- * make the code below compatible with browsers without
- * an installed firebug like debugger
-if (!window.console || !console.firebug) {
-  var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
-    "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
-    "profile", "profileEnd"];
-  window.console = {};
-  for (var i = 0; i < names.length; ++i)
-    window.console[names[i]] = function() {};
-}
- */
-
-/**
- * small helper function to urldecode strings
- */
-jQuery.urldecode = function(x) {
-  return decodeURIComponent(x).replace(/\+/g, ' ');
-};
-
-/**
- * small helper function to urlencode strings
- */
-jQuery.urlencode = encodeURIComponent;
-
-/**
- * This function returns the parsed url parameters of the
- * current request. Multiple values per key are supported,
- * it will always return arrays of strings for the value parts.
- */
-jQuery.getQueryParameters = function(s) {
-  if (typeof s == 'undefined')
-    s = document.location.search;
-  var parts = s.substr(s.indexOf('?') + 1).split('&');
-  var result = {};
-  for (var i = 0; i < parts.length; i++) {
-    var tmp = parts[i].split('=', 2);
-    var key = jQuery.urldecode(tmp[0]);
-    var value = jQuery.urldecode(tmp[1]);
-    if (key in result)
-      result[key].push(value);
-    else
-      result[key] = [value];
-  }
-  return result;
-};
-
-/**
- * highlight a given string on a jquery object by wrapping it in
- * span elements with the given class name.
- */
-jQuery.fn.highlightText = function(text, className) {
-  function highlight(node) {
-    if (node.nodeType == 3) {
-      var val = node.nodeValue;
-      var pos = val.toLowerCase().indexOf(text);
-      if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
-        var span = document.createElement("span");
-        span.className = className;
-        span.appendChild(document.createTextNode(val.substr(pos, text.length)));
-        node.parentNode.insertBefore(span, node.parentNode.insertBefore(
-          document.createTextNode(val.substr(pos + text.length)),
-          node.nextSibling));
-        node.nodeValue = val.substr(0, pos);
-      }
-    }
-    else if (!jQuery(node).is("button, select, textarea")) {
-      jQuery.each(node.childNodes, function() {
-        highlight(this);
-      });
-    }
-  }
-  return this.each(function() {
-    highlight(this);
-  });
-};
-
-/**
- * Small JavaScript module for the documentation.
- */
-var Documentation = {
-
-  init : function() {
-    this.fixFirefoxAnchorBug();
-    this.highlightSearchWords();
-    this.initIndexTable();
-  },
-
-  /**
-   * i18n support
-   */
-  TRANSLATIONS : {},
-  PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
-  LOCALE : 'unknown',
-
-  // gettext and ngettext don't access this so that the functions
-  // can safely bound to a different name (_ = Documentation.gettext)
-  gettext : function(string) {
-    var translated = Documentation.TRANSLATIONS[string];
-    if (typeof translated == 'undefined')
-      return string;
-    return (typeof translated == 'string') ? translated : translated[0];
-  },
-
-  ngettext : function(singular, plural, n) {
-    var translated = Documentation.TRANSLATIONS[singular];
-    if (typeof translated == 'undefined')
-      return (n == 1) ? singular : plural;
-    return translated[Documentation.PLURALEXPR(n)];
-  },
-
-  addTranslations : function(catalog) {
-    for (var key in catalog.messages)
-      this.TRANSLATIONS[key] = catalog.messages[key];
-    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
-    this.LOCALE = catalog.locale;
-  },
-
-  /**
-   * add context elements like header anchor links
-   */
-  addContextElements : function() {
-    $('div[id] > :header:first').each(function() {
-      $('<a class="headerlink">\u00B6</a>').
-      attr('href', '#' + this.id).
-      attr('title', _('Permalink to this headline')).
-      appendTo(this);
-    });
-    $('dt[id]').each(function() {
-      $('<a class="headerlink">\u00B6</a>').
-      attr('href', '#' + this.id).
-      attr('title', _('Permalink to this definition')).
-      appendTo(this);
-    });
-  },
-
-  /**
-   * workaround a firefox stupidity
-   */
-  fixFirefoxAnchorBug : function() {
-    if (document.location.hash && $.browser.mozilla)
-      window.setTimeout(function() {
-        document.location.href += '';
-      }, 10);
-  },
-
-  /**
-   * highlight the search words provided in the url in the text
-   */
-  highlightSearchWords : function() {
-    var params = $.getQueryParameters();
-    var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
-    if (terms.length) {
-      var body = $('div.body');
-      if (!body.length) {
-        body = $('body');
-      }
-      window.setTimeout(function() {
-        $.each(terms, function() {
-          body.highlightText(this.toLowerCase(), 'highlighted');
-        });
-      }, 10);
-      $('<p class="highlight-link"><a href="javascript:Documentation.' +
-        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
-          .appendTo($('#searchbox'));
-    }
-  },
-
-  /**
-   * init the domain index toggle buttons
-   */
-  initIndexTable : function() {
-    var togglers = $('img.toggler').click(function() {
-      var src = $(this).attr('src');
-      var idnum = $(this).attr('id').substr(7);
-      $('tr.cg-' + idnum).toggle();
-      if (src.substr(-9) == 'minus.png')
-        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
-      else
-        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
-    }).css('display', '');
-    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
-        togglers.click();
-    }
-  },
-
-  /**
-   * helper function to hide the search marks again
-   */
-  hideSearchWords : function() {
-    $('#searchbox .highlight-link').fadeOut(300);
-    $('span.highlighted').removeClass('highlighted');
-  },
-
-  /**
-   * make the url absolute
-   */
-  makeURL : function(relativeURL) {
-    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
-  },
-
-  /**
-   * get the current relative url
-   */
-  getCurrentURL : function() {
-    var path = document.location.pathname;
-    var parts = path.split(/\//);
-    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
-      if (this == '..')
-        parts.pop();
-    });
-    var url = parts.join('/');
-    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
-  }
-};
-
-// quick alias for translations
-_ = Documentation.gettext;
-
-$(document).ready(function() {
-  Documentation.init();
-});

BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/down-pressed.png


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/down.png


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/file.png


File diff suppressed because it is too large
+ 0 - 1
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/jquery.js


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/minus.png


BIN
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/plus.png


+ 0 - 63
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/pygments.css

@@ -1,63 +0,0 @@
-.highlight .hll { background-color: #ffffcc }
-.highlight  { background: #eeffcc; }
-.highlight .c { color: #408090; font-style: italic } /* Comment */
-.highlight .err { border: 1px solid #FF0000 } /* Error */
-.highlight .k { color: #007020; font-weight: bold } /* Keyword */
-.highlight .o { color: #666666 } /* Operator */
-.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
-.highlight .cp { color: #007020 } /* Comment.Preproc */
-.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
-.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
-.highlight .gd { color: #A00000 } /* Generic.Deleted */
-.highlight .ge { font-style: italic } /* Generic.Emph */
-.highlight .gr { color: #FF0000 } /* Generic.Error */
-.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.highlight .gi { color: #00A000 } /* Generic.Inserted */
-.highlight .go { color: #333333 } /* Generic.Output */
-.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
-.highlight .gs { font-weight: bold } /* Generic.Strong */
-.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.highlight .gt { color: #0044DD } /* Generic.Traceback */
-.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
-.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
-.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
-.highlight .kp { color: #007020 } /* Keyword.Pseudo */
-.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
-.highlight .kt { color: #902000 } /* Keyword.Type */
-.highlight .m { color: #208050 } /* Literal.Number */
-.highlight .s { color: #4070a0 } /* Literal.String */
-.highlight .na { color: #4070a0 } /* Name.Attribute */
-.highlight .nb { color: #007020 } /* Name.Builtin */
-.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
-.highlight .no { color: #60add5 } /* Name.Constant */
-.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
-.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
-.highlight .ne { color: #007020 } /* Name.Exception */
-.highlight .nf { color: #06287e } /* Name.Function */
-.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
-.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
-.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
-.highlight .nv { color: #bb60d5 } /* Name.Variable */
-.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
-.highlight .w { color: #bbbbbb } /* Text.Whitespace */
-.highlight .mb { color: #208050 } /* Literal.Number.Bin */
-.highlight .mf { color: #208050 } /* Literal.Number.Float */
-.highlight .mh { color: #208050 } /* Literal.Number.Hex */
-.highlight .mi { color: #208050 } /* Literal.Number.Integer */
-.highlight .mo { color: #208050 } /* Literal.Number.Oct */
-.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
-.highlight .sc { color: #4070a0 } /* Literal.String.Char */
-.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
-.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
-.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
-.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
-.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
-.highlight .sx { color: #c65d09 } /* Literal.String.Other */
-.highlight .sr { color: #235388 } /* Literal.String.Regex */
-.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
-.highlight .ss { color: #517918 } /* Literal.String.Symbol */
-.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
-.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
-.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
-.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
-.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */

+ 0 - 622
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/searchtools.js

@@ -1,622 +0,0 @@
-/*
- * searchtools.js_t
- * ~~~~~~~~~~~~~~~~
- *
- * Sphinx JavaScript utilties for the full-text search.
- *
- * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-
-/**
- * Porter Stemmer
- */
-var Stemmer = function() {
-
-  var step2list = {
-    ational: 'ate',
-    tional: 'tion',
-    enci: 'ence',
-    anci: 'ance',
-    izer: 'ize',
-    bli: 'ble',
-    alli: 'al',
-    entli: 'ent',
-    eli: 'e',
-    ousli: 'ous',
-    ization: 'ize',
-    ation: 'ate',
-    ator: 'ate',
-    alism: 'al',
-    iveness: 'ive',
-    fulness: 'ful',
-    ousness: 'ous',
-    aliti: 'al',
-    iviti: 'ive',
-    biliti: 'ble',
-    logi: 'log'
-  };
-
-  var step3list = {
-    icate: 'ic',
-    ative: '',
-    alize: 'al',
-    iciti: 'ic',
-    ical: 'ic',
-    ful: '',
-    ness: ''
-  };
-
-  var c = "[^aeiou]";          // consonant
-  var v = "[aeiouy]";          // vowel
-  var C = c + "[^aeiouy]*";    // consonant sequence
-  var V = v + "[aeiou]*";      // vowel sequence
-
-  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
-  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
-  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
-  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
-
-  this.stemWord = function (w) {
-    var stem;
-    var suffix;
-    var firstch;
-    var origword = w;
-
-    if (w.length < 3)
-      return w;
-
-    var re;
-    var re2;
-    var re3;
-    var re4;
-
-    firstch = w.substr(0,1);
-    if (firstch == "y")
-      w = firstch.toUpperCase() + w.substr(1);
-
-    // Step 1a
-    re = /^(.+?)(ss|i)es$/;
-    re2 = /^(.+?)([^s])s$/;
-
-    if (re.test(w))
-      w = w.replace(re,"$1$2");
-    else if (re2.test(w))
-      w = w.replace(re2,"$1$2");
-
-    // Step 1b
-    re = /^(.+?)eed$/;
-    re2 = /^(.+?)(ed|ing)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      re = new RegExp(mgr0);
-      if (re.test(fp[1])) {
-        re = /.$/;
-        w = w.replace(re,"");
-      }
-    }
-    else if (re2.test(w)) {
-      var fp = re2.exec(w);
-      stem = fp[1];
-      re2 = new RegExp(s_v);
-      if (re2.test(stem)) {
-        w = stem;
-        re2 = /(at|bl|iz)$/;
-        re3 = new RegExp("([^aeiouylsz])\\1$");
-        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
-        if (re2.test(w))
-          w = w + "e";
-        else if (re3.test(w)) {
-          re = /.$/;
-          w = w.replace(re,"");
-        }
-        else if (re4.test(w))
-          w = w + "e";
-      }
-    }
-
-    // Step 1c
-    re = /^(.+?)y$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      re = new RegExp(s_v);
-      if (re.test(stem))
-        w = stem + "i";
-    }
-
-    // Step 2
-    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      suffix = fp[2];
-      re = new RegExp(mgr0);
-      if (re.test(stem))
-        w = stem + step2list[suffix];
-    }
-
-    // Step 3
-    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      suffix = fp[2];
-      re = new RegExp(mgr0);
-      if (re.test(stem))
-        w = stem + step3list[suffix];
-    }
-
-    // Step 4
-    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
-    re2 = /^(.+?)(s|t)(ion)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      re = new RegExp(mgr1);
-      if (re.test(stem))
-        w = stem;
-    }
-    else if (re2.test(w)) {
-      var fp = re2.exec(w);
-      stem = fp[1] + fp[2];
-      re2 = new RegExp(mgr1);
-      if (re2.test(stem))
-        w = stem;
-    }
-
-    // Step 5
-    re = /^(.+?)e$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      re = new RegExp(mgr1);
-      re2 = new RegExp(meq1);
-      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
-      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
-        w = stem;
-    }
-    re = /ll$/;
-    re2 = new RegExp(mgr1);
-    if (re.test(w) && re2.test(w)) {
-      re = /.$/;
-      w = w.replace(re,"");
-    }
-
-    // and turn initial Y back to y
-    if (firstch == "y")
-      w = firstch.toLowerCase() + w.substr(1);
-    return w;
-  }
-}
-
-
-
-/**
- * Simple result scoring code.
- */
-var Scorer = {
-  // Implement the following function to further tweak the score for each result
-  // The function takes a result array [filename, title, anchor, descr, score]
-  // and returns the new score.
-  /*
-  score: function(result) {
-    return result[4];
-  },
-  */
-
-  // query matches the full name of an object
-  objNameMatch: 11,
-  // or matches in the last dotted part of the object name
-  objPartialMatch: 6,
-  // Additive scores depending on the priority of the object
-  objPrio: {0:  15,   // used to be importantResults
-            1:  5,   // used to be objectResults
-            2: -5},  // used to be unimportantResults
-  //  Used when the priority is not in the mapping.
-  objPrioDefault: 0,
-
-  // query found in title
-  title: 15,
-  // query found in terms
-  term: 5
-};
-
-
-/**
- * Search Module
- */
-var Search = {
-
-  _index : null,
-  _queued_query : null,
-  _pulse_status : -1,
-
-  init : function() {
-      var params = $.getQueryParameters();
-      if (params.q) {
-          var query = params.q[0];
-          $('input[name="q"]')[0].value = query;
-          this.performSearch(query);
-      }
-  },
-
-  loadIndex : function(url) {
-    $.ajax({type: "GET", url: url, data: null,
-            dataType: "script", cache: true,
-            complete: function(jqxhr, textstatus) {
-              if (textstatus != "success") {
-                document.getElementById("searchindexloader").src = url;
-              }
-            }});
-  },
-
-  setIndex : function(index) {
-    var q;
-    this._index = index;
-    if ((q = this._queued_query) !== null) {
-      this._queued_query = null;
-      Search.query(q);
-    }
-  },
-
-  hasIndex : function() {
-      return this._index !== null;
-  },
-
-  deferQuery : function(query) {
-      this._queued_query = query;
-  },
-
-  stopPulse : function() {
-      this._pulse_status = 0;
-  },
-
-  startPulse : function() {
-    if (this._pulse_status >= 0)
-        return;
-    function pulse() {
-      var i;
-      Search._pulse_status = (Search._pulse_status + 1) % 4;
-      var dotString = '';
-      for (i = 0; i < Search._pulse_status; i++)
-        dotString += '.';
-      Search.dots.text(dotString);
-      if (Search._pulse_status > -1)
-        window.setTimeout(pulse, 500);
-    }
-    pulse();
-  },
-
-  /**
-   * perform a search for something (or wait until index is loaded)
-   */
-  performSearch : function(query) {
-    // create the required interface elements
-    this.out = $('#search-results');
-    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
-    this.dots = $('<span></span>').appendTo(this.title);
-    this.status = $('<p style="display: none"></p>').appendTo(this.out);
-    this.output = $('<ul class="search"/>').appendTo(this.out);
-
-    $('#search-progress').text(_('Preparing search...'));
-    this.startPulse();
-
-    // index already loaded, the browser was quick!
-    if (this.hasIndex())
-      this.query(query);
-    else
-      this.deferQuery(query);
-  },
-
-  /**
-   * execute search (requires search index to be loaded)
-   */
-  query : function(query) {
-    var i;
-    var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
-
-    // stem the searchterms and add them to the correct list
-    var stemmer = new Stemmer();
-    var searchterms = [];
-    var excluded = [];
-    var hlterms = [];
-    var tmp = query.split(/\s+/);
-    var objectterms = [];
-    for (i = 0; i < tmp.length; i++) {
-      if (tmp[i] !== "") {
-          objectterms.push(tmp[i].toLowerCase());
-      }
-
-      if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
-          tmp[i] === "") {
-        // skip this "word"
-        continue;
-      }
-      // stem the word
-      var word = stemmer.stemWord(tmp[i].toLowerCase());
-      var toAppend;
-      // select the correct list
-      if (word[0] == '-') {
-        toAppend = excluded;
-        word = word.substr(1);
-      }
-      else {
-        toAppend = searchterms;
-        hlterms.push(tmp[i].toLowerCase());
-      }
-      // only add if not already in the list
-      if (!$u.contains(toAppend, word))
-        toAppend.push(word);
-    }
-    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
-
-    // console.debug('SEARCH: searching for:');
-    // console.info('required: ', searchterms);
-    // console.info('excluded: ', excluded);
-
-    // prepare search
-    var terms = this._index.terms;
-    var titleterms = this._index.titleterms;
-
-    // array of [filename, title, anchor, descr, score]
-    var results = [];
-    $('#search-progress').empty();
-
-    // lookup as object
-    for (i = 0; i < objectterms.length; i++) {
-      var others = [].concat(objectterms.slice(0, i),
-                             objectterms.slice(i+1, objectterms.length));
-      results = results.concat(this.performObjectSearch(objectterms[i], others));
-    }
-
-    // lookup as search terms in fulltext
-    results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term))
-                     .concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title));
-
-    // let the scorer override scores with a custom scoring function
-    if (Scorer.score) {
-      for (i = 0; i < results.length; i++)
-        results[i][4] = Scorer.score(results[i]);
-    }
-
-    // now sort the results by score (in opposite order of appearance, since the
-    // display function below uses pop() to retrieve items) and then
-    // alphabetically
-    results.sort(function(a, b) {
-      var left = a[4];
-      var right = b[4];
-      if (left > right) {
-        return 1;
-      } else if (left < right) {
-        return -1;
-      } else {
-        // same score: sort alphabetically
-        left = a[1].toLowerCase();
-        right = b[1].toLowerCase();
-        return (left > right) ? -1 : ((left < right) ? 1 : 0);
-      }
-    });
-
-    // for debugging
-    //Search.lastresults = results.slice();  // a copy
-    //console.info('search results:', Search.lastresults);
-
-    // print the results
-    var resultCount = results.length;
-    function displayNextItem() {
-      // results left, load the summary and display it
-      if (results.length) {
-        var item = results.pop();
-        var listItem = $('<li style="display:none"></li>');
-        if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
-          // dirhtml builder
-          var dirname = item[0] + '/';
-          if (dirname.match(/\/index\/$/)) {
-            dirname = dirname.substring(0, dirname.length-6);
-          } else if (dirname == 'index/') {
-            dirname = '';
-          }
-          listItem.append($('<a/>').attr('href',
-            DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
-            highlightstring + item[2]).html(item[1]));
-        } else {
-          // normal html builders
-          listItem.append($('<a/>').attr('href',
-            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
-            highlightstring + item[2]).html(item[1]));
-        }
-        if (item[3]) {
-          listItem.append($('<span> (' + item[3] + ')</span>'));
-          Search.output.append(listItem);
-          listItem.slideDown(5, function() {
-            displayNextItem();
-          });
-        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
-          $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
-                  dataType: "text",
-                  complete: function(jqxhr, textstatus) {
-                    var data = jqxhr.responseText;
-                    if (data !== '') {
-                      listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
-                    }
-                    Search.output.append(listItem);
-                    listItem.slideDown(5, function() {
-                      displayNextItem();
-                    });
-                  }});
-        } else {
-          // no source available, just display title
-          Search.output.append(listItem);
-          listItem.slideDown(5, function() {
-            displayNextItem();
-          });
-        }
-      }
-      // search finished, update title and status message
-      else {
-        Search.stopPulse();
-        Search.title.text(_('Search Results'));
-        if (!resultCount)
-          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
-        else
-            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
-        Search.status.fadeIn(500);
-      }
-    }
-    displayNextItem();
-  },
-
-  /**
-   * search for object names
-   */
-  performObjectSearch : function(object, otherterms) {
-    var filenames = this._index.filenames;
-    var objects = this._index.objects;
-    var objnames = this._index.objnames;
-    var titles = this._index.titles;
-
-    var i;
-    var results = [];
-
-    for (var prefix in objects) {
-      for (var name in objects[prefix]) {
-        var fullname = (prefix ? prefix + '.' : '') + name;
-        if (fullname.toLowerCase().indexOf(object) > -1) {
-          var score = 0;
-          var parts = fullname.split('.');
-          // check for different match types: exact matches of full name or
-          // "last name" (i.e. last dotted part)
-          if (fullname == object || parts[parts.length - 1] == object) {
-            score += Scorer.objNameMatch;
-          // matches in last name
-          } else if (parts[parts.length - 1].indexOf(object) > -1) {
-            score += Scorer.objPartialMatch;
-          }
-          var match = objects[prefix][name];
-          var objname = objnames[match[1]][2];
-          var title = titles[match[0]];
-          // If more than one term searched for, we require other words to be
-          // found in the name/title/description
-          if (otherterms.length > 0) {
-            var haystack = (prefix + ' ' + name + ' ' +
-                            objname + ' ' + title).toLowerCase();
-            var allfound = true;
-            for (i = 0; i < otherterms.length; i++) {
-              if (haystack.indexOf(otherterms[i]) == -1) {
-                allfound = false;
-                break;
-              }
-            }
-            if (!allfound) {
-              continue;
-            }
-          }
-          var descr = objname + _(', in ') + title;
-
-          var anchor = match[3];
-          if (anchor === '')
-            anchor = fullname;
-          else if (anchor == '-')
-            anchor = objnames[match[1]][1] + '-' + fullname;
-          // add custom score for some objects according to scorer
-          if (Scorer.objPrio.hasOwnProperty(match[2])) {
-            score += Scorer.objPrio[match[2]];
-          } else {
-            score += Scorer.objPrioDefault;
-          }
-          results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
-        }
-      }
-    }
-
-    return results;
-  },
-
-  /**
-   * search for full-text terms in the index
-   */
-  performTermsSearch : function(searchterms, excluded, terms, score) {
-    var filenames = this._index.filenames;
-    var titles = this._index.titles;
-
-    var i, j, file, files;
-    var fileMap = {};
-    var results = [];
-
-    // perform the search on the required terms
-    for (i = 0; i < searchterms.length; i++) {
-      var word = searchterms[i];
-      // no match but word was a required one
-      if ((files = terms[word]) === undefined)
-        break;
-      if (files.length === undefined) {
-        files = [files];
-      }
-      // create the mapping
-      for (j = 0; j < files.length; j++) {
-        file = files[j];
-        if (file in fileMap)
-          fileMap[file].push(word);
-        else
-          fileMap[file] = [word];
-      }
-    }
-
-    // now check if the files don't contain excluded terms
-    for (file in fileMap) {
-      var valid = true;
-
-      // check if all requirements are matched
-      if (fileMap[file].length != searchterms.length)
-          continue;
-
-      // ensure that none of the excluded terms is in the search result
-      for (i = 0; i < excluded.length; i++) {
-        if (terms[excluded[i]] == file ||
-          $u.contains(terms[excluded[i]] || [], file)) {
-          valid = false;
-          break;
-        }
-      }
-
-      // if we have still a valid result we can add it to the result list
-      if (valid) {
-        results.push([filenames[file], titles[file], '', null, score]);
-      }
-    }
-    return results;
-  },
-
-  /**
-   * helper function to return a node containing the
-   * search summary for a given text. keywords is a list
-   * of stemmed words, hlwords is the list of normal, unstemmed
-   * words. the first one is used to find the occurance, the
-   * latter for highlighting it.
-   */
-  makeSearchSummary : function(text, keywords, hlwords) {
-    var textLower = text.toLowerCase();
-    var start = 0;
-    $.each(keywords, function() {
-      var i = textLower.indexOf(this.toLowerCase());
-      if (i > -1)
-        start = i;
-    });
-    start = Math.max(start - 120, 0);
-    var excerpt = ((start > 0) ? '...' : '') +
-      $.trim(text.substr(start, 240)) +
-      ((start + 240 - text.length) ? '...' : '');
-    var rv = $('<div class="context"></div>').text(excerpt);
-    $.each(hlwords, function() {
-      rv = rv.highlightText(this, 'highlighted');
-    });
-    return rv;
-  }
-};
-
-$(document).ready(function() {
-  Search.init();
-});

+ 0 - 159
desktop/core/ext-py/django-extensions-1.5.0/docs/_build/html/_static/sidebar.js

@@ -1,159 +0,0 @@
-/*
- * sidebar.js
- * ~~~~~~~~~~
- *
- * This script makes the Sphinx sidebar collapsible.
- *
- * .sphinxsidebar contains .sphinxsidebarwrapper.  This script adds
- * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
- * used to collapse and expand the sidebar.
- *
- * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
- * and the width of the sidebar and the margin-left of the document
- * are decreased. When the sidebar is expanded the opposite happens.
- * This script saves a per-browser/per-session cookie used to
- * remember the position of the sidebar among the pages.
- * Once the browser is closed the cookie is deleted and the position
- * reset to the default (expanded).
- *
- * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-$(function() {
-  
-  
-  
-  
-  
-  
-  
-
-  // global elements used by the functions.
-  // the 'sidebarbutton' element is defined as global after its
-  // creation, in the add_sidebar_button function
-  var bodywrapper = $('.bodywrapper');
-  var sidebar = $('.sphinxsidebar');
-  var sidebarwrapper = $('.sphinxsidebarwrapper');
-
-  // for some reason, the document has no sidebar; do not run into errors
-  if (!sidebar.length) return;
-
-  // original margin-left of the bodywrapper and width of the sidebar
-  // with the sidebar expanded
-  var bw_margin_expanded = bodywrapper.css('margin-left');
-  var ssb_width_expanded = sidebar.width();
-
-  // margin-left of the bodywrapper and width of the sidebar
-  // with the sidebar collapsed
-  var bw_margin_collapsed = '.8em';
-  var ssb_width_collapsed = '.8em';
-
-  // colors used by the current theme
-  var dark_color = $('.related').css('background-color');
-  var light_color = $('.document').css('background-color');
-
-  function sidebar_is_collapsed() {
-    return sidebarwrapper.is(':not(:visible)');
-  }
-
-  function toggle_sidebar() {
-    if (sidebar_is_collapsed())
-      expand_sidebar();
-    else
-      collapse_sidebar();
-  }
-
-  function collapse_sidebar() {
-    sidebarwrapper.hide();
-    sidebar.css('width', ssb_width_collapsed);
-    bodywrapper.css('margin-left', bw_margin_collapsed);
-    sidebarbutton.css({
-        'margin-left': '0',
-        'height': bodywrapper.height()
-    });
-    sidebarbutton.find('span').text('»');
-    sidebarbutton.attr('title', _('Expand sidebar'));
-    document.cookie = 'sidebar=collapsed';
-  }
-
-  function expand_sidebar() {
-    bodywrapper.css('margin-left', bw_margin_expanded);
-    sidebar.css('width', ssb_width_expanded);
-    sidebarwrapper.show();
-    sidebarbutton.css({
-        'margin-left': ssb_width_expanded-12,
-        'height': bodywrapper.height()
-    });
-    sidebarbutton.find('span').text('«');
-    sidebarbutton.attr('title', _('Collapse sidebar'));
-    document.cookie = 'sidebar=expanded';
-  }
-
-  function add_sidebar_button() {
-    sidebarwrapper.css({
-        'float': 'left',
-        'margin-right': '0',
-        'width': ssb_width_expanded - 28
-    });
-    // create the button
-    sidebar.append(
-        '<div id="sidebarbutton"><span>&laquo;</span></div>'
-    );
-    var sidebarbutton = $('#sidebarbutton');
-    light_color = sidebarbutton.css('background-color');
-    // find the height of the viewport to center the '<<' in the page
-    var viewport_height;
-    if (window.innerHeight)
- 	  viewport_height = window.innerHeight;
-    else
-	  viewport_height = $(window).height();
-    sidebarbutton.find('span').css({
-        'display': 'block',
-        'margin-top': (viewport_height - sidebar.position().top - 20) / 2
-    });
-
-    sidebarbutton.click(toggle_sidebar);
-    sidebarbutton.attr('title', _('Collapse sidebar'));
-    sidebarbutton.css({
-        'color': '#FFFFFF',
-        'border-left': '1px solid ' + dark_color,
-        'font-size': '1.2em',
-        'cursor': 'pointer',
-        'height': bodywrapper.height(),
-        'padding-top': '1px',
-        'margin-left': ssb_width_expanded - 12
-    });
-
-    sidebarbutton.hover(
-      function () {
-          $(this).css('background-color', dark_color);
-      },
-      function () {
-          $(this).css('background-color', light_color);
-      }
-    );
-  }
-
-  function set_position_from_cookie() {
-    if (!document.cookie)
-      return;
-    var items = document.cookie.split(';');
-    for(var k=0; k<items.length; k++) {
-      var key_val = items[k].split('=');
-      var key = key_val[0].replace(/ /, "");  // strip leading spaces
-      if (key == 'sidebar') {
-        var value = key_val[1];
-        if ((value == 'collapsed') && (!sidebar_is_collapsed()))
-          collapse_sidebar();
-        else if ((value == 'expanded') && (sidebar_is_collapsed()))
-          expand_sidebar();
-      }
-    }
-  }
-
-  add_sidebar_button();
-  var sidebarbutton = $('#sidebarbutton');
-  set_position_from_cookie();
-});

Some files were not shown because too many files changed in this diff