 from django . template . defaultfilters import striptags <EOL> from django . template . defaultfilters import truncatewords <EOL> from django . views import generic 
 import social_metadata . views 
 from django . template . defaultfilters import striptags <EOL> from django . template . defaultfilters import truncatewords <EOL> from django . views import generic <EOL> import social_metadata . views <EOL> from blog import models <EOL> class HomeView ( generic . ListView ) : <EOL> def get_queryset ( self ) : <EOL> return models . Post . objects . all ( ) . order_by ( '<STR_LIT>' ) <EOL> home_view = HomeView . as_view ( ) <EOL> class PostView ( social_metadata . views . SocialDataMixin , generic . DetailView ) : <EOL> model = models . Post <EOL> def get_social_title ( self ) : <EOL> return self . object . title <EOL> def get_social_images ( self ) : <EOL> yield self . object . cover_image . url <EOL> def get_social_description ( self ) : <EOL> return truncatewords ( striptags ( self . object . text ) , <NUM_LIT:50> ) <EOL> post_view = PostView . as_view ( ) </s>
