class PulpExporterSerializer(ExporterSerializer): """ Serializer for pulp exporters. """ path = serializers.CharField( help_text=_("File system directory to store exported tar.gzs.")) repositories = DetailRelatedField( view_name_pattern=r"repositories(-.*/.*)-detail", queryset=models.Repository.objects.all(), many=True, ) last_export = ExportRelatedField( help_text=_("Last attempted export for this PulpExporter"), queryset=models.PulpExport.objects.all(), many=False, required=False, allow_null=True, ) class Meta: model = models.PulpExporter fields = ExporterSerializer.Meta.fields + ("path", "repositories", "last_export")
class PulpExporterSerializer(ExporterSerializer): """ Serializer for pulp exporters. """ path = serializers.CharField( help_text=_("File system directory to store exported tar.gzs.") ) repositories = DetailRelatedField(queryset=models.Repository.objects.all(), many=True) last_export = ExportRelatedField( help_text=_("Last attempted export for this PulpExporter"), queryset=models.PulpExport.objects.all(), many=False, required=False, ) class Meta: model = models.PulpExporter fields = ExporterSerializer.Meta.fields + ('path', 'repositories', 'last_export')