I am using Plone 5.2, and I want to edit a Dexterity schema field by creating another Python file (by importing). How can I do that? For example, I want to add max_length=20.
I checked the Plone 5 documentation and understood how to create a schema, but I couldn't find much on how to modify an existing one.
If your fields are defined via XML schema, you can extend or edit it from the control panel (control panel > content > content types > your content).
Refer to the required XML structure from this link
If the fields are defined from a Python file, you can also directly edit it. If this is not ideal like for default content types, you have to use an XML schema. And you may need to access the ZMI (portal_types > your content) to change the reference to your new schema. The control panel may not yet allow it.