misc: pylint fix unused-wildcard-import (#52222)
This commit is contained in:
parent
04f68506dc
commit
6ca8dc014c
|
@ -22,8 +22,8 @@ from wcs.carddef import CardDef
|
|||
from wcs.categories import CardDefCategory
|
||||
from wcs.data_sources import NamedDataSource
|
||||
from wcs.qommon.afterjobs import AfterJob
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.workflows import Workflow
|
||||
from wcs.workflows import WorkflowBackofficeFieldsFormDef
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ from wcs.data_sources import NamedDataSource
|
|||
from wcs.formdata import Evolution
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.qommon import ods
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.ident.password_accounts import PasswordAccount
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.workflows import EditableWorkflowStatusItem
|
||||
from wcs.workflows import Workflow
|
||||
from wcs.workflows import WorkflowBackofficeFieldsFormDef
|
||||
|
@ -451,11 +451,9 @@ def test_formdata_with_workflow_data(pub, local_user):
|
|||
formdata.status = 'wf-new'
|
||||
formdata.evolution[-1].status = 'wf-new'
|
||||
|
||||
from wcs.qommon.form import PicklableUpload as PicklableUpload3
|
||||
|
||||
upload = PicklableUpload3('test.txt', 'text/plain', 'ascii')
|
||||
upload = PicklableUpload('test.txt', 'text/plain', 'ascii')
|
||||
upload.receive([b'test'])
|
||||
upload2 = PicklableUpload3('test.txt', 'text/plain', 'ascii')
|
||||
upload2 = PicklableUpload('test.txt', 'text/plain', 'ascii')
|
||||
upload2.receive([b'test'])
|
||||
formdata.workflow_data = {'blah': upload, 'blah2': upload2, 'xxx': 23}
|
||||
formdata.store()
|
||||
|
|
|
@ -21,8 +21,8 @@ from wcs import qommon
|
|||
from wcs.api_utils import sign_url
|
||||
from wcs.data_sources import NamedDataSource
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.wf.jump import JumpWorkflowStatusItem
|
||||
from wcs.workflows import Workflow
|
||||
from wcs.workflows import WorkflowBackofficeFieldsFormDef
|
||||
|
|
|
@ -11,9 +11,9 @@ from utilities import get_app
|
|||
|
||||
from wcs import fields
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.ident.password_accounts import PasswordAccount
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.workflows import Workflow
|
||||
from wcs.workflows import WorkflowVariablesFieldsFormDef
|
||||
|
||||
|
|
|
@ -24,10 +24,10 @@ from wcs.blocks import BlockDef
|
|||
from wcs.carddef import CardDef
|
||||
from wcs.categories import Category
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.form import UploadedFile
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.ident.password_accounts import PasswordAccount
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.roles import logged_users_role
|
||||
from wcs.wf.backoffice_fields import SetBackofficeFieldsWorkflowStatusItem
|
||||
from wcs.wf.create_carddata import CreateCarddataWorkflowStatusItem
|
||||
|
|
|
@ -18,8 +18,8 @@ from wcs import fields
|
|||
from wcs.blocks import BlockDef
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.qommon import ods
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
|
||||
from .test_all import create_superuser
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ from wcs import fields
|
|||
from wcs.formdef import FormDef
|
||||
from wcs.qommon import sessions
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.variables import LazyFormData
|
||||
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ from wcs.conditions import Condition
|
|||
from wcs.formdata import Evolution
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.qommon import force_str
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.template import Template
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.variables import LazyFormData
|
||||
from wcs.wf.register_comment import JournalEvolutionPart
|
||||
from wcs.wf.wscall import JournalWsCallErrorPart
|
||||
|
|
|
@ -23,8 +23,8 @@ from wcs.fields import PageField
|
|||
from wcs.fields import StringField
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.formdef import get_formdefs_of_all_kinds
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.wf.form import FormWorkflowStatusItem
|
||||
from wcs.wf.form import WorkflowFormFieldsFormDef
|
||||
from wcs.workflows import AttachmentEvolutionPart
|
||||
|
|
|
@ -17,9 +17,9 @@ from webtest import Upload
|
|||
from wcs.fields import FileField
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.mail_templates import MailTemplate
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.ident.password_accounts import PasswordAccount
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.workflows import SendmailWorkflowStatusItem
|
||||
from wcs.workflows import Workflow
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ from wcs.qommon.backoffice.listing import pagination_links
|
|||
from wcs.qommon.emails import docutils
|
||||
from wcs.qommon.emails import email as send_email
|
||||
from wcs.qommon.form import FileSizeWidget
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.humantime import humanduration2seconds
|
||||
from wcs.qommon.humantime import seconds2humanduration
|
||||
|
@ -41,6 +40,7 @@ from wcs.qommon.misc import json_loads
|
|||
from wcs.qommon.misc import normalize_geolocation
|
||||
from wcs.qommon.misc import parse_isotime
|
||||
from wcs.qommon.misc import simplify
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.scripts import Script
|
||||
from wcs.wf.jump import JumpWorkflowStatusItem
|
||||
from wcs.workflows import Workflow
|
||||
|
|
|
@ -13,6 +13,7 @@ import pytest
|
|||
from quixote import cleanup
|
||||
from quixote import get_session
|
||||
from quixote import get_session_manager
|
||||
from quixote.errors import RequestError
|
||||
from test_hobo_notify import PROFILE
|
||||
from utilities import clean_temporary_pub
|
||||
from utilities import create_temporary_pub
|
||||
|
@ -20,7 +21,6 @@ from utilities import get_app
|
|||
|
||||
from wcs.qommon import sessions
|
||||
from wcs.qommon import x509utils
|
||||
from wcs.qommon.errors import RequestError
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.ident.idp import AdminIDPDir
|
||||
from wcs.qommon.ident.idp import MethodAdminDirectory
|
||||
|
|
|
@ -19,9 +19,9 @@ from wcs.fields import ItemField
|
|||
from wcs.formdef import FormDef
|
||||
from wcs.qommon.form import UploadedFile
|
||||
from wcs.qommon.misc import localstrftime
|
||||
from wcs.wf.export_to_model import ExportToModel
|
||||
from wcs.wf.form import FormWorkflowStatusItem
|
||||
from wcs.wf.form import WorkflowFormFieldsFormDef
|
||||
from wcs.workflows import ExportToModel
|
||||
from wcs.workflows import Workflow
|
||||
from wcs.wscalls import NamedWsCall
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ from wcs.wf.backoffice_fields import SetBackofficeFieldsWorkflowStatusItem
|
|||
from wcs.wf.create_formdata import CreateFormdataWorkflowStatusItem
|
||||
from wcs.wf.create_formdata import Mapping
|
||||
from wcs.wf.dispatch import DispatchWorkflowStatusItem
|
||||
from wcs.wf.export_to_model import ExportToModel
|
||||
from wcs.wf.external_workflow import ExternalWorkflowGlobalAction
|
||||
from wcs.wf.form import FormWorkflowStatusItem
|
||||
from wcs.wf.form import WorkflowFormFieldsFormDef
|
||||
|
@ -31,7 +32,6 @@ from wcs.wf.wscall import WebserviceCallStatusItem
|
|||
from wcs.workflows import ChoiceWorkflowStatusItem
|
||||
from wcs.workflows import CommentableWorkflowStatusItem
|
||||
from wcs.workflows import DisplayMessageWorkflowStatusItem
|
||||
from wcs.workflows import ExportToModel
|
||||
from wcs.workflows import JumpOnSubmitWorkflowStatusItem
|
||||
from wcs.workflows import SendmailWorkflowStatusItem
|
||||
from wcs.workflows import SendSMSWorkflowStatusItem
|
||||
|
|
|
@ -46,9 +46,9 @@ from wcs.fields import TitleField
|
|||
from wcs.formdata import Evolution
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.qommon.errors import ConnectionError
|
||||
from wcs.qommon.form import PicklableUpload
|
||||
from wcs.qommon.form import *
|
||||
from wcs.qommon.http_request import HTTPRequest
|
||||
from wcs.qommon.upload_storage import PicklableUpload
|
||||
from wcs.wf.aggregation_email import AggregationEmail
|
||||
from wcs.wf.aggregation_email import AggregationEmailWorkflowStatusItem
|
||||
from wcs.wf.aggregation_email import send_aggregation_emails
|
||||
|
@ -4357,25 +4357,6 @@ def test_set_backoffice_field_file(http_requests, two_pubs):
|
|||
open(os.path.join(os.path.dirname(__file__), 'image-with-gps-data.jpeg'), 'rb').read()
|
||||
)
|
||||
|
||||
# same test with PicklableUpload wcs.qommon.form
|
||||
from wcs.qommon.form import PicklableUpload as PicklableUpload2
|
||||
|
||||
upload2 = PicklableUpload2('test2.odt', 'application/vnd.oasis.opendocument.text')
|
||||
upload2.receive([open(os.path.join(os.path.dirname(__file__), 'template.odt'), 'rb').read()])
|
||||
formdata = formdef.data_class()()
|
||||
formdata.data = {'00': upload2}
|
||||
formdata.just_created()
|
||||
formdata.store()
|
||||
two_pubs.substitutions.feed(formdata)
|
||||
item.perform(formdata)
|
||||
formdata = formdef.data_class().get(formdata.id)
|
||||
assert formdata.data['bo1'].base_filename == 'test2.odt'
|
||||
assert formdata.data['bo1'].content_type == 'application/vnd.oasis.opendocument.text'
|
||||
assert (
|
||||
formdata.data['bo1'].get_content()
|
||||
== open(os.path.join(os.path.dirname(__file__), 'template.odt'), 'rb').read()
|
||||
)
|
||||
|
||||
# check with template string
|
||||
formdata = formdef.data_class()()
|
||||
formdata.data = {'00': upload}
|
||||
|
@ -4449,6 +4430,8 @@ def test_set_backoffice_field_file(http_requests, two_pubs):
|
|||
assert formdata.data['00'].get_content().find(b'<exif:XResolution>')
|
||||
assert not Image or formdata.data['bo1'].get_content().find(b'<exif:XResolution>') == -1
|
||||
|
||||
upload2 = PicklableUpload('test2.odt', 'application/vnd.oasis.opendocument.text')
|
||||
upload2.receive([open(os.path.join(os.path.dirname(__file__), 'template.odt'), 'rb').read()])
|
||||
formdata = formdef.data_class()()
|
||||
formdata.data = {'00': upload2}
|
||||
formdata.just_created()
|
||||
|
@ -4458,6 +4441,10 @@ def test_set_backoffice_field_file(http_requests, two_pubs):
|
|||
formdata = formdef.data_class().get(formdata.id)
|
||||
assert formdata.data['bo1'].base_filename == 'new_test2.odt'
|
||||
assert formdata.data['bo1'].content_type == 'my content type'
|
||||
assert (
|
||||
formdata.data['bo1'].get_content()
|
||||
== open(os.path.join(os.path.dirname(__file__), 'template.odt'), 'rb').read()
|
||||
)
|
||||
assert formdata.data['bo1'].qfilename == formdata.data['00'].qfilename
|
||||
|
||||
# check storing response as attachment
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import TemplateIO
|
||||
|
@ -26,7 +28,10 @@ from wcs.formdef import FormDef
|
|||
from wcs.qommon import N_
|
||||
from wcs.qommon import _
|
||||
from wcs.qommon.backoffice.menu import html_top
|
||||
from wcs.qommon.form import *
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import HtmlWidget
|
||||
from wcs.qommon.form import StringWidget
|
||||
from wcs.qommon.form import WysiwygTextWidget
|
||||
|
||||
|
||||
class CategoryUI(object):
|
||||
|
|
|
@ -38,10 +38,14 @@ from wcs.qommon import force_str
|
|||
from wcs.qommon import misc
|
||||
from wcs.qommon import template
|
||||
from wcs.qommon.backoffice.menu import html_top
|
||||
from wcs.qommon.form import CheckboxWidget
|
||||
from wcs.qommon.form import DurationWidget
|
||||
from wcs.qommon.form import FileWidget
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import HtmlWidget
|
||||
from wcs.qommon.form import StringWidget
|
||||
from wcs.qommon.form import TextWidget
|
||||
from wcs.qommon.form import UrlWidget
|
||||
from wcs.qommon.form import *
|
||||
from wcs.qommon.form import get_response
|
||||
from wcs.qommon.form import get_session
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
import copy
|
||||
import json
|
||||
|
||||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import get_session
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import TemplateIO
|
||||
|
@ -29,13 +32,18 @@ from wcs import fields
|
|||
from wcs.admin import utils
|
||||
from wcs.fields import get_field_options
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.qommon import N_
|
||||
from wcs.qommon import _
|
||||
from wcs.qommon import errors
|
||||
from wcs.qommon import get_cfg
|
||||
from wcs.qommon import misc
|
||||
from wcs.qommon.admin.menu import command_icon
|
||||
from wcs.qommon.backoffice.menu import html_top
|
||||
from wcs.qommon.form import *
|
||||
from wcs.qommon.form import CheckboxWidget
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import HtmlWidget
|
||||
from wcs.qommon.form import SingleSelectWidget
|
||||
from wcs.qommon.form import StringWidget
|
||||
|
||||
|
||||
class FieldDefPage(Directory):
|
||||
|
|
|
@ -24,7 +24,9 @@ import time
|
|||
import xml.etree.ElementTree as ET
|
||||
|
||||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import get_session
|
||||
from quixote import redirect
|
||||
from quixote.directory import AccessControlled
|
||||
from quixote.directory import Directory
|
||||
|
@ -48,7 +50,20 @@ from wcs.qommon import template
|
|||
from wcs.qommon.afterjobs import AfterJob
|
||||
from wcs.qommon.backoffice.menu import html_top
|
||||
from wcs.qommon.errors import TraversalError
|
||||
from wcs.qommon.form import *
|
||||
from wcs.qommon.form import CheckboxesWidget
|
||||
from wcs.qommon.form import CheckboxWidget
|
||||
from wcs.qommon.form import DateTimeWidget
|
||||
from wcs.qommon.form import DateWidget
|
||||
from wcs.qommon.form import FileWidget
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import HtmlWidget
|
||||
from wcs.qommon.form import SingleSelectWidget
|
||||
from wcs.qommon.form import StringWidget
|
||||
from wcs.qommon.form import UrlWidget
|
||||
from wcs.qommon.form import ValidatedStringWidget
|
||||
from wcs.qommon.form import WcsExtraStringWidget
|
||||
from wcs.qommon.form import WidgetList
|
||||
from wcs.qommon.form import WysiwygTextWidget
|
||||
from wcs.qommon.misc import C_
|
||||
from wcs.qommon.storage import Equal
|
||||
from wcs.qommon.storage import NotEqual
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from quixote import get_publisher
|
||||
from quixote import get_response
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import TemplateIO
|
||||
|
@ -24,7 +26,12 @@ from wcs.qommon import _
|
|||
from wcs.qommon import errors
|
||||
from wcs.qommon import get_cfg
|
||||
from wcs.qommon.backoffice.menu import html_top
|
||||
from wcs.qommon.form import *
|
||||
from wcs.qommon.form import CheckboxWidget
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import HtmlWidget
|
||||
from wcs.qommon.form import StringWidget
|
||||
from wcs.qommon.form import TextWidget
|
||||
from wcs.qommon.form import WidgetList
|
||||
from wcs.roles import get_user_roles
|
||||
|
||||
|
||||
|
|
|
@ -29,9 +29,11 @@ import xml.etree.ElementTree as ET
|
|||
import zipfile
|
||||
|
||||
from django.utils.encoding import force_bytes
|
||||
from django.utils.encoding import force_text
|
||||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import get_session
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import TemplateIO
|
||||
|
@ -57,7 +59,20 @@ from wcs.qommon.admin.settings import SettingsDirectory as QommonSettingsDirecto
|
|||
from wcs.qommon.admin.texts import TextsDirectory
|
||||
from wcs.qommon.afterjobs import AfterJob
|
||||
from wcs.qommon.backoffice.menu import html_top
|
||||
from wcs.qommon.form import *
|
||||
from wcs.qommon.form import CheckboxesTableWidget
|
||||
from wcs.qommon.form import CheckboxesWidget
|
||||
from wcs.qommon.form import CheckboxWidget
|
||||
from wcs.qommon.form import ComputedExpressionWidget
|
||||
from wcs.qommon.form import FileWidget
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import IntWidget
|
||||
from wcs.qommon.form import MapWidget
|
||||
from wcs.qommon.form import PasswordWidget
|
||||
from wcs.qommon.form import SingleSelectWidget
|
||||
from wcs.qommon.form import StringWidget
|
||||
from wcs.qommon.form import TextWidget
|
||||
from wcs.qommon.form import UrlWidget
|
||||
from wcs.qommon.form import WidgetList
|
||||
from wcs.qommon.sms import SMS
|
||||
from wcs.workflows import Workflow
|
||||
from wcs.workflows import WorkflowImportError
|
||||
|
|
|
@ -35,7 +35,13 @@ from wcs.qommon.admin.emails import EmailsDirectory
|
|||
from wcs.qommon.admin.menu import error_page
|
||||
from wcs.qommon.backoffice.listing import pagination_links
|
||||
from wcs.qommon.backoffice.menu import html_top
|
||||
from wcs.qommon.form import *
|
||||
from wcs.qommon.form import CheckboxWidget
|
||||
from wcs.qommon.form import EmailWidget
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import HtmlWidget
|
||||
from wcs.qommon.form import SingleSelectWidget
|
||||
from wcs.qommon.form import StringWidget
|
||||
from wcs.qommon.form import WidgetList
|
||||
from wcs.qommon.ident.idp import is_idp_managing_user_attributes
|
||||
from wcs.qommon.ident.idp import is_idp_managing_user_roles
|
||||
|
||||
|
|
|
@ -27,7 +27,9 @@ from subprocess import Popen
|
|||
|
||||
from django.utils.encoding import force_bytes
|
||||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import get_session
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import TemplateIO
|
||||
|
@ -38,6 +40,7 @@ from wcs.backoffice.studio import StudioDirectory
|
|||
from wcs.carddef import CardDef
|
||||
from wcs.formdata import Evolution
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.qommon import N_
|
||||
from wcs.qommon import _
|
||||
from wcs.qommon import errors
|
||||
from wcs.qommon import force_str
|
||||
|
@ -45,8 +48,25 @@ from wcs.qommon import get_logger
|
|||
from wcs.qommon import misc
|
||||
from wcs.qommon.admin.menu import command_icon
|
||||
from wcs.qommon.backoffice.menu import html_top
|
||||
from wcs.qommon.form import *
|
||||
from wcs.workflows import *
|
||||
from wcs.qommon.form import CheckboxWidget
|
||||
from wcs.qommon.form import ColourWidget
|
||||
from wcs.qommon.form import CompositeWidget
|
||||
from wcs.qommon.form import FileWidget
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import HtmlWidget
|
||||
from wcs.qommon.form import SingleSelectWidget
|
||||
from wcs.qommon.form import StringWidget
|
||||
from wcs.qommon.form import UrlWidget
|
||||
from wcs.qommon.form import VarnameWidget
|
||||
from wcs.qommon.form import WysiwygTextWidget
|
||||
from wcs.workflows import DuplicateGlobalActionNameError
|
||||
from wcs.workflows import DuplicateStatusNameError
|
||||
from wcs.workflows import Workflow
|
||||
from wcs.workflows import WorkflowBackofficeFieldsFormDef
|
||||
from wcs.workflows import WorkflowCriticalityLevel
|
||||
from wcs.workflows import WorkflowImportError
|
||||
from wcs.workflows import WorkflowVariablesFieldsFormDef
|
||||
from wcs.workflows import item_classes
|
||||
|
||||
from . import utils
|
||||
from .data_sources import NamedDataSourcesDirectory
|
||||
|
|
|
@ -18,6 +18,7 @@ import xml.etree.ElementTree as ET
|
|||
|
||||
from quixote import get_publisher
|
||||
from quixote import get_response
|
||||
from quixote import get_session
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import TemplateIO
|
||||
|
@ -27,10 +28,16 @@ from wcs.admin import utils
|
|||
from wcs.backoffice.snapshots import SnapshotsDirectory
|
||||
from wcs.qommon import _
|
||||
from wcs.qommon import errors
|
||||
from wcs.qommon import force_str
|
||||
from wcs.qommon import misc
|
||||
from wcs.qommon import template
|
||||
from wcs.qommon.backoffice.menu import html_top
|
||||
from wcs.qommon.form import *
|
||||
from wcs.qommon.form import CheckboxWidget
|
||||
from wcs.qommon.form import FileWidget
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import HtmlWidget
|
||||
from wcs.qommon.form import StringWidget
|
||||
from wcs.qommon.form import TextWidget
|
||||
from wcs.wscalls import NamedWsCall
|
||||
from wcs.wscalls import WsCallRequestWidget
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ from ..qommon import emails
|
|||
from ..qommon import errors
|
||||
from ..qommon import ezt
|
||||
from ..qommon import force_str
|
||||
from ..qommon import get_cfg
|
||||
from ..qommon import get_logger
|
||||
from ..qommon import misc
|
||||
from ..qommon import ngettext
|
||||
|
@ -68,8 +69,18 @@ from ..qommon.afterjobs import AfterJob
|
|||
from ..qommon.backoffice.listing import pagination_links
|
||||
from ..qommon.backoffice.menu import html_top
|
||||
from ..qommon.evalutils import make_datetime
|
||||
from ..qommon.form import PicklableUpload
|
||||
from ..qommon.form import *
|
||||
from ..qommon.form import CheckboxWidget
|
||||
from ..qommon.form import DateWidget
|
||||
from ..qommon.form import EmailWidget
|
||||
from ..qommon.form import Form
|
||||
from ..qommon.form import HiddenWidget
|
||||
from ..qommon.form import HtmlWidget
|
||||
from ..qommon.form import MapWidget
|
||||
from ..qommon.form import RadiobuttonsWidget
|
||||
from ..qommon.form import SingleSelectWidget
|
||||
from ..qommon.form import StringWidget
|
||||
from ..qommon.form import TextWidget
|
||||
from ..qommon.form import WysiwygTextWidget
|
||||
from ..qommon.misc import C_
|
||||
from ..qommon.misc import ellipsize
|
||||
from ..qommon.storage import Contains
|
||||
|
@ -85,6 +96,7 @@ from ..qommon.storage import Null
|
|||
from ..qommon.storage import Or
|
||||
from ..qommon.substitution import CompatibilityNamesDict
|
||||
from ..qommon.template import Template
|
||||
from ..qommon.upload_storage import PicklableUpload
|
||||
from .submission import FormFillPage
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
|
||||
from django.utils.translation import pgettext
|
||||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
|
@ -39,7 +41,6 @@ from ..qommon import template
|
|||
from ..qommon.afterjobs import AfterJob
|
||||
from ..qommon.backoffice import BackofficeRootDirectory
|
||||
from ..qommon.backoffice.menu import html_top
|
||||
from ..qommon.form import *
|
||||
from . import cards
|
||||
from . import data_management
|
||||
from . import management
|
||||
|
|
|
@ -36,7 +36,8 @@ from ..qommon import _
|
|||
from ..qommon import errors
|
||||
from ..qommon import misc
|
||||
from ..qommon.backoffice.menu import html_top
|
||||
from ..qommon.form import *
|
||||
from ..qommon.form import Form
|
||||
from ..qommon.form import HtmlWidget
|
||||
from ..qommon.storage import Equal
|
||||
from ..qommon.storage import NotEqual
|
||||
|
||||
|
|
|
@ -37,7 +37,10 @@ from .qommon import get_logger
|
|||
from .qommon import misc
|
||||
from .qommon.afterjobs import AfterJob
|
||||
from .qommon.cron import CronJob
|
||||
from .qommon.form import *
|
||||
from .qommon.form import CompositeWidget
|
||||
from .qommon.form import OptGroup
|
||||
from .qommon.form import SingleSelectWidget
|
||||
from .qommon.form import StringWidget
|
||||
from .qommon.humantime import seconds2humanduration
|
||||
from .qommon.misc import get_variadic_url
|
||||
from .qommon.publisher import get_publisher_class
|
||||
|
|
|
@ -35,7 +35,9 @@ from django.utils.formats import date_format as django_date_format
|
|||
from django.utils.html import urlize
|
||||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
from quixote import get_session
|
||||
from quixote.html import TemplateIO
|
||||
from quixote.html import htmlescape
|
||||
from quixote.html import htmltag
|
||||
from quixote.html import htmltext
|
||||
|
||||
|
@ -49,7 +51,40 @@ from .qommon import _
|
|||
from .qommon import evalutils
|
||||
from .qommon import force_str
|
||||
from .qommon import get_cfg
|
||||
from .qommon.form import *
|
||||
from .qommon import misc
|
||||
from .qommon.form import AutocompleteStringWidget
|
||||
from .qommon.form import CheckboxesWidget
|
||||
from .qommon.form import CheckboxWidget
|
||||
from .qommon.form import CommentWidget
|
||||
from .qommon.form import CompositeWidget
|
||||
from .qommon.form import ComputedExpressionWidget
|
||||
from .qommon.form import ConditionWidget
|
||||
from .qommon.form import DateWidget
|
||||
from .qommon.form import EmailWidget
|
||||
from .qommon.form import FileSizeWidget
|
||||
from .qommon.form import FileWithPreviewWidget
|
||||
from .qommon.form import HiddenWidget
|
||||
from .qommon.form import HtmlWidget
|
||||
from .qommon.form import IntWidget
|
||||
from .qommon.form import JsonpSingleSelectWidget
|
||||
from .qommon.form import MapMarkerSelectionWidget
|
||||
from .qommon.form import MapWidget
|
||||
from .qommon.form import PasswordEntryWidget
|
||||
from .qommon.form import RadiobuttonsWidget
|
||||
from .qommon.form import RankedItemsWidget
|
||||
from .qommon.form import SingleSelectHintWidget
|
||||
from .qommon.form import SingleSelectTableWidget
|
||||
from .qommon.form import SingleSelectWidget
|
||||
from .qommon.form import StringWidget
|
||||
from .qommon.form import TableListRowsWidget
|
||||
from .qommon.form import TableWidget
|
||||
from .qommon.form import TextWidget
|
||||
from .qommon.form import ValidationWidget
|
||||
from .qommon.form import VarnameWidget
|
||||
from .qommon.form import WcsExtraStringWidget
|
||||
from .qommon.form import WidgetList
|
||||
from .qommon.form import WidgetListAsTable
|
||||
from .qommon.form import WysiwygTextWidget
|
||||
from .qommon.misc import date_format
|
||||
from .qommon.misc import ellipsize
|
||||
from .qommon.misc import get_as_datetime
|
||||
|
@ -61,6 +96,7 @@ from .qommon.ods import NS as OD_NS
|
|||
from .qommon.ods import clean_text as od_clean_text
|
||||
from .qommon.template import Template
|
||||
from .qommon.template import TemplateError
|
||||
from .qommon.upload_storage import PicklableUpload
|
||||
|
||||
|
||||
class PrefillSelectionWidget(CompositeWidget):
|
||||
|
|
|
@ -20,6 +20,7 @@ import datetime
|
|||
import glob
|
||||
import itertools
|
||||
import json
|
||||
import os
|
||||
import pickle
|
||||
import sys
|
||||
import time
|
||||
|
@ -29,7 +30,8 @@ import xml.etree.ElementTree as ET
|
|||
from django.utils.encoding import force_bytes
|
||||
from django.utils.encoding import force_text
|
||||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
from quixote import get_session
|
||||
from quixote.html import htmltext
|
||||
from quixote.http_request import Upload
|
||||
|
||||
from . import data_sources
|
||||
|
@ -43,7 +45,10 @@ from .qommon import force_str
|
|||
from .qommon import get_cfg
|
||||
from .qommon.admin.emails import EmailsDirectory
|
||||
from .qommon.cron import CronJob
|
||||
from .qommon.form import *
|
||||
from .qommon.form import Form
|
||||
from .qommon.form import HtmlWidget
|
||||
from .qommon.form import UploadedFile
|
||||
from .qommon.misc import JSONEncoder
|
||||
from .qommon.misc import get_as_datetime
|
||||
from .qommon.misc import simplify
|
||||
from .qommon.misc import xml_node_text
|
||||
|
@ -52,6 +57,7 @@ from .qommon.storage import Equal
|
|||
from .qommon.storage import StorableObject
|
||||
from .qommon.storage import fix_key
|
||||
from .qommon.substitution import Substitutions
|
||||
from .qommon.template import Template
|
||||
from .roles import logged_users_role
|
||||
|
||||
DRAFTS_DEFAULT_LIFESPAN = 100 # days
|
||||
|
@ -843,7 +849,7 @@ class FormDef(StorableObject):
|
|||
if self.required_authentication_contexts:
|
||||
root['required_authentication_contexts'] = self.required_authentication_contexts[:]
|
||||
|
||||
return json.dumps(root, indent=indent, sort_keys=True, cls=misc.JSONEncoder)
|
||||
return json.dumps(root, indent=indent, sort_keys=True, cls=JSONEncoder)
|
||||
|
||||
@classmethod
|
||||
def import_from_json(cls, fd, charset=None, include_id=False):
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.errors import PublishError
|
||||
|
||||
from wcs.formdef import FormDef
|
||||
from wcs.forms.common import FormTemplateMixin
|
||||
|
@ -29,7 +30,7 @@ from ..qommon import tokens
|
|||
from ..qommon.form import Form
|
||||
|
||||
|
||||
class MissingOrExpiredToken(errors.PublishError):
|
||||
class MissingOrExpiredToken(PublishError):
|
||||
status_code = 404
|
||||
title = N_('Error')
|
||||
description = N_('This action link has already been used or has expired.')
|
||||
|
|
|
@ -29,7 +29,6 @@ from wcs.roles import logged_users_role
|
|||
from ..qommon import _
|
||||
from ..qommon import misc
|
||||
from ..qommon.backoffice.listing import pagination_links
|
||||
from ..qommon.form import *
|
||||
|
||||
|
||||
class FormDefUI(object):
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
import urllib.parse
|
||||
|
||||
|
@ -43,7 +45,6 @@ from ..qommon import errors
|
|||
from ..qommon import get_logger
|
||||
from ..qommon import misc
|
||||
from ..qommon import template
|
||||
from ..qommon.form import *
|
||||
|
||||
|
||||
class FileDirectory(Directory):
|
||||
|
|
|
@ -35,7 +35,7 @@ from quixote import get_session_manager
|
|||
from quixote import redirect
|
||||
from quixote.directory import AccessControlled
|
||||
from quixote.directory import Directory
|
||||
from quixote.form.widget import *
|
||||
from quixote.errors import RequestError
|
||||
from quixote.html import TemplateIO
|
||||
from quixote.html import htmltext
|
||||
from quixote.util import randbytes
|
||||
|
@ -46,6 +46,7 @@ from wcs.formdef import FormDef
|
|||
from wcs.forms.common import FormStatusPage
|
||||
from wcs.forms.common import FormTemplateMixin
|
||||
from wcs.qommon.admin.texts import TextsDirectory
|
||||
from wcs.qommon.form import get_selection_error_text
|
||||
from wcs.roles import logged_users_role
|
||||
from wcs.variables import LazyFormDef
|
||||
from wcs.workflows import Workflow
|
||||
|
@ -60,7 +61,12 @@ from ..qommon import get_logger
|
|||
from ..qommon import misc
|
||||
from ..qommon import template
|
||||
from ..qommon.admin.emails import EmailsDirectory
|
||||
from ..qommon.form import *
|
||||
from ..qommon.form import CheckboxWidget
|
||||
from ..qommon.form import EmailWidget
|
||||
from ..qommon.form import Form
|
||||
from ..qommon.form import HiddenErrorWidget
|
||||
from ..qommon.form import HtmlWidget
|
||||
from ..qommon.form import StringWidget
|
||||
|
||||
|
||||
class SubmittedDraftException(Exception):
|
||||
|
@ -511,7 +517,7 @@ class FormPage(Directory, FormTemplateMixin):
|
|||
if page == self.pages[0] and 'cancelurl' in get_request().form:
|
||||
cancelurl = get_request().form['cancelurl']
|
||||
if not get_publisher().is_relatable_url(cancelurl):
|
||||
raise errors.RequestError('invalid cancel URL')
|
||||
raise RequestError('invalid cancel URL')
|
||||
form_data['__cancelurl'] = cancelurl
|
||||
session.add_magictoken(magictoken, form_data)
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ class FargoDirectory(Directory):
|
|||
scheme, netloc, path, qs, frag = urllib.parse.urlsplit(url)
|
||||
path = path.split('/')
|
||||
name = urllib.parse.unquote(path[-1])
|
||||
from .qommon.form import PicklableUpload
|
||||
from .qommon.upload_storage import PicklableUpload
|
||||
|
||||
download = PicklableUpload(name, content_type='application/pdf')
|
||||
download.receive([document])
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from quixote import get_publisher
|
||||
from quixote import get_response
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import TemplateIO
|
||||
|
@ -24,7 +26,11 @@ from .. import get_cfg
|
|||
from .. import misc
|
||||
from ..admin.cfg import cfg_submit
|
||||
from ..backoffice.menu import html_top
|
||||
from ..form import *
|
||||
from ..form import CheckboxWidget
|
||||
from ..form import Form
|
||||
from ..form import StringWidget
|
||||
from ..form import TextWidget
|
||||
from ..form import WidgetList
|
||||
|
||||
|
||||
class EmailsDirectory(Directory):
|
||||
|
|
|
@ -14,17 +14,23 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from quixote import get_response
|
||||
from quixote import redirect
|
||||
from quixote.directory import AccessControlled
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import TemplateIO
|
||||
from quixote.html import htmltext
|
||||
|
||||
from wcs.qommon import get_cfg
|
||||
|
||||
from .. import N_
|
||||
from .. import _
|
||||
from ..admin.cfg import cfg_submit
|
||||
from ..backoffice.menu import html_top
|
||||
from ..form import *
|
||||
from ..form import CheckboxWidget
|
||||
from ..form import Form
|
||||
from ..form import SingleSelectWidget
|
||||
from ..form import StringWidget
|
||||
|
||||
|
||||
class SettingsDirectory(AccessControlled, Directory):
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
import os
|
||||
|
||||
from quixote import get_publisher
|
||||
from quixote import get_response
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import TemplateIO
|
||||
|
@ -27,7 +28,8 @@ from wcs.qommon import ezt
|
|||
from wcs.qommon import get_cfg
|
||||
from wcs.qommon import misc
|
||||
from wcs.qommon.backoffice.menu import html_top
|
||||
from wcs.qommon.form import *
|
||||
from wcs.qommon.form import Form
|
||||
from wcs.qommon.form import WysiwygTextWidget
|
||||
from wcs.qommon.template import Template
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ import urllib.parse
|
|||
|
||||
import quixote
|
||||
from quixote import get_publisher
|
||||
from quixote.errors import *
|
||||
from quixote.errors import AccessError
|
||||
from quixote.errors import TraversalError
|
||||
from quixote.html import TemplateIO
|
||||
from quixote.html import htmltext
|
||||
|
||||
|
|
|
@ -64,7 +64,16 @@ from quixote import get_publisher
|
|||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import get_session
|
||||
from quixote.form import *
|
||||
from quixote.form import CheckboxWidget
|
||||
from quixote.form import FileWidget
|
||||
from quixote.form import Form
|
||||
from quixote.form import HiddenWidget
|
||||
from quixote.form import IntWidget
|
||||
from quixote.form import PasswordWidget
|
||||
from quixote.form import SelectWidget
|
||||
from quixote.form import StringWidget
|
||||
from quixote.form import TextWidget
|
||||
from quixote.form import Widget
|
||||
from quixote.html import TemplateIO
|
||||
from quixote.html import htmlescape
|
||||
from quixote.html import htmltag
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import re
|
||||
import tempfile
|
||||
import urllib.parse
|
||||
|
||||
try:
|
||||
|
@ -25,6 +27,7 @@ except ImportError:
|
|||
from django.utils.encoding import force_bytes
|
||||
from django.utils.encoding import force_text
|
||||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import get_session
|
||||
from quixote import redirect
|
||||
|
@ -43,7 +46,15 @@ from .. import template
|
|||
from .. import x509utils
|
||||
from ..admin.menu import command_icon
|
||||
from ..backoffice.menu import html_top
|
||||
from ..form import *
|
||||
from ..form import CheckboxWidget
|
||||
from ..form import EmailWidget
|
||||
from ..form import FileWidget
|
||||
from ..form import Form
|
||||
from ..form import HtmlWidget
|
||||
from ..form import RadiobuttonsWidget
|
||||
from ..form import SingleSelectWidget
|
||||
from ..form import StringWidget
|
||||
from ..form import WidgetDict
|
||||
from ..storage import atomic_write
|
||||
from ..tokens import Token
|
||||
from .base import AuthMethod
|
||||
|
|
|
@ -19,6 +19,9 @@ import random
|
|||
import time
|
||||
|
||||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import get_session
|
||||
from quixote import redirect
|
||||
from quixote.directory import AccessControlled
|
||||
from quixote.directory import Directory
|
||||
|
@ -43,7 +46,17 @@ from ..admin.menu import command_icon
|
|||
from ..afterjobs import AfterJob
|
||||
from ..backoffice.menu import html_top
|
||||
from ..cron import CronJob
|
||||
from ..form import *
|
||||
from ..form import CheckboxWidget
|
||||
from ..form import CompositeWidget
|
||||
from ..form import EmailWidget
|
||||
from ..form import Form
|
||||
from ..form import HiddenWidget
|
||||
from ..form import IntWidget
|
||||
from ..form import PasswordEntryWidget
|
||||
from ..form import PasswordWidget
|
||||
from ..form import RadiobuttonsWidget
|
||||
from ..form import SingleSelectWidget
|
||||
from ..form import StringWidget
|
||||
from ..publisher import get_publisher_class
|
||||
from .base import AuthMethod
|
||||
from .base import NoSuchMethodForUserError
|
||||
|
|
|
@ -49,6 +49,7 @@ from quixote import get_publisher
|
|||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import redirect
|
||||
from quixote.errors import RequestError
|
||||
from quixote.html import htmltext
|
||||
|
||||
from . import _
|
||||
|
@ -57,7 +58,6 @@ from . import force_str
|
|||
from . import get_cfg
|
||||
from . import get_logger
|
||||
from .errors import ConnectionError
|
||||
from .errors import RequestError
|
||||
from .template import Template
|
||||
|
||||
try:
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import get_session
|
||||
from quixote import get_session_manager
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
|
@ -30,7 +31,9 @@ from . import _
|
|||
from . import errors
|
||||
from . import get_cfg
|
||||
from . import template
|
||||
from .form import *
|
||||
from .form import Form
|
||||
from .form import HtmlWidget
|
||||
from .form import PasswordWidget
|
||||
from .ident.password_accounts import PasswordAccount
|
||||
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ from quixote.publish import get_response
|
|||
from quixote.publish import redirect
|
||||
|
||||
from . import N_
|
||||
from . import _
|
||||
from . import errors
|
||||
from . import force_str
|
||||
from . import logger
|
||||
|
|
|
@ -34,6 +34,7 @@ from quixote import get_session
|
|||
from quixote import get_session_manager
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.errors import RequestError
|
||||
from quixote.http_request import parse_header
|
||||
|
||||
from . import _
|
||||
|
@ -386,7 +387,7 @@ class Saml2Directory(Directory):
|
|||
after_url.startswith(get_publisher().get_backoffice_url())
|
||||
or after_url.startswith(get_publisher().get_frontoffice_url())
|
||||
):
|
||||
raise errors.RequestError()
|
||||
raise RequestError()
|
||||
else:
|
||||
after_url = get_publisher().get_frontoffice_url()
|
||||
response.set_status(303)
|
||||
|
|
|
@ -48,7 +48,8 @@ from .qommon import pages
|
|||
from .qommon import saml2
|
||||
from .qommon import template
|
||||
from .qommon.afterjobs import AfterJobStatusDirectory
|
||||
from .qommon.form import *
|
||||
from .qommon.form import Form
|
||||
from .qommon.form import RadiobuttonsWidget
|
||||
from .qommon.upload_storage import UploadStorageError
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from quixote import get_publisher
|
||||
|
||||
from wcs.workflows import WorkflowStatusItem
|
||||
from wcs.workflows import register_item_class
|
||||
|
||||
|
@ -21,7 +23,8 @@ from ..qommon import N_
|
|||
from ..qommon import _
|
||||
from ..qommon import emails
|
||||
from ..qommon.cron import CronJob
|
||||
from ..qommon.form import *
|
||||
from ..qommon.form import SingleSelectWidget
|
||||
from ..qommon.form import WidgetList
|
||||
from ..qommon.publisher import get_publisher_class
|
||||
from ..qommon.storage import StorableObject
|
||||
|
||||
|
|
|
@ -14,21 +14,33 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import urllib.parse
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from quixote import get_request
|
||||
from quixote import redirect
|
||||
|
||||
from wcs.forms.common import FileDirectory
|
||||
from wcs.forms.common import FormStatusPage
|
||||
from wcs.portfolio import has_portfolio
|
||||
from wcs.portfolio import push_document
|
||||
from wcs.workflows import *
|
||||
from wcs.workflows import AttachmentEvolutionPart
|
||||
from wcs.workflows import WorkflowStatusItem
|
||||
from wcs.workflows import register_item_class
|
||||
|
||||
from ..qommon import N_
|
||||
from ..qommon import _
|
||||
from ..qommon import get_cfg
|
||||
from ..qommon.errors import *
|
||||
from ..qommon.errors import TraversalError
|
||||
from ..qommon.form import CheckboxWidget
|
||||
from ..qommon.form import FileSizeWidget
|
||||
from ..qommon.form import FileWithPreviewWidget
|
||||
from ..qommon.form import SingleSelectWidget
|
||||
from ..qommon.form import StringWidget
|
||||
from ..qommon.form import VarnameWidget
|
||||
from ..qommon.form import WidgetList
|
||||
from ..qommon.form import WysiwygTextWidget
|
||||
from ..qommon.misc import get_document_type_value_options
|
||||
from ..qommon.misc import xml_node_text
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
import collections
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from quixote import get_publisher
|
||||
from quixote.html import htmltext
|
||||
|
||||
from wcs.roles import get_user_roles
|
||||
|
@ -27,7 +28,12 @@ from wcs.workflows import register_item_class
|
|||
|
||||
from ..qommon import N_
|
||||
from ..qommon import _
|
||||
from ..qommon.form import *
|
||||
from ..qommon.form import CompositeWidget
|
||||
from ..qommon.form import RadiobuttonsWidget
|
||||
from ..qommon.form import SingleSelectWidget
|
||||
from ..qommon.form import SingleSelectWidgetWithOther
|
||||
from ..qommon.form import StringWidget
|
||||
from ..qommon.form import WidgetListAsTable
|
||||
from ..qommon.template import Template
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,9 @@ from quixote import get_publisher
|
|||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote.directory import Directory
|
||||
from quixote.errors import PublishError
|
||||
from quixote.html import htmltext
|
||||
from quixote.http_request import Upload
|
||||
|
||||
from wcs.fields import CommentField
|
||||
from wcs.fields import PageField
|
||||
|
@ -53,14 +55,12 @@ from ..qommon import ezt
|
|||
from ..qommon import force_str
|
||||
from ..qommon import get_logger
|
||||
from ..qommon import misc
|
||||
from ..qommon.errors import PublishError
|
||||
from ..qommon.form import CheckboxWidget
|
||||
from ..qommon.form import ComputedExpressionWidget
|
||||
from ..qommon.form import PicklableUpload
|
||||
from ..qommon.form import RadiobuttonsWidget
|
||||
from ..qommon.form import SingleSelectWidget
|
||||
from ..qommon.form import StringWidget
|
||||
from ..qommon.form import Upload
|
||||
from ..qommon.form import UploadedFile
|
||||
from ..qommon.form import UploadValidationError
|
||||
from ..qommon.form import UploadWidget
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from quixote import get_publisher
|
||||
from quixote.html import TemplateIO
|
||||
from quixote.html import htmltext
|
||||
|
||||
from wcs.admin.fields import FieldDefPage
|
||||
from wcs.admin.fields import FieldsDirectory
|
||||
from wcs.formdata import get_dict_with_varnames
|
||||
|
@ -28,7 +32,9 @@ from wcs.workflows import register_item_class
|
|||
|
||||
from ..qommon import N_
|
||||
from ..qommon import _
|
||||
from ..qommon.form import *
|
||||
from ..qommon.form import SingleSelectWidget
|
||||
from ..qommon.form import VarnameWidget
|
||||
from ..qommon.form import WidgetList
|
||||
|
||||
|
||||
def lookup_wf_form_file(self, filename):
|
||||
|
|
|
@ -21,8 +21,10 @@ import time
|
|||
|
||||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import htmltext
|
||||
|
||||
from wcs.api import get_user_from_api_query_string
|
||||
from wcs.api import is_url_signed
|
||||
|
@ -37,8 +39,13 @@ from ..qommon import _
|
|||
from ..qommon import errors
|
||||
from ..qommon import force_str
|
||||
from ..qommon.cron import CronJob
|
||||
from ..qommon.form import *
|
||||
from ..qommon.humantime import *
|
||||
from ..qommon.form import ComputedExpressionWidget
|
||||
from ..qommon.form import SingleSelectWidget
|
||||
from ..qommon.form import StringWidget
|
||||
from ..qommon.form import WidgetList
|
||||
from ..qommon.humantime import humanduration2seconds
|
||||
from ..qommon.humantime import seconds2humanduration
|
||||
from ..qommon.humantime import timewords
|
||||
from ..qommon.publisher import get_publisher_class
|
||||
|
||||
JUMP_TIMEOUT_INTERVAL = max((60 // int(os.environ.get('WCS_JUMP_TIMEOUT_CHECKS', '3')), 1))
|
||||
|
|
|
@ -26,7 +26,11 @@ from ..qommon import N_
|
|||
from ..qommon import _
|
||||
from ..qommon import ezt
|
||||
from ..qommon import get_logger
|
||||
from ..qommon.form import *
|
||||
from ..qommon.form import ComputedExpressionWidget
|
||||
from ..qommon.form import SingleSelectWidget
|
||||
from ..qommon.form import StringWidget
|
||||
from ..qommon.form import TextWidget
|
||||
from ..qommon.form import WidgetList
|
||||
from ..qommon.template import TemplateError
|
||||
from .wscall import WebserviceCallStatusItem
|
||||
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
|
||||
import sys
|
||||
|
||||
from quixote import get_publisher
|
||||
from quixote.html import htmltext
|
||||
|
||||
from wcs.workflows import AttachmentEvolutionPart
|
||||
from wcs.workflows import WorkflowStatusItem
|
||||
from wcs.workflows import register_item_class
|
||||
|
@ -25,7 +28,9 @@ from ..qommon import N_
|
|||
from ..qommon import _
|
||||
from ..qommon import ezt
|
||||
from ..qommon import get_logger
|
||||
from ..qommon.form import *
|
||||
from ..qommon.form import SingleSelectWidget
|
||||
from ..qommon.form import TextWidget
|
||||
from ..qommon.form import WidgetList
|
||||
from ..qommon.template import TemplateError
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ from wcs.workflows import register_item_class
|
|||
|
||||
from ..qommon import N_
|
||||
from ..qommon import _
|
||||
from ..qommon.form import *
|
||||
from ..qommon.form import SingleSelectWidgetWithOther
|
||||
from ..qommon.ident.idp import is_idp_managing_user_attributes
|
||||
from ..qommon.misc import http_delete_request
|
||||
from ..qommon.misc import http_post_request
|
||||
|
|
|
@ -23,6 +23,8 @@ import traceback
|
|||
import xml.etree.ElementTree as ET
|
||||
|
||||
from django.utils.encoding import force_text
|
||||
from quixote import get_publisher
|
||||
from quixote import get_request
|
||||
from quixote.html import TemplateIO
|
||||
from quixote.html import htmltext
|
||||
|
||||
|
@ -37,7 +39,14 @@ from ..qommon import N_
|
|||
from ..qommon import _
|
||||
from ..qommon import force_str
|
||||
from ..qommon.errors import ConnectionError
|
||||
from ..qommon.form import *
|
||||
from ..qommon.form import CheckboxWidget
|
||||
from ..qommon.form import ComputedExpressionWidget
|
||||
from ..qommon.form import HtmlWidget
|
||||
from ..qommon.form import RadiobuttonsWidget
|
||||
from ..qommon.form import SingleSelectWidget
|
||||
from ..qommon.form import StringWidget
|
||||
from ..qommon.form import VarnameWidget
|
||||
from ..qommon.form import WidgetDict
|
||||
from ..qommon.misc import json_loads
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import base64
|
||||
import collections
|
||||
import copy
|
||||
import datetime
|
||||
|
@ -29,6 +30,7 @@ from quixote import get_publisher
|
|||
from quixote import get_request
|
||||
from quixote import get_response
|
||||
from quixote import redirect
|
||||
from quixote.html import TemplateIO
|
||||
from quixote.html import htmltext
|
||||
|
||||
from .carddef import CardDef
|
||||
|
@ -46,7 +48,19 @@ from .qommon import ezt
|
|||
from .qommon import force_str
|
||||
from .qommon import get_cfg
|
||||
from .qommon import get_logger
|
||||
from .qommon.form import *
|
||||
from .qommon import misc
|
||||
from .qommon.form import CheckboxWidget
|
||||
from .qommon.form import ComputedExpressionWidget
|
||||
from .qommon.form import ConditionWidget
|
||||
from .qommon.form import Form
|
||||
from .qommon.form import SingleSelectWidget
|
||||
from .qommon.form import SingleSelectWidgetWithOther
|
||||
from .qommon.form import StringWidget
|
||||
from .qommon.form import TextWidget
|
||||
from .qommon.form import ValidatedStringWidget
|
||||
from .qommon.form import VarnameWidget
|
||||
from .qommon.form import WidgetList
|
||||
from .qommon.form import WysiwygTextWidget
|
||||
from .qommon.humantime import seconds2humanduration
|
||||
from .qommon.misc import C_
|
||||
from .qommon.misc import file_digest
|
||||
|
|
Loading…
Reference in New Issue