Generate CUID Client Side

32 views
Skip to first unread message

Timothy Cook

unread,
May 16, 2019, 1:09:13 PM5/16/19
to django...@googlegroups.com
I have a project where I want to generate a CUID client side to send to a REST API service as the document name. 

My question is how to best include the cuid library so that the client browser is generating the CUID and how to implement this in the template so I can post this cuid back to the view.

Thanks,
Tim

--
Timothy W. Cook, CEO
Data Insights, Inc. 

Mario R. Osorio

unread,
May 17, 2019, 1:23:14 PM5/17/19
to Django users
This question is OT however; cuid being a js library, what you have to do is have your templates include the necessary libraries and make use of them.

Timothy Cook

unread,
May 17, 2019, 9:38:04 PM5/17/19
to django...@googlegroups.com
On Fri, May 17, 2019 at 10:23 AM Mario R. Osorio <nimbi...@gmail.com> wrote:
This question is OT however; cuid being a js library, what you have to do is have your templates include the necessary libraries and make use of them.



Well, it's not exactly off topic. I am specifically asking about integration with Django templates so that I can generate CUIDs in the client browser. 
Currently, I do it in the view via the Python library. But that always uses the information from the server. 
But thanks anyway.

 



On Thursday, May 16, 2019 at 9:09:13 AM UTC-4, Timothy Cook wrote:
I have a project where I want to generate a CUID client side to send to a REST API service as the document name. 

My question is how to best include the cuid library so that the client browser is generating the CUID and how to implement this in the template so I can post this cuid back to the view.

Thanks,
Tim

--
Timothy W. Cook, CEO
Data Insights, Inc. 

--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9a4e9bd3-398c-4796-bc39-f895973b0feb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages