Sorry may I trouble you to please spell your sentence properly? I am having 
difficulty understanding what i should check for in terms of case 
sensitivity.

I suspect that the problem lies in my functions when importing the data 
into my Models because certain fields are foreign keys i need to import 
them as object instances instead of data (as seen in the choice_func 
example in the Django-Excel documentation found here 
http://django.pyexcel.org/en/latest/). However, i am not sure if i 
understand the code for choice_func correctly.

On Tuesday, July 23, 2019 at 10:51:17 PM UTC+8, sachinbg sachin wrote:
>
> In exception it it's saying as case sensitive check the fist Peter's 
> wether they are caps are small in model fist leter always bigleter check 
> once
>
> On Tue, Jul 23, 2019, 5:04 PM Jasmine Chua <babym...@gmail.com 
> <javascript:>> wrote:
>
>> Hi,
>>
>> I am struggling to correctly map my Excel data tab of CaseSummary to my 
>> CaseSummary model using Django-Excel. I am getting the error that 
>> CaseSummary does not match any given models when it should match my 
>> CaseSummary model. I have no problem previously in uploading data from a 
>> single tab spreadsheet to a single model without any foreign keys or 
>> relationships to other models. However, my objective is to upload a 
>> spreadsheet containing multiple tabs of data and my models have foreign 
>> keys, one-to-one and many-to-many fields too. However, i cannot seem to 
>> find good documentation online about how to do this. i really hope to 
>> receive some tips from this mailing list as i have been banging my head 
>> against the wall on this one. I look forward to hear from you guys. Thank 
>> you very much in advance! 
>>
>> More details below. 
>>
>> Error message screenshot while uploading my Excel Spreadsheet:
>>
>> [image: Screenshot 2019-07-23 at 5.16.03 PM.png]
>>
>>
>> Screenshot of my CaseSummary tab in my spreadsheet. Fictitious data.
>>
>> [image: Screenshot 2019-07-23 at 5.40.04 PM.png]
>>
>> My CaseSummary Model
>>
>> [image: Screenshot 2019-07-23 at 5.41.15 PM.png]
>>
>>
>>
>>
>> I am running Python version 2.2.2, Django version 3.7.3 and Django-Excel 
>> 0.0.10. 
>> While reading the documentation at Django-Excel page (
>> http://django.pyexcel.org/en/latest/), i am not sure if i understand 
>> choice_func function correctly. I understand the reason why choice_func is 
>> required because it has a foreign key to Question and its Question column 
>> has to be translate to a Question instance. However, i am guessing that the 
>> argument "row" when parsed into choice_func refers to a row of data from 
>> Choice data tab in the sample-data.xlsx and row[0] refers to the first 
>> column of Choice tab whose values are e.g. 'ide'. Am i correct? 
>>
>>         def choice_func(row):
>>             q = Question.objects.filter(slug=row[0])[0]
>>             row[0] = q
>>             return row
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/e8b0cc85-517b-4452-b856-2c4ff14b8019%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/e8b0cc85-517b-4452-b856-2c4ff14b8019%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4400f43c-9f9c-4500-93ad-125538e7d685%40googlegroups.com.

Reply via email to