django-import-export Questions

7

I've used the following tutorial. I used the command pip install django-import-export, then added to the Installed Apps section. INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.aut...
Brahui asked 6/9, 2017 at 9:59

4

Solved

I want to create csv file form my model send a dictionary of Queries ( filter exclude ) to django-import-export and return data from my model. using flowing code i have all of model fields but i n...
Confucianism asked 22/7, 2013 at 14:36

2

Solved

I am using django-import-export to process CSV files uploaded to my Django admin site. When I run Django on my local machine, all works fine. When I deploy my application to Heroku I start gettin...
Hintz asked 25/2, 2017 at 1:26

3

I created a custom user subclassed from AbstractUser and a post_save signal and a receiver that prints the new user's id. @receiver(post_save, sender=CustomUser, dispatch_uid='members.models.custo...
Supervise asked 8/2, 2020 at 6:50

3

Solved

How to get request.user from method queryset of ModelResource in django-import-export? class PeopleResource(ModelResource): class Meta: model = People exclude = ('id','agent', 'public_id', 'act...
Finke asked 28/7, 2018 at 9:44

1

Solved

I have a resource that should help me import data into my model but it doesn't work. I have tried all the options I could but to no success. This is the resource. class ImportStudentsResource(resou...
Fairtrade asked 11/4, 2021 at 19:46

3

Solved

For a Django model I'm using django-import-export package. The manual says I can export fields that are not existing in the target model like so: from import_export import fields class BookResou...
Tulatulip asked 15/9, 2014 at 13:40

3

Solved

I'm using the django-import-export library with success to provide a data download option via the django admin for some of my defined models. I'm having difficulty however providing the same expor...
Alroi asked 5/3, 2015 at 19:28

5

I am trying to import excel documents into a Django DB. I have added the following code to admin.py and model.py. There seems to be an error in the development of Django. I have read through severa...

2

For a Django model I'm using django-import-export package. If need to export more then just available model fields, like properties or custom fields, new can be added with import_export.fields.Fie...
Intrastate asked 2/11, 2013 at 23:32

2

Im using django import-export module and Im following this documentation: https://simpleisbetterthancomplex.com/packages/2016/08/11/django-import-export.html#importing-data I want to create an ...
Juxtapose asked 15/1, 2020 at 13:35

1

Solved

I am following this documentation on how to use django-import-export: https://django-import-export.readthedocs.io/en/latest/getting_started.html#declaring-fields I have an excel sheet that look...
Whicker asked 6/1, 2020 at 11:25

2

Solved

I have implemented django-import-export for my project. It provides me many file format options by default fro both import and export. How to restrict the file formats to only CSV, XLS and XLSX ...
Resolute asked 29/8, 2017 at 3:52

3

Solved

I am using django-import-export package to expect a csv file containing a location's name and its longitude and latitude. I want to parse the longitude and latitude field from the csv to convert t...
Berbera asked 27/7, 2019 at 14:45

3

Solved

Update I have filed a feature request. The idea is to pass on the IntegrittyError produced by the database when unique or unique_together reject a record that already exists in the database. I ...
Paton asked 12/1, 2016 at 12:35

4

I have a short question about django-import-export. In my model I have choice list: STATE_CHOICES = ((NEW_STATE, u'New'), (DELIVERED_STATE, u'Delivered'), (LOST_STATE, u'Lost'), And method th...
Scotfree asked 9/11, 2015 at 12:18

3

Solved

I'm using Django import_export to implement CSV upload in my admin pages. Now I have one model, that contains a foreign key column, but the foreign key column will have only one value for each impo...
Tristram asked 28/4, 2016 at 14:45

1

I am using django-import-export 1.0.1 with admin integration in Django 2.1.1. I have two models from django.db import models class Sector(models.Model): code = models.CharField(max_length=30, pr...

3

I'm trying to import data from a model which has nullable BinaryField. The data doesn't contain the field and I want it to be imported with a null value in the field. If the field already exists in...
Leslileslie asked 19/12, 2017 at 9:56

1

Solved

Migrating from python 3.5 to 3.6, my unit tests reveal a problem with django-import-export & tablib: TypeError: cell() missing 1 required positional argument: 'column' File "<path>/lib/...
Disoblige asked 3/2, 2018 at 13:50

3

I'm trying to import data to one of my models, but it's failing because I'm trying to upload the foreignKey Id, not the iterated number that import-export creates. models.py from django.db import...
Eyeglasses asked 4/9, 2014 at 16:25

1

Solved

My model: class TreeNode(MPTTModel): ... @property def pay_progress(self): return "{}/{}".format(self.annuities.exclude(fact_date=None).aggregate(Sum('total'))['total__sum'] or 0, self.annuit...
Hooge asked 18/8, 2016 at 13:0

1

Solved

I would like to display the ip_address from Hosts model in HostInfo's admin display. # models.py class Hosts(models.Model): host_name = models.CharField(max_length=200, unique=True) ip_address ...
Guadalupeguadeloupe asked 10/2, 2017 at 18:41

3

Solved

I'm using the third party library Django-import-export for importing/exporting data. It's working properly but I only want the export functionality (not import one). How could I use only export ...
Roshelle asked 25/3, 2015 at 9:59

1

I am trying to set up django-import-export to handle my data which is stored in spreadsheets. The spreadsheets don't contain foreign keys as IDs, but rather they contain the (also unique) names of ...

© 2022 - 2024 — McMap. All rights reserved.