Re: Form does not import current data from data base

2023-11-13 Thread Stefan Kusmierz
Dear community,
I'd like to inform you how I overcame the problem:
instead of using
"List.objects.last().a"
to access field "a" of the last instance of class List, I did it like so:
m=List.objects.last().pk
List.objects.get(pk=m).a
Best regards,
Stefan


Kani Sbt schrieb am Donnerstag, 26. Oktober 2023 um 12:08:37 UTC+2:

> in django how to do phonepay integration any know or any blog or video 
> anything , could you tell me !!! , i need  to do that payment integration 
> in phonepay 
>
> On Thu, 26 Oct 2023 at 14:30, Stefan Kusmierz  
> wrote:
>
>> Hi Migui, thanks for your input. It didn't work.
>>
>>
>> Migui Galan schrieb am Donnerstag, 26. Oktober 2023 um 09:27:48 UTC+2:
>>
>>> Hi Stefan, sorry i thought the process you are working is in POST 
>>> request. Try to place your func() after formchoices3.
>>>
>>> On Wed, Oct 25, 2023 at 4:10 PM Stefan Kusmierz  
>>> wrote:
>>>
 Hi Migui, 
 I'm enchanted to receive such a quick answer.
 1. It's MyForm1_2_3_4() because it's the answer to the first Get 
 request while the page is opened
 2. Why would I try to save the form to the data base?
 Best regards, Stefan


 Migui Galan schrieb am Mittwoch, 25. Oktober 2023 um 03:39:16 UTC+2:

> Hi Stefan!
> it should be form = MyForm1_2_3_4(request.POST) where POST request 
> will place/process the data to your form then after form.save()
>
> On Wed, Oct 25, 2023 at 12:29 AM Stefan Kusmierz  
> wrote:
>
>> Dear community,
>> this looks like a django bug to me:
>> 1. (see first image)
>> By api query I confirm that the last object of class List has the 
>> value "Startwert_neu2" in its field a, which was expected.
>> 2. (see second image)
>> The form "MyForm1_2_3_4" is instantiated using exactly the same 
>> command ("List.objects.last().a") to build formchoices3 which enter the 
>> corresponding choicefield furtherdown in "MyForm1_2_3_4" (not shown in 
>> the 
>> image)
>> 3. While running the app my print out (to find the problem) states, 
>> that formchoices3 does not contain the expected data "Startwert_neu2" 
>> but 
>> "mCP purity", which is old data from older objects. So the rendered Form 
>> also contains the old data.
>> To complete the information I also added snippets of views (fourth 
>> image) and models (fifth image).
>> Is this a known issue? 
>> Thanks in advance,
>> Stefan
>>
>> [image: DB-Query.jpg][image: Form.jpg][image: print out while 
>> running.jpg][image: snippet from views.jpg][image: snippet from 
>> models.jpg]
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/085fcd6d-13aa-422b-86f9-1e15c2549ac8n%40googlegroups.com
>>  
>> 
>> .
>>
> -- 
 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...@googlegroups.com.

>>> To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/43b913ef-c9a3-4705-9b58-a889f2667426n%40googlegroups.com
  
 
 .

>>> -- 
>> 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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/6730a25f-6a75-42ea-bb69-6742dfed5bc8n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/c4b0f039-d132-4271-b698-5cdf1a208d33n%40googlegroups.com.


Re: Form does not import current data from data base

2023-10-26 Thread Kani Sbt
in django how to do phonepay integration any know or any blog or video
anything , could you tell me !!! , i need  to do that payment integration
in phonepay

On Thu, 26 Oct 2023 at 14:30, Stefan Kusmierz 
wrote:

> Hi Migui, thanks for your input. It didn't work.
>
>
> Migui Galan schrieb am Donnerstag, 26. Oktober 2023 um 09:27:48 UTC+2:
>
>> Hi Stefan, sorry i thought the process you are working is in POST
>> request. Try to place your func() after formchoices3.
>>
>> On Wed, Oct 25, 2023 at 4:10 PM Stefan Kusmierz 
>> wrote:
>>
>>> Hi Migui,
>>> I'm enchanted to receive such a quick answer.
>>> 1. It's MyForm1_2_3_4() because it's the answer to the first Get request
>>> while the page is opened
>>> 2. Why would I try to save the form to the data base?
>>> Best regards, Stefan
>>>
>>>
>>> Migui Galan schrieb am Mittwoch, 25. Oktober 2023 um 03:39:16 UTC+2:
>>>
 Hi Stefan!
 it should be form = MyForm1_2_3_4(request.POST) where POST request will
 place/process the data to your form then after form.save()

 On Wed, Oct 25, 2023 at 12:29 AM Stefan Kusmierz 
 wrote:

> Dear community,
> this looks like a django bug to me:
> 1. (see first image)
> By api query I confirm that the last object of class List has the
> value "Startwert_neu2" in its field a, which was expected.
> 2. (see second image)
> The form "MyForm1_2_3_4" is instantiated using exactly the same
> command ("List.objects.last().a") to build formchoices3 which enter the
> corresponding choicefield furtherdown in "MyForm1_2_3_4" (not shown in the
> image)
> 3. While running the app my print out (to find the problem) states,
> that formchoices3 does not contain the expected data "Startwert_neu2" but
> "mCP purity", which is old data from older objects. So the rendered Form
> also contains the old data.
> To complete the information I also added snippets of views (fourth
> image) and models (fifth image).
> Is this a known issue?
> Thanks in advance,
> Stefan
>
> [image: DB-Query.jpg][image: Form.jpg][image: print out while
> running.jpg][image: snippet from views.jpg][image: snippet from
> models.jpg]
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/085fcd6d-13aa-422b-86f9-1e15c2549ac8n%40googlegroups.com
> 
> .
>
 --
>>> 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...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/43b913ef-c9a3-4705-9b58-a889f2667426n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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/6730a25f-6a75-42ea-bb69-6742dfed5bc8n%40googlegroups.com
> 
> .
>

-- 
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/CAKJFrTRYuvX3gm_jjdrtgHA%2BtX0EEfzSNQpQBPnOYx-iWVxODA%40mail.gmail.com.


Re: Form does not import current data from data base

2023-10-26 Thread Stefan Kusmierz
Hi Migui, thanks for your input. It didn't work.


Migui Galan schrieb am Donnerstag, 26. Oktober 2023 um 09:27:48 UTC+2:

> Hi Stefan, sorry i thought the process you are working is in POST request. 
> Try to place your func() after formchoices3.
>
> On Wed, Oct 25, 2023 at 4:10 PM Stefan Kusmierz  
> wrote:
>
>> Hi Migui, 
>> I'm enchanted to receive such a quick answer.
>> 1. It's MyForm1_2_3_4() because it's the answer to the first Get request 
>> while the page is opened
>> 2. Why would I try to save the form to the data base?
>> Best regards, Stefan
>>
>>
>> Migui Galan schrieb am Mittwoch, 25. Oktober 2023 um 03:39:16 UTC+2:
>>
>>> Hi Stefan!
>>> it should be form = MyForm1_2_3_4(request.POST) where POST request will 
>>> place/process the data to your form then after form.save()
>>>
>>> On Wed, Oct 25, 2023 at 12:29 AM Stefan Kusmierz  
>>> wrote:
>>>
 Dear community,
 this looks like a django bug to me:
 1. (see first image)
 By api query I confirm that the last object of class List has the value 
 "Startwert_neu2" in its field a, which was expected.
 2. (see second image)
 The form "MyForm1_2_3_4" is instantiated using exactly the same command 
 ("List.objects.last().a") to build formchoices3 which enter the 
 corresponding choicefield furtherdown in "MyForm1_2_3_4" (not shown in the 
 image)
 3. While running the app my print out (to find the problem) states, 
 that formchoices3 does not contain the expected data "Startwert_neu2" but 
 "mCP purity", which is old data from older objects. So the rendered Form 
 also contains the old data.
 To complete the information I also added snippets of views (fourth 
 image) and models (fifth image).
 Is this a known issue? 
 Thanks in advance,
 Stefan

 [image: DB-Query.jpg][image: Form.jpg][image: print out while 
 running.jpg][image: snippet from views.jpg][image: snippet from 
 models.jpg]

 -- 
 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...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/085fcd6d-13aa-422b-86f9-1e15c2549ac8n%40googlegroups.com
  
 
 .

>>> -- 
>> 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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/43b913ef-c9a3-4705-9b58-a889f2667426n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/6730a25f-6a75-42ea-bb69-6742dfed5bc8n%40googlegroups.com.


Re: Form does not import current data from data base

2023-10-26 Thread Migui Galan
Hi Stefan, sorry i thought the process you are working is in POST request.
Try to place your func() after formchoices3.

On Wed, Oct 25, 2023 at 4:10 PM Stefan Kusmierz 
wrote:

> Hi Migui,
> I'm enchanted to receive such a quick answer.
> 1. It's MyForm1_2_3_4() because it's the answer to the first Get request
> while the page is opened
> 2. Why would I try to save the form to the data base?
> Best regards, Stefan
>
>
> Migui Galan schrieb am Mittwoch, 25. Oktober 2023 um 03:39:16 UTC+2:
>
>> Hi Stefan!
>> it should be form = MyForm1_2_3_4(request.POST) where POST request will
>> place/process the data to your form then after form.save()
>>
>> On Wed, Oct 25, 2023 at 12:29 AM Stefan Kusmierz 
>> wrote:
>>
>>> Dear community,
>>> this looks like a django bug to me:
>>> 1. (see first image)
>>> By api query I confirm that the last object of class List has the value
>>> "Startwert_neu2" in its field a, which was expected.
>>> 2. (see second image)
>>> The form "MyForm1_2_3_4" is instantiated using exactly the same command
>>> ("List.objects.last().a") to build formchoices3 which enter the
>>> corresponding choicefield furtherdown in "MyForm1_2_3_4" (not shown in the
>>> image)
>>> 3. While running the app my print out (to find the problem) states, that
>>> formchoices3 does not contain the expected data "Startwert_neu2" but "mCP
>>> purity", which is old data from older objects. So the rendered Form also
>>> contains the old data.
>>> To complete the information I also added snippets of views (fourth
>>> image) and models (fifth image).
>>> Is this a known issue?
>>> Thanks in advance,
>>> Stefan
>>>
>>> [image: DB-Query.jpg][image: Form.jpg][image: print out while
>>> running.jpg][image: snippet from views.jpg][image: snippet from
>>> models.jpg]
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/085fcd6d-13aa-422b-86f9-1e15c2549ac8n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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/43b913ef-c9a3-4705-9b58-a889f2667426n%40googlegroups.com
> 
> .
>

-- 
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/CAKKJMPOoEjOge6ct6qTvq6fNkZTDRJ4gAc-kvAtNzjN4Vu47XQ%40mail.gmail.com.


Re: Form does not import current data from data base

2023-10-25 Thread Stefan Kusmierz
Hi Migui, 
I'm enchanted to receive such a quick answer.
1. It's MyForm1_2_3_4() because it's the answer to the first Get request 
while the page is opened
2. Why would I try to save the form to the data base?
Best regards, Stefan


Migui Galan schrieb am Mittwoch, 25. Oktober 2023 um 03:39:16 UTC+2:

> Hi Stefan!
> it should be form = MyForm1_2_3_4(request.POST) where POST request will 
> place/process the data to your form then after form.save()
>
> On Wed, Oct 25, 2023 at 12:29 AM Stefan Kusmierz  
> wrote:
>
>> Dear community,
>> this looks like a django bug to me:
>> 1. (see first image)
>> By api query I confirm that the last object of class List has the value 
>> "Startwert_neu2" in its field a, which was expected.
>> 2. (see second image)
>> The form "MyForm1_2_3_4" is instantiated using exactly the same command 
>> ("List.objects.last().a") to build formchoices3 which enter the 
>> corresponding choicefield furtherdown in "MyForm1_2_3_4" (not shown in the 
>> image)
>> 3. While running the app my print out (to find the problem) states, that 
>> formchoices3 does not contain the expected data "Startwert_neu2" but "mCP 
>> purity", which is old data from older objects. So the rendered Form also 
>> contains the old data.
>> To complete the information I also added snippets of views (fourth image) 
>> and models (fifth image).
>> Is this a known issue? 
>> Thanks in advance,
>> Stefan
>>
>> [image: DB-Query.jpg][image: Form.jpg][image: print out while 
>> running.jpg][image: snippet from views.jpg][image: snippet from 
>> models.jpg]
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/085fcd6d-13aa-422b-86f9-1e15c2549ac8n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/43b913ef-c9a3-4705-9b58-a889f2667426n%40googlegroups.com.