Post multiple data

48 views
Skip to first unread message

Prashanth Patelc

unread,
Aug 8, 2023, 7:21:08 AM8/8/23
to django...@googlegroups.com
Hi all, 

I'm sending multiple rows data through html but I'm unable to save data in django I'm not receiving proper data.how to send multiple shifts names and times through ajax or html in django.

I'm adding multiple shift name and in-time out-time .

Please find the attached screenshot 
IMG20230807194755.jpg

Mz Gz

unread,
Aug 8, 2023, 7:51:35 AM8/8/23
to Django users
Check the object sent from frontend using developer tools in browser.

If the object is sent correctly to backend.

Just access is from POST dict

--
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/CAMCU6CqWJme8fg-JuZJ%2BQnTBk63_f4%3DZMYTO7GFnRChOMt1teQ%40mail.gmail.com.

Prashanth Patelc

unread,
Aug 8, 2023, 7:57:17 AM8/8/23
to django...@googlegroups.com
I'm not able to send multiple data in front -end .

Hendry Revenus

unread,
Aug 8, 2023, 6:11:59 PM8/8/23
to django...@googlegroups.com

ivan harold

unread,
Aug 9, 2023, 10:05:48 AM8/9/23
to Django users
maybe this will help 

" from django.conf import settings 
 class Design(models.Model): 
 human_readable_id = models.CharField(max_length=10, default=id_generator, db_index=True
 manager = models.CharField(max_length=40
 worker = models.ForeignKey( 
 settings.AUTH_USER_MODEL, 
 on_delete=models.CASCADE, 
to_field='username' ) "

Reply all
Reply to author
Forward
0 new messages