[Grok-dev] A plan for removing the fields inner class support

Luciano Ramalho luciano at ramalho.org
Wed Sep 12 20:52:05 EDT 2007


Martijn has asked me to remove from Grok the support for the inner
class idiom for declaring a schema in a model.

Here is what I intend to do in the luciano-fields-class-removal branch:

formlib.py
--------------------

- delete the get_context_schema_fields function
- remove the call to it from the get_auto_fields function

meta.py
--------------------

- delete the grok method from ModelGrokker


ftests and tests
--------------------------

- change every example which uses the fields inner class to use an
interface instead:

./ftests/form/actions.py:50:    class fields:
./ftests/form/update.py:49:    class fields:
./ftests/form/templateform.py:50:    class fields:
./ftests/form/editform_applydata_classfields.py:60:    class fields:
./ftests/form/addform.py:35:    class fields:
./ftests/form/form.py:33:    class fields:

./tests/form/schemaform.py:69:    class fields:
./tests/form/form.py:51:    class fields:
./tests/form/form.py:63:    class fields:
./tests/form/customautoform.py:42:    class fields:

---------------

It seems most of my work will be updating tests that use the old idiom.

If I have missed something, let me know.

I will let you know when the branch is ready to review and merge.

Regards,

Luciano


More information about the Grok-dev mailing list