Merge branch 'versions/minor' into features/workflow_context
This commit is contained in:
@@ -36,7 +36,7 @@ PythonDependency(
|
||||
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'
|
||||
''', module=__name__, name='django', version_string='==1.11.22'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
@@ -59,7 +59,7 @@ PythonDependency(
|
||||
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'
|
||||
''', module=__name__, name='PyYAML', version_string='==5.1.1'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
@@ -303,7 +303,7 @@ PythonDependency(
|
||||
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'
|
||||
''', module=__name__, name='django-widget-tweaks', version_string='==1.4.5'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='furl', version_string='==2.0.0'
|
||||
@@ -318,7 +318,7 @@ PythonDependency(
|
||||
module=__name__, name='mock', version_string='==2.0.0'
|
||||
)
|
||||
PythonDependency(
|
||||
module=__name__, name='pathlib2', version_string='==2.3.3'
|
||||
module=__name__, name='pathlib2', version_string='==2.3.4'
|
||||
)
|
||||
PythonDependency(
|
||||
copyright_text='''
|
||||
@@ -381,7 +381,7 @@ PythonDependency(
|
||||
|
||||
PythonDependency(
|
||||
module=__name__, environment=environment_development, name='Werkzeug',
|
||||
version_string='==0.15.2'
|
||||
version_string='==0.15.4'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development, module=__name__,
|
||||
@@ -389,12 +389,12 @@ PythonDependency(
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development, module=__name__,
|
||||
name='django-extensions', version_string='==2.1.6'
|
||||
name='django-extensions', version_string='==2.1.9'
|
||||
)
|
||||
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'
|
||||
), module=__name__, name='django-rosetta', version_string='==0.9.3'
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_development, help_text=_(
|
||||
@@ -443,7 +443,7 @@ PythonDependency(
|
||||
)
|
||||
PythonDependency(
|
||||
environment=environment_testing, module=__name__, name='psutil',
|
||||
version_string='==5.6.1'
|
||||
version_string='==5.6.3'
|
||||
)
|
||||
|
||||
PythonDependency(
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.http import QueryDict
|
||||
from django.utils.encoding import force_bytes
|
||||
|
||||
|
||||
class URL(object):
|
||||
def __init__(self, path=None, query_string=None):
|
||||
self._path = path
|
||||
self._query_string = query_string
|
||||
kwargs = {'mutable': True}
|
||||
if query_string:
|
||||
kwargs['query_string'] = query_string.encode('utf-8')
|
||||
|
||||
self._args = QueryDict(**kwargs)
|
||||
|
||||
@property
|
||||
def args(self):
|
||||
return self._args
|
||||
|
||||
def to_string(self):
|
||||
if self._args.keys():
|
||||
query = force_bytes(
|
||||
'?{}'.format(self._args.urlencode())
|
||||
)
|
||||
else:
|
||||
query = ''
|
||||
|
||||
if self._path:
|
||||
path = self._path
|
||||
else:
|
||||
path = ''
|
||||
|
||||
result = force_bytes('{}{}'.format(path, query))
|
||||
|
||||
return result
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Arabic (http://www.transifex.com/rosarior/mayan-edms/language/ar/)\n"
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Bulgarian (http://www.transifex.com/rosarior/mayan-edms/language/bg/)\n"
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Bosnian (Bosnia and Herzegovina) (http://www.transifex.com/rosarior/mayan-edms/language/bs_BA/)\n"
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Czech (http://www.transifex.com/rosarior/mayan-edms/language/cs/)\n"
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Danish (Denmark) (http://www.transifex.com/rosarior/mayan-edms/language/da_DK/)\n"
|
||||
|
||||
@@ -16,7 +16,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: German (Germany) (http://www.transifex.com/rosarior/mayan-edms/language/de_DE/)\n"
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Greek (http://www.transifex.com/rosarior/mayan-edms/language/el/)\n"
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
||||
Binary file not shown.
@@ -11,8 +11,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-07-05 06:48+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Spanish (http://www.transifex.com/rosarior/mayan-edms/language/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -329,7 +329,7 @@ msgid ""
|
||||
"the list normally installed by Mayan EDMS. Each string should be a dotted "
|
||||
"Python path to: an application configuration class (preferred), or a package"
|
||||
" containing an application."
|
||||
msgstr ""
|
||||
msgstr "Una lista de nombres que designan todas las aplicaciones que se eliminarán de la lista que normalmente instala Mayan EDMS. Cada entrada debe ser una ruta de Python con puntos a: una clase de configuración de la aplicación (preferida) o un paquete que contenga una aplicación."
|
||||
|
||||
#: settings.py:43
|
||||
msgid ""
|
||||
@@ -337,7 +337,7 @@ msgid ""
|
||||
"those normally installed by Mayan EDMS. Each string should be a dotted "
|
||||
"Python path to: an application configuration class (preferred), or a package"
|
||||
" containing an application."
|
||||
msgstr ""
|
||||
msgstr "Una lista de nombres que designan todas las aplicaciones que se instalan más allá de las instaladas normalmente por Mayan EDMS. Cada entrada debe ser una ruta de Python con puntos a: una clase de configuración de la aplicación (preferida) o un paquete que contenga una aplicación."
|
||||
|
||||
#: settings.py:52
|
||||
msgid ""
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Persian (http://www.transifex.com/rosarior/mayan-edms/language/fa/)\n"
|
||||
|
||||
@@ -16,7 +16,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: French (http://www.transifex.com/rosarior/mayan-edms/language/fr/)\n"
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Hungarian (http://www.transifex.com/rosarior/mayan-edms/language/hu/)\n"
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Indonesian (http://www.transifex.com/rosarior/mayan-edms/language/id/)\n"
|
||||
|
||||
@@ -13,7 +13,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Italian (http://www.transifex.com/rosarior/mayan-edms/language/it/)\n"
|
||||
|
||||
Binary file not shown.
@@ -8,9 +8,9 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-07-01 05:47+0000\n"
|
||||
"Last-Translator: Māris Teivāns <maris.teivans@gmail.com>\n"
|
||||
"Language-Team: Latvian (http://www.transifex.com/rosarior/mayan-edms/language/lv/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -326,7 +326,7 @@ msgid ""
|
||||
"the list normally installed by Mayan EDMS. Each string should be a dotted "
|
||||
"Python path to: an application configuration class (preferred), or a package"
|
||||
" containing an application."
|
||||
msgstr ""
|
||||
msgstr "Saraksts ar virknēm, kas apzīmē visas lietojumprogrammas, kuras jānoņem no saraksta, kuras parasti uzstāda Mayan EDMS. Katrai virknei vajadzētu būt punktveida Python ceļam uz: lietojumprogrammas konfigurācijas klasi (vēlams) vai paketi, kurā ir lietojumprogramma."
|
||||
|
||||
#: settings.py:43
|
||||
msgid ""
|
||||
@@ -334,7 +334,7 @@ msgid ""
|
||||
"those normally installed by Mayan EDMS. Each string should be a dotted "
|
||||
"Python path to: an application configuration class (preferred), or a package"
|
||||
" containing an application."
|
||||
msgstr ""
|
||||
msgstr "Saraksts ar virknēm, kas apzīmē visas lietojumprogrammas, kas ir uzstādītas ārpus tām, ko parasti uzstāda Mayan EDMS. Katrai virknei vajadzētu būt punktveida Python ceļam uz: lietojumprogrammas konfigurācijas klasi (vēlams) vai paketi, kurā ir lietojumprogramma."
|
||||
|
||||
#: settings.py:52
|
||||
msgid ""
|
||||
|
||||
@@ -10,7 +10,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Dutch (Netherlands) (http://www.transifex.com/rosarior/mayan-edms/language/nl_NL/)\n"
|
||||
|
||||
@@ -14,7 +14,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Polish (http://www.transifex.com/rosarior/mayan-edms/language/pl/)\n"
|
||||
|
||||
@@ -10,7 +10,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Portuguese (http://www.transifex.com/rosarior/mayan-edms/language/pt/)\n"
|
||||
|
||||
@@ -13,7 +13,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/rosarior/mayan-edms/language/pt_BR/)\n"
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Romanian (Romania) (http://www.transifex.com/rosarior/mayan-edms/language/ro_RO/)\n"
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Russian (http://www.transifex.com/rosarior/mayan-edms/language/ru/)\n"
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Slovenian (Slovenia) (http://www.transifex.com/rosarior/mayan-edms/language/sl_SI/)\n"
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Turkish (Turkey) (http://www.transifex.com/rosarior/mayan-edms/language/tr_TR/)\n"
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Vietnamese (Viet Nam) (http://www.transifex.com/rosarior/mayan-edms/language/vi_VN/)\n"
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-06-29 02:15-0400\n"
|
||||
"POT-Creation-Date: 2019-07-05 01:28-0400\n"
|
||||
"PO-Revision-Date: 2019-06-29 06:21+0000\n"
|
||||
"Last-Translator: Roberto Rosario\n"
|
||||
"Language-Team: Chinese (http://www.transifex.com/rosarior/mayan-edms/language/zh/)\n"
|
||||
|
||||
@@ -8,10 +8,6 @@ from django.core.exceptions import FieldDoesNotExist
|
||||
from django.db.models.constants import LOOKUP_SEP
|
||||
from django.urls import resolve as django_resolve
|
||||
from django.urls.base import get_script_prefix
|
||||
from django.utils.datastructures import MultiValueDict
|
||||
from django.utils.http import (
|
||||
urlencode as django_urlencode, urlquote as django_urlquote
|
||||
)
|
||||
from django.utils.six.moves import reduce as reduce_function
|
||||
|
||||
from mayan.apps.common.compat import dict_type, dictionary_type
|
||||
@@ -150,50 +146,3 @@ def return_related(instance, related_field):
|
||||
using double underscore.
|
||||
"""
|
||||
return reduce_function(getattr, related_field.split('__'), instance)
|
||||
|
||||
|
||||
def urlquote(link=None, get=None):
|
||||
"""
|
||||
This method does both: urlquote() and urlencode()
|
||||
|
||||
urlqoute(): Quote special characters in 'link'
|
||||
|
||||
urlencode(): Map dictionary to query string key=value&...
|
||||
|
||||
HTML escaping is not done.
|
||||
|
||||
Example:
|
||||
|
||||
urlquote('/wiki/Python_(programming_language)')
|
||||
--> '/wiki/Python_%28programming_language%29'
|
||||
urlquote('/mypath/', {'key': 'value'})
|
||||
--> '/mypath/?key=value'
|
||||
urlquote('/mypath/', {'key': ['value1', 'value2']})
|
||||
--> '/mypath/?key=value1&key=value2'
|
||||
urlquote({'key': ['value1', 'value2']})
|
||||
--> 'key=value1&key=value2'
|
||||
"""
|
||||
if get is None:
|
||||
get = []
|
||||
|
||||
assert link or get
|
||||
if isinstance(link, dict):
|
||||
# urlqoute({'key': 'value', 'key2': 'value2'}) -->
|
||||
# key=value&key2=value2
|
||||
assert not get, get
|
||||
get = link
|
||||
link = ''
|
||||
assert isinstance(get, dict), 'wrong type "%s", dict required' % type(get)
|
||||
# assert not (link.startswith('http://') or link.startswith('https://')),
|
||||
# 'This method should only quote the url path.
|
||||
# It should not start with http(s):// (%s)' % (
|
||||
# link)
|
||||
if get:
|
||||
# http://code.djangoproject.com/ticket/9089
|
||||
if isinstance(get, MultiValueDict):
|
||||
get = get.lists()
|
||||
if link:
|
||||
link = '%s?' % django_urlquote(link)
|
||||
return '%s%s' % (link, django_urlencode(get, doseq=True))
|
||||
else:
|
||||
return django_urlquote(link)
|
||||
|
||||
Reference in New Issue
Block a user