-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Urgent Help: Trying to Import data from two sheets(xlsx) into two different models(Foreign Key Related) - Not able to lead the Data #62
Comments
I think it could be simply the case. Try lower case in your data, i.e.: Supplier_x -> supplier_x |
Hi Jaska, Thanks for response. Please suggest. Will try the lower case also and update you. Regards |
Hi Jaska, Modified the models as below with lower case. Could you please suggest. class Supplier(models.Model):
class Tax_Vat(models.Model):
Thanks |
Hi Manoj I am sorry that I was half-minded in providing the assistance. Please rewind back to the original code. After analysing your code and your intention, I think you fail to understand how django-excel handles foreign key. Please refer to the tutorial or the below code. So you will have to link up Tax_Vat and Supplier:
Here is the example where question links with its choices:
And just an observation, it seems your code sometimes use 8 spaces instead of 4. Please use 4 spaces or use python's 'black' tool. |
Kindly Suggest, where exactly i am doing the mistake.
Best Regards
Manoj R
Details:
Models Used:
Views.py:
Error Details:
The text was updated successfully, but these errors were encountered: