greeting

22 views
Skip to first unread message

Tosin Ayoola

unread,
Mar 3, 2020, 6:48:36 PM3/3/20
to django...@googlegroups.com
halo.
good day to you, thank for you response to my question about checkbox with django, i could really use your help on that, that why i messaged your privately, hoping you can help out, a sample code, models, views, form will help, i will appreciate if you can help me out. thanks

Motaz Hejaze

unread,
Mar 4, 2020, 12:24:18 AM3/4/20
to django...@googlegroups.com
Please let me know exactly the problem  , i dont remember the case you talking about

On Tue, 3 Mar 2020, 8:47 pm Tosin Ayoola, <tosina...@gmail.com> wrote:
halo.
good day to you, thank for you response to my question about checkbox with django, i could really use your help on that, that why i messaged your privately, hoping you can help out, a sample code, models, views, form will help, i will appreciate if you can help me out. thanks

--
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/CAHLKn70_4k9ksCNz3SiaOGuSX%3DVWyGkW0_01ZuLJsDeLMqLvUw%40mail.gmail.com.

Tosin Ayoola

unread,
Mar 4, 2020, 10:48:16 AM3/4/20
to django...@googlegroups.com
saving values of a checkbox to the database

Tosin Ayoola

unread,
Mar 4, 2020, 3:56:51 PM3/4/20
to django...@googlegroups.com
the project is a services subscription platform, i wan to list out services offered, then user make a selection for the choice the wan, after that the click submit to make payment, now i have the services listed in html, my challenge is how do i save this selected services to django models alongside the price for each service

Motaz Hejaze

unread,
Mar 4, 2020, 5:04:45 PM3/4/20
to django...@googlegroups.com
From html make check boxes submit services ids ..

After form submittion the choosen services ids will be submitted as an array in request.POST or request.GET 

Loop through this array , query the model that contain the service price with each service id , and save all service data in the chosen model 

Reply all
Reply to author
Forward
0 new messages