Open jameslzhu opened 5 years ago
Related conversation on the OCF issue tracker (https://leprosy.ocf.berkeley.edu/forum/t/ocf-io-shorturls/48).
The OCF suggests four necessary pieces for a good solution:
hkn.mu/s/temp_url
So things you should do:
/s/
prefix. Make sure website paths take precedence over shortlink paths.shortlinks/models.py
somehow. This is a combination of SlugField and the unique option.leader
field in Links? why?Links
plural to Link
singular?One more thing I'd like you guys to do is build some kind of edit interface for this (a form to create a new shortlink).
Currently, all shortlinks are naked, in the sense that these urls are resolved without additional prefixes:
As currently implemented in hknweb, however, shortlinks are namespaced behind
s/
. In other words, all shortlink urls are only accessible at:This will break many existing urls to our website (decal, member signup, serv, studrel, etc.), even if namespacing is desirable. The fix should involve routing shortlinks in the root
hknweb/urls.py
, passing on all urls that match no other urls to the shortlinks app.