Django - short non-linear non-predictable ID in the URL
问题 I know there are similar questions (like this, this, this and this) but I have specific requirements and looking for a less-expensive way to do the following (on Django 1.10.2): Looking to not have sequential/guessable integer ids in the URLs and ideally meet the following requirements: Avoid UUIDs since that makes the URL really long. Avoid a custom primary key. It doesn’t seem to work well if the models have ManyToManyFields. Got affected by at least three bugs while trying that (#25012,