vendredi 24 juillet 2015

Get all form objects in a Django application

Here is what I want to do:

  1. Retrieve a list of all objects in all my django apps that inherit from forma.Form
  2. Find all CharField defined on the form
  3. Verify that each of these fields has a max_length kwarg specified

My goal is the write a unit test to fail if a form exists within our system that does not have a max length specified.

how would I do this?

Aucun commentaire:

Enregistrer un commentaire