Files
@ 260a7a01b054
Branch filter:
Location: kallithea/docs/api/models.rst - annotation
260a7a01b054
634 B
text/prs.fallenstein.rst
follow Python conventions for boolean values
True and False might be singletons and the "default" values for "boolean"
expressions, but "all" values in Python has a boolean value and should be
evaluated as such. Checking with 'is True' and 'is False' is thus confusing,
error prone and unnessarily complex.
If we anywhere rely and nullable boolean fields from the database layer and
don't want the null value to be treated as False then we should check
explicitly for null with 'is None'.
True and False might be singletons and the "default" values for "boolean"
expressions, but "all" values in Python has a boolean value and should be
evaluated as such. Checking with 'is True' and 'is False' is thus confusing,
error prone and unnessarily complex.
If we anywhere rely and nullable boolean fields from the database layer and
don't want the null value to be treated as False then we should check
explicitly for null with 'is None'.
64a5386216c5 bb35ad076e2f 17c9393e9645 bb35ad076e2f bb35ad076e2f bb35ad076e2f bb35ad076e2f bb35ad076e2f 8b8edfc25856 9da24750f563 9da24750f563 8b8edfc25856 9da24750f563 8b8edfc25856 9da24750f563 bb35ad076e2f bb35ad076e2f 9da24750f563 9da24750f563 8b8edfc25856 9da24750f563 bb35ad076e2f 8b8edfc25856 bb35ad076e2f 9da24750f563 9da24750f563 8b8edfc25856 bb35ad076e2f bb35ad076e2f 8b8edfc25856 bb35ad076e2f 8b8edfc25856 8b8edfc25856 9da24750f563 8b8edfc25856 | .. _models:
========================
The :mod:`models` Module
========================
.. automodule:: rhodecode.model
:members:
.. automodule:: rhodecode.model.comment
:members:
.. automodule:: rhodecode.model.notification
:members:
.. automodule:: rhodecode.model.permission
:members:
.. automodule:: rhodecode.model.repo_permission
:members:
.. automodule:: rhodecode.model.repo
:members:
.. automodule:: rhodecode.model.repos_group
:members:
.. automodule:: rhodecode.model.scm
:members:
.. automodule:: rhodecode.model.user
:members:
.. automodule:: rhodecode.model.users_group
:members:
|