Re: join on plain integerfield

2022-12-08 Thread Clive Bruton
Try Django Relativity: https://pypi.org/project/django-relativity/ -- Clive On 21 Nov 2022, at 10:11, Marek Rouchal wrote: Any suggestion how I can model such an integerfield, so that I can do joins on it using the Django ORM queryset syntax? -- You received this message because you are

Re: Need to Replace django default I'd with UUID field

2022-12-08 Thread Clive Bruton
It's more or less the same problem, use a new field to insert your new foreign keys (UUIDs), looking them up via your old foreign keys to get the new UUID values. Or, as the other Jason suggests, if you can, just use the UUIDs for external access. -- Clive On 22 Nov 2022, at 19:02, Rajesh

Re: Django model design best practice guidance

2022-12-08 Thread Joshua Corlin
Thanks Mike, i think the lack of understanding of the underlying implementation is what was tripping me up. Data tracked by this "field" actually being a different table at the DB level makes complete sense. I have added the M2M field to my ticket model and now have this working at the DB lev

Re: Django model design best practice guidance

2022-12-08 Thread Mike Dewhirst
On 9/12/2022 3:04 am, Joshua Corlin wrote: Ive not used this field before so if it is im having a hard time wrapping my head around how this would work in this use case. Many-to-many is simple to conceptualise if you realise it is not a field in the table you think it is. It is actually a se

Django model design best practice guidance

2022-12-08 Thread Joshua Corlin
Hello Django Community, I am working on implementing a feature in a project that I built and I am looking for some guidance on how implement the database side of this feature most efficiently. The models in question: The two models in question are the user model and a model that tracks tick

how to serialize default user model in drf serializer

2022-12-08 Thread Agnese Camellini
Good morning, i am doing a simple interface which has a foreign to the default user model: I find some difficulties in writing the serializer as there's not serializer for the User default model. Any idea of how can i solve this? Below is my model code. Regards. AGnese Camellini from django.conf