from import_export import fields, resources

from .models import TalkProposal


class TalkProposalResource(resources.ModelResource):

    name = fields.Field(attribute='submitter__speaker_name')
    email = fields.Field(attribute='submitter__email')

    class Meta:
        model = TalkProposal
        fields = [
            'id', 'title', 'category', 'python_level', 'duration',
            'name', 'email',
        ]
        export_order = fields

from import_export import fields, resources

from .models import TalkProposal


class TalkProposalResource(resources.ModelResource):

    name = fields.Field(attribute='submitter__speaker_name')
    email = fields.Field(attribute='submitter__email')

    class Meta:
        model = TalkProposal
        fields = [
            'id', 'title', 'category', 'python_level', 'duration',
            'language', 'name', 'email',
        ]
        export_order = fields

Add language field to proposal export
Add language field to proposal export

  from import_export import fields, resources
  
  from .models import TalkProposal
  
  
  class TalkProposalResource(resources.ModelResource):
  
      name = fields.Field(attribute='submitter__speaker_name')
      email = fields.Field(attribute='submitter__email')
  
      class Meta:
          model = TalkProposal
          fields = [
              'id', 'title', 'category', 'python_level', 'duration',
-             'name', 'email',
+             'language', 'name', 'email',
          ]
          export_order = fields
  
Add language field to proposal export
## Code Before:
from import_export import fields, resources

from .models import TalkProposal


class TalkProposalResource(resources.ModelResource):

    name = fields.Field(attribute='submitter__speaker_name')
    email = fields.Field(attribute='submitter__email')

    class Meta:
        model = TalkProposal
        fields = [
            'id', 'title', 'category', 'python_level', 'duration',
            'name', 'email',
        ]
        export_order = fields

## Instruction:
Add language field to proposal export
## Code After:
from import_export import fields, resources

from .models import TalkProposal


class TalkProposalResource(resources.ModelResource):

    name = fields.Field(attribute='submitter__speaker_name')
    email = fields.Field(attribute='submitter__email')

    class Meta:
        model = TalkProposal
        fields = [
            'id', 'title', 'category', 'python_level', 'duration',
            'language', 'name', 'email',
        ]
        export_order = fields
