Add utils for fetching evolution module names and individual evolution modules.

Review Request #11218 — Created Oct. 14, 2020 and submitted — Latest diff uploaded

Information

Django Evolution
master

Reviewers

Two new functions were introduced:

  • get_evolutions_module_name() returns the name of the .evolutions
    module for a given app. This encompasses the logic that was in
    get_evolutions_module(), handling built-in evolutions and custom
    evolutions along with app-provided evolutions.

  • get_evolution_module() returns the module for a specific evolution
    in an app.

get_app_mutations() has been updated to use the new
get_evolution_module(). Some upcoming functions will make further use
of both functions.

Unit tests were added for these new functions.

Unit tests pass.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Add utils for fetching evolution module names and individual evolution modules.
Two new functions were introduced: * `get_evolutions_module_name()` returns the name of the `.evolutions` module for a given app. This encompasses the logic that was in `get_evolutions_module()`, handling built-in evolutions and custom evolutions along with app-provided evolutions. * `get_evolution_module()` returns the module for a specific evolution in an app. `get_app_mutations()` has been updated to use the new `get_evolution_module()`. Some upcoming functions will make further use of both functions. Unit tests were added for these new functions.
10799165388040612d8210f8f8c40180d2215ab0 Christian Hammond
django_evolution/tests/test_evolution_utils.py
django_evolution/utils/evolutions.py
Loading...