def _get_related_name(self):
        """
        Return the related name to use to access this related field.
        If the related_name argument is not defined in its declaration,
        a new one will be computed following this format: '%s_set' with %s the
        name of the model owning the related.field.
        If the related_name argument exists, it can be the exact name to use (
        be careful to use a valid python attribute name), or a string where you
        can set placeholder for the namespace and the model of the current
        model. It's useful if the current model is abstract with many subclasses

        Exemples:
            class Base(RelatedModel):
                abstract = True
                namespace = 'project'
                a_field = FKStringField('Other', related_name='%(namespace)s_%(model)s_related')
                    # => related names accessible from Other are
                    #    "project_childa_related" and "project_childb_related"

            class ChildA(Base):
                pass

            class ChildB(Base):
                pass

            class Other(RelatedModel):
                namespace = 'project'
                field_a = FKStringField(ChildA)
                    # => related name accessible from ChildA and ChildB will be "other_related"
                field_b = FKStringField(ChildB, related_name='some_others')
                    # => related name accessible from ChildA and ChildB will be "some_others"
        """
        related_name = self.related_name or '%(model)s_set'
        related_name = related_name % {
            'namespace': re_identifier.sub('_', self._model.namespace),
            'model': self._model.__name__
        }
        if re_identifier.sub('', related_name) != related_name:
            raise ImplementationError('The related_name "%s" is not a valid '
                                      'python identifier' % related_name)

        return related_name.lower()
def _get_related_name ( self ) : related_name = self . related_name or '%(model)s_set' related_name = related_name % { 'namespace' : re_identifier . sub ( '_' , self . _model . namespace ) , 'model' : self . _model . __name__ } if re_identifier . sub ( '' , related_name ) != related_name : raise ImplementationError ( 'The related_name "%s" is not a valid ' 'python identifier' % related_name ) return related_name . lower ( )
Return the related name to use to access this related field.
        If the related_name argument is not defined in its declaration,
        a new one will be computed following this format: '%s_set' with %s the
        name of the model owning the related.field.
        If the related_name argument exists, it can be the exact name to use (
        be careful to use a valid python attribute name), or a string where you
        can set placeholder for the namespace and the model of the current
        model. It's useful if the current model is abstract with many subclasses

        Exemples:
            class Base(RelatedModel):
                abstract = True
                namespace = 'project'
                a_field = FKStringField('Other', related_name='%(namespace)s_%(model)s_related')
                    # => related names accessible from Other are
                    #    "project_childa_related" and "project_childb_related"

            class ChildA(Base):
                pass

            class ChildB(Base):
                pass

            class Other(RelatedModel):
                namespace = 'project'
                field_a = FKStringField(ChildA)
                    # => related name accessible from ChildA and ChildB will be "other_related"
                field_b = FKStringField(ChildB, related_name='some_others')
                    # => related name accessible from ChildA and ChildB will be "some_others"