Quantcast
Channel: Object not showing in DetailView when using a uuid as primary key - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Burhan Khalid for Object not showing in DetailView when using a...

The reason your template tags are not working is because you need to actually return the instance in get_object(): def get_object(self): return Shipment.objects.get(pk=self.kwargs['trackid']) If you...

View Article


Answer by tolerious for Object not showing in DetailView when using a uuid as...

Why not just encrypt the normal sequential ids instead? To someone who doesn't know the encryption key, the ids will seem just as random. You can write a wrapper that automatically decrypts the ID on...

View Article


Object not showing in DetailView when using a uuid as primary key

I'm using this to generate my primary keys as I don't want them to be simple numbers easy to guess (found it in this post): def make_uuid(): return base64.b64encode(uuid.uuid4().bytes).replace('=',...

View Article
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>