How to Save or Print the array field in Django using CreateView?

119 views
Skip to first unread message

Janak Parmar

unread,
Oct 4, 2020, 10:59:00 AM10/4/20
to Django users

Hi PFB the code.

HTML Array of Input Field

Model.py

Models.py Image

Forms.py

Forms.py Image

Views.py

Views.py Image

Please help me here. I want to convert this array field values into string with comma separated and then save in table.

I hope I will get resolution.

Thanks in Advance.

Kasper Laudrup

unread,
Oct 4, 2020, 2:10:15 PM10/4/20
to django...@googlegroups.com
Hi Janak,

On 04/10/2020 08.59, Janak Parmar wrote:
>
> Please help me here. I want to convert this array field values into
> string with comma separated and then save in table.
>

Not sure what "this array" is in this context, but couldn't you just use
the standard Python join method?

https://www.tutorialspoint.com/python3/string_join.htm

I don't see any reason to use any Django specific functionality.

Kind regards,

Kasper Laudrup

Dvs Khamele

unread,
Oct 11, 2020, 1:11:37 PM10/11/20
to django...@googlegroups.com
Hi do you hire contract based python/django freelancer?
 We can help you in this and related tasks at fair prices. Reply or send email to div...@pythonmate.com
Best Regards, 
Divyesh Khamele,
Pythonmate

--
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/032cea7e-b7bf-5fb0-0474-15e002bf68b9%40stacktrace.dk.

Venkata Rami Reddy Kasu

unread,
Oct 11, 2020, 4:29:16 PM10/11/20
to django...@googlegroups.com
Don't spam the community. Advertise yourself outside the group.
..................................................................................
Thank you 
K.V.Rami Reddy
PHP , Node.Js & Python Web Developer



Reply all
Reply to author
Forward
0 new messages