playlists/models.py
def validate(self):
        """Validate this instance before putting it to the datastore.

        A track must have at least artist name and track title
        """
        if not self.track_title and not self.track:
            raise ValueError("Must set either a track_title or reference a track")
        if not self.artist_name and not self.artist:
            raise ValueError("Must set either an artist_name or reference an artist")
        if not self.selector.is_dj:
            raise ValueError("User %r must be a DJ (user is: %r)" % (
                                self.selector, self.selector.roles))
Validate this instance before putting it to the datastore.

        A track must have at least artist name and track title
        
Validate this instance before putting it to the datastore.
A track must have at least artist name and track title
Validate this instance before putting it to the datastore . A track must have at least artist name and track title
def validate(self):
        if not self.track_title and not self.track:
            raise ValueError("Must set either a track_title or reference a track")
        if not self.artist_name and not self.artist:
            raise ValueError("Must set either an artist_name or reference an artist")
        if not self.selector.is_dj:
            raise ValueError("User %r must be a DJ (user is: %r)" % (
                                self.selector, self.selector.roles))
def validate ( self ) : if not self . track_title and not self . track : raise ValueError ( "Must set either a track_title or reference a track" ) if not self . artist_name and not self . artist : raise ValueError ( "Must set either an artist_name or reference an artist" ) if not self . selector . is_dj : raise ValueError ( "User %r must be a DJ (user is: %r)" % ( self . selector , self . selector . roles ) )
Validate this instance before putting it to the datastore.
Validate this instance before putting it to the datastore .
"""Validate this instance before putting it to the datastore.

        A track must have at least artist name and track title
        """
self