def clear_app_reverse_cache(): """ Clear the cache for the app_reverse() function. This only has to be called when doing bulk update/delete actions that circumvent the individual model classes. """ for model in page_type_pool.get_model_classes(): cache.delete('fluent_pages.instance_of.{0}'.format(model.__name__))
def handle(self, *args, **options): verbosity = options['verbosity'] num_updated = 0 for model in page_type_pool.get_model_classes(): updated = update_model_prefix(model, verbosity=verbosity) if updated: num_updated += 1 self.stdout.write(ngettext(u"{count} item updated.", u"{count} items updated.", num_updated).format(count=num_updated) + u" ")
def handle(self, *args, **options): verbosity = options['verbosity'] num_updated = 0 for model in page_type_pool.get_model_classes(): updated = update_model_prefix(model, verbosity=verbosity) if updated: num_updated += 1 self.stdout.write( ngettext(u"{count} item updated.", u"{count} items updated.", num_updated).format(count=num_updated) + u" ")
def get_child_models(self): """ Provide the available models of the page type registration system to *django-polymorphic*. """ from fluent_pages.extensions import page_type_pool return page_type_pool.get_model_classes()
def get_child_models(self): """ Provide the available models of the page type registration system to *django-polymorphic*. """ from fluent_pages.extensions import page_type_pool return page_type_pool.get_model_classes()