<s> from fluent_contents . extensions import ContentPlugin , plugin_pool <EOL> from fluent_contents . plugins . twitterfeed import appsettings <EOL> from fluent_contents . plugins . twitterfeed . models import TwitterRecentEntriesItem , TwitterSearchItem <EOL> class BaseTwitterPlugin ( ContentPlugin ) : <EOL> category = ContentPlugin . MEDIA <EOL> def get_context ( self , request , instance , ** kwargs ) : <EOL> context = super ( BaseTwitterPlugin , self ) . get_context ( request , instance , ** kwargs ) <EOL> context . update ( { <EOL> '<STR_LIT>' : int ( appsettings . FLUENT_TWITTERFEED_AVATAR_SIZE ) , <EOL> '<STR_LIT>' : int ( appsettings . FLUENT_TWITTERFEED_REFRESH_INTERVAL ) , <EOL> '<STR_LIT>' : appsettings . FLUENT_TWITTERFEED_TEXT_TEMPLATE , <EOL> } ) <EOL> return context <EOL> @ plugin_pool . register <EOL> class TwitterRecentEntriesPlugin ( BaseTwitterPlugin ) : <EOL> """<STR_LIT>""" <EOL> model = TwitterRecentEntriesItem <EOL> render_template = "<STR_LIT>" <EOL> @ plugin_pool . register <EOL> class TwitterSearchPlugin ( BaseTwitterPlugin ) : <EOL> """<STR_LIT>""" <EOL> model = TwitterSearchItem <EOL> render_template = "<STR_LIT>" </s>
