cubicweb/web/test/data/cubicweb_file/views.py
author Philippe Pepiot <philippe.pepiot@logilab.fr>
Tue, 19 Mar 2019 13:17:47 +0100
changeset 12519 aff5d3498f68
permissions -rw-r--r--
[web/test] drop dependency on third party cubes Drop dependency on cubicweb-file, cubicweb-blog and cubicweb-tag for cubicweb/web/test Copy required parts of cubes (schema, entities, views and hooks) into cubicweb/web/test/data/cubicweb-<cube> that make tests pass.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12519
aff5d3498f68 [web/test] drop dependency on third party cubes
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
diff changeset
     1
from cubicweb.web import formwidgets as wdgs
aff5d3498f68 [web/test] drop dependency on third party cubes
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
diff changeset
     2
from cubicweb.web.views import uicfg
aff5d3498f68 [web/test] drop dependency on third party cubes
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
diff changeset
     3
aff5d3498f68 [web/test] drop dependency on third party cubes
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
diff changeset
     4
# fields required in the schema but automatically set by hooks. Tell about that
aff5d3498f68 [web/test] drop dependency on third party cubes
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
diff changeset
     5
# to the ui
aff5d3498f68 [web/test] drop dependency on third party cubes
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
diff changeset
     6
_pvdc = uicfg.autoform_field_kwargs
aff5d3498f68 [web/test] drop dependency on third party cubes
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
diff changeset
     7
_pvdc.tag_attribute(('File', 'data_name'), {
aff5d3498f68 [web/test] drop dependency on third party cubes
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
diff changeset
     8
    'required': False, 'widget': wdgs.TextInput({'size': 45})})
aff5d3498f68 [web/test] drop dependency on third party cubes
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
diff changeset
     9
_pvdc.tag_attribute(('File', 'data_format'), {'required': False})