<s> from __future__ import absolute_import , unicode_literals <EOL> from django . conf import settings <EOL> from django . contrib . sites . models import Site <EOL> from django . db import models <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from feincms import extensions <EOL> from feincms . module . page . models import PageManager <EOL> def current_site ( queryset ) : <EOL> return queryset . filter ( site = Site . objects . get_current ( ) ) <EOL> class Extension ( extensions . Extension ) : <EOL> def handle_model ( self ) : <EOL> self . model . add_to_class ( <EOL> '<STR_LIT>' , <EOL> models . ForeignKey ( <EOL> Site , verbose_name = _ ( '<STR_LIT>' ) , default = settings . SITE_ID ) ) <EOL> PageManager . add_to_active_filters ( current_site , key = '<STR_LIT>' ) <EOL> def handle_modeladmin ( self , modeladmin ) : <EOL> modeladmin . extend_list ( '<STR_LIT>' , [ '<STR_LIT>' ] ) <EOL> modeladmin . extend_list ( '<STR_LIT>' , [ '<STR_LIT>' ] ) <EOL> modeladmin . add_extension_options ( '<STR_LIT>' ) </s>
