Description
We need to add a custom manager to the User model that filters users that have a non-empty value for the fields name_first and name_last. This custom manager will provide a method called named_users, which returns only users where name_first and name_last are not Null and not empty string.
The named_users method should allow you to easily query the User model for only named users, while still preserving the default behavior of the model.
The custom manager should be added to the User model and should not affect any existing functionality or queries on the User model unless explicitly called.
The custom manager should be implemented using Django’s Manager class and should be included in the model’s default manager field.
Write some tests to ensure that the active_users method returns only users where name_first and name_last are not Null and not empty, and does not include users with first or last names. Also, make sure that existing queries that don’t use the custom manager still work as expected, and that the addition of the custom manager has no impact on the functionality of the User model.
There should be no impact on existing tests. If you add a test to an existing test file, please add it at the end of the file.