try to pass -1.0
On Tue, May 19, 2020 at 1:08 PM Aldian Fazrihady wrote:
> replace
> ```
> Report.objects.create(param=test_name,comp=compon,value=test_value)
> ```
> with
> ```
> Report.objects.create(param=test_name,comp_id=compon,value=test_value)
> ```
>
> On Tue, May 19, 2020 at 2:39 PM
replace
```
Report.objects.create(param=test_name,comp=compon,value=test_value)
```
with
```
Report.objects.create(param=test_name,comp_id=compon,value=test_value)
```
On Tue, May 19, 2020 at 2:39 PM ratnadeep ray wrote:
> Can you please say in which line we should make that change because in
Can you please say in which line we should make that change because in so
many places I am using comp. So in all the places should I change that ?
On Tuesday, 19 May 2020 12:36:19 UTC+5:30, Aldian Fazrihady wrote:
>
> Use comp_id= instead of comp=
>
> Regards,
>
> Aldian Fazrihady
>
Use comp_id= instead of comp=
Regards,
Aldian Fazrihady
http://aldianfazrihady.com
Pada tanggal Sel, 19 Mei 2020 13.49, ratnadeep ray
menulis:
> Hi all,
>
> I am trying to add a row in the DB using the following views.py:
>
> # Create your views here.
>> from django.shortcuts import render
>>
Hi all,
I am trying to add a row in the DB using the following views.py:
# Create your views here.
> from django.shortcuts import render
> from fusioncharts.models import Component,Report
> import xlrd
> def pie_chart(request):
> labels = []
> data = []
> loc =
imary-key-fields
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Gerald Brown
Sent: Wednesday, July 18, 2018 4:51 AM
To: django-users@googlegroups.com
Subject: Re: Django foreign-key cannot assign must be a instance
Also when creating my models I use "
Also when creating my models I use "id =
models.AutoField(primary_key=True)" for my ID field. This way Django
will Auto generate an ID for each record.
On Tuesday, 17 July, 2018 08:03 PM, Sainath Bavugi wrote:
I am developing a web app using Django. I have created the table in
MySQL
Thanks a lot. that worked
On Tuesday, 17 July 2018 13:29:49 UTC+1, Sainath Bavugi wrote:
>
> I am developing a web app using Django. I have created the table in MySQL
> database and then generated the models.py using inspectdb. I am able to
> fetch details and connect to the database
I would suggest you to try this code
sav_list = List(id=4, item_name ='name1', item_desc='desc1',
location='location', reason='rfp', pid=Order.objects.get(poid = 3))
Instead of passing integer 3 to pid, try to the pass the order Object
which has the poid = 3
On 17 July 2018 at 17:33, Sainath
The way I do it is backwards from what you are doing. I.E. I make the
models first and then use ./manage.py makemigrations & ./manage.py
migrate. This way Django creates the tables AND the FK Indexes, which I
think may be missing on your setup. Now that you have the models try
running the
I am developing a web app using Django. I have created the table in MySQL
database and then generated the models.py using inspectdb. I am able to
fetch details and connect to the database without any issues. But while
saving the values to the particular table, below error is shown
*Cannot
11 matches
Mail list logo