<s> from django . contrib . auth . models import User <EOL> from tastypie import fields <EOL> from tastypie . resources import NamespacedModelResource <EOL> from tastypie . authorization import Authorization <EOL> from basic . models import Note <EOL> class NamespacedUserResource ( NamespacedModelResource ) : <EOL> class Meta : <EOL> resource_name = '<STR_LIT>' <EOL> queryset = User . objects . all ( ) <EOL> authorization = Authorization ( ) <EOL> class NamespacedNoteResource ( NamespacedModelResource ) : <EOL> user = fields . ForeignKey ( NamespacedUserResource , '<STR_LIT:user>' ) <EOL> class Meta : <EOL> resource_name = '<STR_LIT>' <EOL> queryset = Note . objects . all ( ) <EOL> authorization = Authorization ( ) </s>
