cloudlaunch
cloudlaunch copied to clipboard
Rename slug to id?
Some primary keys use slug and others use id, which makes writing client code difficult, since you have to know in advanced whether an object is using slug or id. Since it doesn't matter whether the pk is a slug or not as it's autogenerated from the name anyway, it seems better to rename everything to ID.
One reason for going down the slug path may be readability of the URLs, if we care about that. The ID's typically result in shorter URLs but they do expose a bit more about the deployment so perhaps should be encoded... Having said that, I don't have a strong opinion one way or another.
What I meant was that we keep using a slug, but rename slug->id. That way, we can still have friendly urls etc., but we can always refer to an object's id by id, rather than having to switch between slug and id. So application.slug becomes application.id, but remains a slug value.
In light of https://github.com/galaxyproject/cloudlaunch/issues/159, renaming to id
makes even more sense.