Is there any way to use GUIDs in django?
Posted
by Jason Baker
on Stack Overflow
See other posts from Stack Overflow
or by Jason Baker
Published on 2009-05-21T19:14:04Z
Indexed on
2010/04/05
6:53 UTC
Read the original article
Hit count: 229
I have a couple of tables that are joined by GUIDs in SQL Server. Now, I've found a few custom fields to add support for GUIDs in django, but I tend to shy away from using code in blog posts if at all possible. I'm not going to do anything with the GUID other than join on it and maybe assign a GUID on new entries (although this is optional). Is there any way to allow this using django's built-in types? Like can I use some kind of char field or binary field and "trick" django into joining using it?
If it's any help, I'm using django-pyodbc.
© Stack Overflow or respective owner