receivers
delete_markov_models_before_orphaning
When deleting a source or source group, ensure that its text_model is deleted first.
Source code in src/django_quotes/receivers.py
initialize_grouping_stat_object
Creates the initial stat objects in the database.
Source code in src/django_quotes/receivers.py
initialize_markov_object
Creates the one-to-one object for the group markov model.
Source code in src/django_quotes/receivers.py
update_markov_model_for_character_enabling_markov
When updating a source to allow_markov, trigger markov model updates.
Source code in src/django_quotes/receivers.py
update_stats_for_markov
For a given source, update the stats on the Source and SourceGroup for markov requests. :param sender: The requesting class, usually Source. :param instance: The specific source requested. :param char_limit: The character limit used when generating the sentence. :param sentence: The sentence that was generated. :return: None
Source code in src/django_quotes/receivers.py
update_stats_for_quote_character
Update the stats for the source, source group, and quote for a random retrieval. :param sender: Usually a source or sourcegroup class. :param instance: The source this was generated for. :param quote_retrieved: The quote that was returned. :return: None