One feature I would like to add to my django app is the ability for users to create some content (without signing up / creating an account), and then generating a content-specific link that the users can share with others. Clicking on the link would take the user back to the content they created.
Basically, I’d like the behavior to be similar to sites like pastebin – where users get a pastebin link they can share with other people (example: http://pastebin.com/XjEJvSJp)
I’m not sure what the best way is to generate these types of links – does anyone have any ideas?
Thanks!
You can create these links in any way you want, as long as each link is unique. For example, take the MD5 of the content and use the first 8 characters of the hex digest.
A simple model for that could be:
You could also make
refersToa property that automatically assigns a unique key (as described above).And you need a matching URL:
You get the idea…