<s> from django . conf . urls . defaults import patterns , url , include , handler500 , handler404 <EOL> from piston . resource import Resource <EOL> from piston . authentication import HttpBasicAuthentication <EOL> from activitystreams . handlers import GlobalActivityHandler , SourceActivityHandler , SourceActionHandler , GlobalActionHandler <EOL> auth = HttpBasicAuthentication ( realm = "<STR_LIT>" ) <EOL> ad = { '<STR_LIT>' : auth } <EOL> source_activity_resource = Resource ( handler = SourceActivityHandler , ** ad ) <EOL> global_activity_resource = Resource ( handler = GlobalActivityHandler , ** ad ) <EOL> global_action_resource = Resource ( handler = GlobalActionHandler , ** ad ) <EOL> source_action_resource = Resource ( handler = SourceActionHandler , ** ad ) <EOL> urlpatterns = patterns ( '<STR_LIT>' , <EOL> url ( r'<STR_LIT>' , global_activity_resource ) , <EOL> url ( r'<STR_LIT>' , global_activity_resource ) , <EOL> url ( r'<STR_LIT>' , source_activity_resource ) , <EOL> url ( r'<STR_LIT>' , source_activity_resource ) , <EOL> url ( r'<STR_LIT>' , global_action_resource ) , <EOL> url ( r'<STR_LIT>' , global_action_resource ) , <EOL> url ( r'<STR_LIT>' , source_action_resource ) , <EOL> url ( r'<STR_LIT>' , source_action_resource ) , <EOL> ) </s>
