Add new app to handle all dependencies
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -20,21 +20,20 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from mayan.celery import app
|
||||
|
||||
from .classes import Template
|
||||
from .dependencies import * # NOQA
|
||||
from .handlers import (
|
||||
handler_pre_initial_setup, handler_pre_upgrade,
|
||||
handler_user_locale_profile_session_config, handler_user_locale_profile_create
|
||||
)
|
||||
from .links import (
|
||||
link_about, link_check_version, link_current_user_locale_profile_edit,
|
||||
link_license, link_object_error_list_clear, link_packages_licenses,
|
||||
link_setup, link_tools
|
||||
link_about, link_current_user_locale_profile_edit, link_license,
|
||||
link_object_error_list_clear, link_setup, link_tools
|
||||
)
|
||||
|
||||
from .literals import DELETE_STALE_UPLOADS_INTERVAL, MESSAGE_SQLITE_WARNING
|
||||
from .menus import (
|
||||
menu_about, menu_main, menu_secondary, menu_user
|
||||
)
|
||||
from .licenses import * # NOQA
|
||||
from .queues import * # NOQA - Force queues registration
|
||||
from .settings import (
|
||||
setting_auto_logging, setting_production_error_log_path,
|
||||
@@ -67,8 +66,7 @@ class MayanAppConfig(apps.AppConfig):
|
||||
urlpatterns += url(
|
||||
regex=r'^{}'.format(top_url),
|
||||
view=include(
|
||||
'{}.urls'.format(self.name),
|
||||
namespace=self.app_namespace or self.name
|
||||
'{}.urls'.format(self.name), namespace=self.app_namespace or self.name
|
||||
)
|
||||
),
|
||||
except ImportError as exception:
|
||||
@@ -142,7 +140,6 @@ class CommonApp(MayanAppConfig):
|
||||
menu_about.bind_links(
|
||||
links=(
|
||||
link_tools, link_setup, link_about, link_license,
|
||||
link_packages_licenses, link_check_version
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -242,19 +242,6 @@ class ModelProperty(object):
|
||||
cls._registry.append(klass)
|
||||
|
||||
|
||||
class Package(object):
|
||||
_registry = []
|
||||
|
||||
@classmethod
|
||||
def get_all(cls):
|
||||
return cls._registry
|
||||
|
||||
def __init__(self, label, license_text):
|
||||
self.label = label
|
||||
self.license_text = license_text
|
||||
self.__class__._registry.append(self)
|
||||
|
||||
|
||||
class PropertyHelper(object):
|
||||
"""
|
||||
Makes adding fields using __class__.add_to_class easier.
|
||||
|
||||
@@ -15,3 +15,10 @@ try:
|
||||
from email.Utils import collapse_rfc2231_value # NOQA
|
||||
except ImportError:
|
||||
from email.utils import collapse_rfc2231_value # NOQA
|
||||
|
||||
try:
|
||||
FileNotFoundError
|
||||
except NameError:
|
||||
FileNotFoundErrorException = IOError
|
||||
else:
|
||||
FileNotFoundErrorException = FileNotFoundError
|
||||
|
||||
@@ -0,0 +1,446 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from mayan.apps.dependencies.classes import (
|
||||
environment_development, environment_testing, PythonDependency
|
||||
)
|
||||
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Copyright (c) Django Software Foundation and individual contributors.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of Django nor the names of its contributors may be used
|
||||
to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
''', module=__name__, name='django', version_string='==1.11.20'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Copyright (c) 2006 Kirill Simonov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
''', module=__name__, name='PyYAML', version_string='==5.1'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Copyright (c) 2015 Ask Solem & contributors. All rights reserved.
|
||||
Copyright (c) 2012-2014 GoPivotal, Inc. All rights reserved.
|
||||
Copyright (c) 2009, 2010, 2011, 2012 Ask Solem, and individual contributors. All rights reserved.
|
||||
|
||||
Celery is licensed under The BSD License (3 Clause, also known as
|
||||
the new BSD license). The license is an OSI approved Open Source
|
||||
license and is GPL-compatible(1).
|
||||
|
||||
The license text can also be found here:
|
||||
http://www.opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Ask Solem, nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Ask Solem OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Documentation License
|
||||
=====================
|
||||
|
||||
The documentation portion of Celery (the rendered contents of the
|
||||
"docs" directory of a software distribution or checkout) is supplied
|
||||
under the Creative Commons Attribution-Noncommercial-Share Alike 3.0
|
||||
United States License as described by
|
||||
http://creativecommons.org/licenses/by-nc-sa/3.0/us/
|
||||
|
||||
Footnotes
|
||||
=========
|
||||
(1) A GPL-compatible license makes it possible to
|
||||
combine Celery with other software that is released
|
||||
under the GPL, it does not mean that we're distributing
|
||||
Celery under the GPL license. The BSD license, unlike the GPL,
|
||||
let you distribute a modified version without making your
|
||||
changes open source.
|
||||
''', module=__name__, name='celery', version_string='==3.1.24'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Copyright (c) 2012-2013 GoPivotal, Inc. All Rights Reserved.
|
||||
Copyright (c) 2009-2012 Ask Solem. All Rights Reserved.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of Ask Solem nor the names of its contributors may be used
|
||||
to endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
''', module=__name__, name='django-celery', version_string='==3.2.1'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='django-downloadview', version_string='==1.9'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='django-environ', version_string='==0.4.5'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='django-formtools', version_string='==2.1'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Copyright (c) James Pacileo and contributors.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of Django nor the names of its contributors may be used
|
||||
to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
''', module=__name__, name='django-pure-pagination', version_string='==0.3.0'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='django-mathfilters', version_string='==0.4.0'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Copyright (c) 2009-2015, Carl Meyer and contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of the author nor the names of other
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
''', module=__name__, name='django-model-utils', version_string='==3.1.2'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Django MPTT
|
||||
-----------
|
||||
|
||||
Copyright (c) 2007, Jonathan Buchanan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
''', module=__name__, name='django-mptt', version_string='==0.9.1'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Copyright (c) 2010, Matt Croydon, Mikhail Korobov
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the tastypie nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL MATT CROYDON BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
''', module=__name__, name='django-qsstats-magic', version_string='==1.0.0'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='django-stronghold', version_string='==0.3.0'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Copyright (c) 2011-2015 Mikhail Korobov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
''', module=__name__, name='django-widget-tweaks', version_string='==1.4.3'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='furl', version_string='==2.0.0'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='gevent', version_string='==1.4.0'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='gunicorn', version_string='==19.9.0'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='mock', version_string='==2.0.0'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='pathlib2', version_string='==2.3.3'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Author: Christian Theune
|
||||
License: LGPL 2.1
|
||||
''', module=__name__, name='pycountry', version_string='==18.12.8'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Copyright (c) 2003-2005 Stuart Bishop <stuart@stuartbishop.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
''', module=__name__, name='pytz', version_string='==2019.1'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='requests', version_string='==2.21.0'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
Copyright (C) 2011-2012 by Andrew Moffat
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
''', module=__name__, name='sh', version_string='==1.12.14'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='whitenoise', version_string='==4.1.2'
|
||||
)
|
||||
|
||||
PythonDependency(
|
||||
module=__name__, environment=environment_development, name='Werkzeug',
|
||||
version_string='==0.15.2'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development, module=__name__,
|
||||
name='django-debug-toolbar', version_string='==1.11'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development, module=__name__,
|
||||
name='django-extensions', version_string='==2.1.6'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development, help_text=_(
|
||||
'Used to allow offline translation of the code text strings.'
|
||||
), module=__name__, name='django-rosetta', version_string='==0.9.2'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development, help_text=_(
|
||||
'Provides style checking.'
|
||||
), module=__name__, name='flake8', version_string='==3.7.7'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development, help_text=_(
|
||||
'Command line environment with autocompletion.'
|
||||
), module=__name__, name='ipython', version_string='==5.5.0'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development, help_text=_(
|
||||
'Checks proper formatting of the README file.'
|
||||
), module=__name__, name='readme', version_string='==0.7.1'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development,
|
||||
module=__name__, name='safety', version_string='==1.8.5'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development,
|
||||
module=__name__, name='transifex-client', version_string='==0.13.6'
|
||||
)
|
||||
|
||||
PythonDependency(
|
||||
environment=environment_testing, module=__name__, name='codecov',
|
||||
version_string='==2.0.15'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_testing, module=__name__, name='coverage',
|
||||
version_string='==4.4.1'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_testing, module=__name__, name='coveralls',
|
||||
version_string='==1.3.0'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_testing,
|
||||
module=__name__, name='django-test-without-migrations',
|
||||
version_string='==0.6'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_testing, module=__name__, name='tox',
|
||||
version_string='==3.8.6'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_testing, module=__name__, name='psutil',
|
||||
version_string='==5.6.1'
|
||||
)
|
||||
@@ -30,20 +30,6 @@ class NoMIMETypeMatch(CompressionFileError):
|
||||
pass
|
||||
|
||||
|
||||
class NotLatestVersion(BaseCommonException):
|
||||
"""
|
||||
The installed version is not the latest available version
|
||||
"""
|
||||
def __init__(self, upstream_version):
|
||||
self.upstream_version = upstream_version
|
||||
|
||||
|
||||
class UnknownLatestVersion(BaseCommonException):
|
||||
"""
|
||||
It is not possible to determine what is the latest upstream version.
|
||||
"""
|
||||
|
||||
|
||||
class NPMException(BaseCommonException):
|
||||
"""Base exception for the NPM registry client"""
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from mayan.apps.acls.models import AccessControlList
|
||||
|
||||
from .classes import Package
|
||||
from .models import UserLocaleProfile
|
||||
from .utils import introspect_attribute, resolve_attribute
|
||||
from .widgets import DisableableSelectWidget, PlainWidget, TextAreaDiv
|
||||
@@ -298,11 +297,3 @@ class LocaleProfileForm_view(DetailForm):
|
||||
class Meta:
|
||||
fields = ('language', 'timezone')
|
||||
model = UserLocaleProfile
|
||||
|
||||
|
||||
class PackagesLicensesForm(FileDisplayForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(PackagesLicensesForm, self).__init__(*args, **kwargs)
|
||||
self.fields['text'].initial = '\n\n'.join(
|
||||
['{}\n{}'.format(package.label, package.license_text) for package in Package.get_all()]
|
||||
)
|
||||
|
||||
@@ -11,7 +11,6 @@ icon_add_all = Icon(
|
||||
)
|
||||
icon_assign_remove_add = Icon(driver_name='fontawesome', symbol='plus')
|
||||
icon_assign_remove_remove = Icon(driver_name='fontawesome', symbol='minus')
|
||||
icon_check_version = Icon(driver_name='fontawesome', symbol='sync')
|
||||
icon_current_user_locale_profile_details = Icon(
|
||||
driver_name='fontawesome', symbol='globe'
|
||||
)
|
||||
@@ -40,9 +39,6 @@ icon_object_error_list_with_icon = Icon(
|
||||
icon_ok = Icon(
|
||||
driver_name='fontawesome', symbol='check'
|
||||
)
|
||||
icon_packages_licenses = Icon(
|
||||
driver_name='fontawesome', symbol='certificate'
|
||||
)
|
||||
icon_remove_all = Icon(
|
||||
driver_name='fontawesome-layers', data=[
|
||||
{'class': 'far fa-circle'},
|
||||
|
||||
@@ -1,362 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .classes import Package
|
||||
|
||||
Package(label='Django', license_text='''
|
||||
Copyright (c) Django Software Foundation and individual contributors.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of Django nor the names of its contributors may be used
|
||||
to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
''')
|
||||
|
||||
Package(label='PyYAML', license_text='''
|
||||
Copyright (c) 2006 Kirill Simonov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
''')
|
||||
|
||||
Package(label='Celery', license_text='''
|
||||
Copyright (c) 2015 Ask Solem & contributors. All rights reserved.
|
||||
Copyright (c) 2012-2014 GoPivotal, Inc. All rights reserved.
|
||||
Copyright (c) 2009, 2010, 2011, 2012 Ask Solem, and individual contributors. All rights reserved.
|
||||
|
||||
Celery is licensed under The BSD License (3 Clause, also known as
|
||||
the new BSD license). The license is an OSI approved Open Source
|
||||
license and is GPL-compatible(1).
|
||||
|
||||
The license text can also be found here:
|
||||
http://www.opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Ask Solem, nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Ask Solem OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Documentation License
|
||||
=====================
|
||||
|
||||
The documentation portion of Celery (the rendered contents of the
|
||||
"docs" directory of a software distribution or checkout) is supplied
|
||||
under the Creative Commons Attribution-Noncommercial-Share Alike 3.0
|
||||
United States License as described by
|
||||
http://creativecommons.org/licenses/by-nc-sa/3.0/us/
|
||||
|
||||
Footnotes
|
||||
=========
|
||||
(1) A GPL-compatible license makes it possible to
|
||||
combine Celery with other software that is released
|
||||
under the GPL, it does not mean that we're distributing
|
||||
Celery under the GPL license. The BSD license, unlike the GPL,
|
||||
let you distribute a modified version without making your
|
||||
changes open source.
|
||||
''')
|
||||
|
||||
Package(label='django-celery', license_text='''
|
||||
Copyright (c) 2012-2013 GoPivotal, Inc. All Rights Reserved.
|
||||
Copyright (c) 2009-2012 Ask Solem. All Rights Reserved.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of Ask Solem nor the names of its contributors may be used
|
||||
to endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
''')
|
||||
|
||||
Package(label='django-colorful', license_text='''
|
||||
copyright (c) 2010 SIMON CHARETTE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
''')
|
||||
|
||||
Package(label='django-cors-headers', license_text='''
|
||||
Copyright 2013 Otto Yiu and other contributors
|
||||
http://ottoyiu.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
''')
|
||||
|
||||
Package(label='django-pure-pagination', license_text='''
|
||||
Copyright (c) James Pacileo and contributors.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of Django nor the names of its contributors may be used
|
||||
to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
''')
|
||||
|
||||
Package(label='django-model-util', license_text='''
|
||||
Copyright (c) 2009-2015, Carl Meyer and contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of the author nor the names of other
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
''')
|
||||
|
||||
Package(label='django-qsstats-magic', license_text='''
|
||||
Copyright (c) 2010, Matt Croydon, Mikhail Korobov
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the tastypie nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL MATT CROYDON BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
''')
|
||||
|
||||
Package(label='pycountry', license_text='''
|
||||
Author: Christian Theune
|
||||
License: LGPL 2.1
|
||||
''')
|
||||
|
||||
Package(label='dateutil', license_text='''
|
||||
dateutil - Extensions to the standard Python datetime module.
|
||||
|
||||
Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
|
||||
Copyright (c) 2012-2014 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
|
||||
Copyright (c) 2014 - Yaron de Leeuw <me@jarondl.net>
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
''')
|
||||
|
||||
Package(label='pytz', license_text='''
|
||||
Copyright (c) 2003-2005 Stuart Bishop <stuart@stuartbishop.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
''')
|
||||
|
||||
Package(label='sh', license_text='''
|
||||
Copyright (C) 2011-2012 by Andrew Moffat
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
''')
|
||||
@@ -6,11 +6,10 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from mayan.apps.navigation.classes import Link
|
||||
|
||||
from .icons import (
|
||||
icon_about, icon_check_version, icon_current_user_locale_profile_details,
|
||||
icon_about, icon_current_user_locale_profile_details,
|
||||
icon_current_user_locale_profile_edit, icon_documentation,
|
||||
icon_forum, icon_license, icon_object_error_list_with_icon,
|
||||
icon_packages_licenses, icon_setup, icon_source_code, icon_support,
|
||||
icon_tools
|
||||
icon_setup, icon_source_code, icon_support, icon_tools
|
||||
)
|
||||
from .permissions_runtime import permission_error_log_view
|
||||
|
||||
@@ -36,10 +35,6 @@ def get_kwargs_factory(variable_name):
|
||||
link_about = Link(
|
||||
icon_class=icon_about, text=_('About this'), view='common:about_view'
|
||||
)
|
||||
link_check_version = Link(
|
||||
icon_class=icon_check_version, text=_('Check for updates'),
|
||||
view='common:check_version_view'
|
||||
)
|
||||
link_current_user_locale_profile_details = Link(
|
||||
icon_class=icon_current_user_locale_profile_details,
|
||||
text=_('Locale profile'),
|
||||
@@ -77,10 +72,6 @@ link_forum = Link(
|
||||
link_license = Link(
|
||||
icon_class=icon_license, text=_('License'), view='common:license_view'
|
||||
)
|
||||
link_packages_licenses = Link(
|
||||
icon_class=icon_packages_licenses, text=_('Other packages licenses'),
|
||||
view='common:packages_licenses_view'
|
||||
)
|
||||
link_setup = Link(
|
||||
icon_class=icon_setup, text=_('Setup'), view='common:setup_list'
|
||||
)
|
||||
|
||||
@@ -5,12 +5,10 @@ from django.utils.translation import ugettext_lazy as _
|
||||
DEFAULT_COMMON_HOME_VIEW = 'common:home'
|
||||
DELETE_STALE_UPLOADS_INTERVAL = 60 * 10 # 10 minutes
|
||||
DJANGO_SQLITE_BACKEND = 'django.db.backends.sqlite3'
|
||||
MAYAN_PYPI_NAME = 'mayan-edms'
|
||||
MESSAGE_SQLITE_WARNING = _(
|
||||
'Your database backend is set to use SQLite. SQLite should only be used '
|
||||
'for development and testing, not for production.'
|
||||
)
|
||||
PYPI_URL = 'https://pypi.python.org/pypi'
|
||||
|
||||
TEXT_SORT_FIELD_PARAMETER = '_sort_field'
|
||||
TEXT_SORT_FIELD_VARIABLE_NAME = 'sort_field'
|
||||
|
||||
@@ -7,26 +7,17 @@ from .api_views import (
|
||||
APIContentTypeList, APITemplateDetailView, APITemplateListView
|
||||
)
|
||||
from .views import (
|
||||
AboutView, CheckVersionView, CurrentUserLocaleProfileDetailsView,
|
||||
AboutView, CurrentUserLocaleProfileDetailsView,
|
||||
CurrentUserLocaleProfileEditView, FaviconRedirectView, HomeView,
|
||||
LicenseView, ObjectErrorLogEntryListClearView, ObjectErrorLogEntryListView,
|
||||
PackagesLicensesView, RootView, SetupListView, ToolsListView,
|
||||
multi_object_action_view
|
||||
RootView, SetupListView, ToolsListView, multi_object_action_view
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
url(regex=r'^$', view=RootView.as_view(), name='root'),
|
||||
url(regex=r'^home/$', view=HomeView.as_view(), name='home'),
|
||||
url(regex=r'^about/$', view=AboutView.as_view(), name='about_view'),
|
||||
url(
|
||||
regex=r'^check_version/$', view=CheckVersionView.as_view(),
|
||||
name='check_version_view'
|
||||
),
|
||||
url(regex=r'^license/$', view=LicenseView.as_view(), name='license_view'),
|
||||
url(
|
||||
regex=r'^packages/licenses/$', view=PackagesLicensesView.as_view(),
|
||||
name='packages_licenses_view'
|
||||
),
|
||||
url(
|
||||
regex=r'^object/multiple/action/$', view=multi_object_action_view,
|
||||
name='multi_object_action_view'
|
||||
|
||||
@@ -17,8 +17,7 @@ from django.utils.six.moves import reduce as reduce_function, xmlrpc_client
|
||||
import mayan
|
||||
from mayan.apps.common.compat import dict_type, dictionary_type
|
||||
|
||||
from .exceptions import NotLatestVersion, UnknownLatestVersion
|
||||
from .literals import DJANGO_SQLITE_BACKEND, MAYAN_PYPI_NAME, PYPI_URL
|
||||
from .literals import DJANGO_SQLITE_BACKEND
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -27,16 +26,6 @@ def check_for_sqlite():
|
||||
return settings.DATABASES['default']['ENGINE'] == DJANGO_SQLITE_BACKEND and settings.DEBUG is False
|
||||
|
||||
|
||||
def check_version():
|
||||
pypi = xmlrpc_client.ServerProxy(PYPI_URL)
|
||||
versions = pypi.package_releases(MAYAN_PYPI_NAME)
|
||||
if not versions:
|
||||
raise UnknownLatestVersion
|
||||
else:
|
||||
if versions[0] != mayan.__version__:
|
||||
raise NotLatestVersion(upstream_version=versions[0])
|
||||
|
||||
|
||||
def encapsulate(function):
|
||||
# Workaround Django ticket 15791
|
||||
# Changeset 16045
|
||||
|
||||
@@ -16,10 +16,8 @@ from django.views.generic import RedirectView, TemplateView
|
||||
|
||||
from mayan.apps.acls.models import AccessControlList
|
||||
|
||||
from .exceptions import NotLatestVersion, UnknownLatestVersion
|
||||
from .forms import (
|
||||
LicenseForm, LocaleProfileForm, LocaleProfileForm_view,
|
||||
PackagesLicensesForm
|
||||
)
|
||||
from .generics import (
|
||||
ConfirmView, SingleObjectEditView, SingleObjectListView, SimpleView
|
||||
@@ -28,7 +26,6 @@ from .icons import icon_setup
|
||||
from .menus import menu_tools, menu_setup
|
||||
from .permissions_runtime import permission_error_log_view
|
||||
from .settings import setting_home_view
|
||||
from .utils import check_version
|
||||
|
||||
|
||||
class AboutView(SimpleView):
|
||||
@@ -36,31 +33,6 @@ class AboutView(SimpleView):
|
||||
template_name = 'appearance/about.html'
|
||||
|
||||
|
||||
class CheckVersionView(SimpleView):
|
||||
template_name = 'appearance/generic_template.html'
|
||||
|
||||
def get_extra_context(self):
|
||||
try:
|
||||
check_version()
|
||||
except NotLatestVersion as exception:
|
||||
message = _(
|
||||
'The version you are using is outdated. The latest version '
|
||||
'is %s'
|
||||
) % exception.upstream_version
|
||||
except UnknownLatestVersion:
|
||||
message = _(
|
||||
'It is not possible to determine the latest version '
|
||||
'available.'
|
||||
)
|
||||
else:
|
||||
message = _('Your version is up-to-date.')
|
||||
|
||||
return {
|
||||
'title': _('Check for updates'),
|
||||
'content': message
|
||||
}
|
||||
|
||||
|
||||
class CurrentUserLocaleProfileDetailsView(TemplateView):
|
||||
template_name = 'appearance/generic_form.html'
|
||||
|
||||
@@ -206,19 +178,6 @@ class ObjectErrorLogEntryListView(SingleObjectListView):
|
||||
return self.get_object().error_logs.all()
|
||||
|
||||
|
||||
class PackagesLicensesView(SimpleView):
|
||||
template_name = 'appearance/generic_form.html'
|
||||
|
||||
def get_extra_context(self):
|
||||
# Use a function so that PackagesLicensesForm get initialized at every
|
||||
# request
|
||||
return {
|
||||
'form': PackagesLicensesForm(),
|
||||
'read_only': True,
|
||||
'title': _('Other packages licenses'),
|
||||
}
|
||||
|
||||
|
||||
class RootView(SimpleView):
|
||||
extra_context = {'home_view': setting_home_view.value}
|
||||
template_name = 'appearance/root.html'
|
||||
|
||||
Reference in New Issue
Block a user