(self, model)
return None
Determines if model has exactly 1 SlugField that is unique.  If so, returns it.  Otherwise returns None.
Determines if model has exactly 1 SlugField that is unique.  If so, returns it.  Otherwise returns None.
Determines if model has exactly 1 SlugField that is unique . If so returns it . Otherwise returns None .
def get_unique_slug_field_name(self, model):
        """
            Determines if model has exactly 1 SlugField that is unique.  If so, returns it.  Otherwise returns None.
        """
        slug_fields = []
        for field in model._meta.get_fields():
            if isinstance(field, SlugField) and field.unique:
                slug_fields.append(field)
        if len(slug_fields) == 1:
            return slug_fields[0]
        return None
def get_unique_slug_field_name ( self , model ) : slug_fields = [ ] for field in model . _meta . get_fields ( ) : if isinstance ( field , SlugField ) and field . unique : slug_fields . append ( field ) if len ( slug_fields ) == 1 : return slug_fields [ 0 ] return None