In my application there is a need to create unique URLs (one per resource) that can be shared. Something like Google Calendar Private address for a calendar. I want to know what are the best practices for this.
If it helps my application is in Django.
Please let me know if this question needs more explanation.
This should be very straightforward. In your urls.py file you want a url like this:
Then you handle this in
views.py
with a function called:Finally, you get to use this in your templates too, using naming:
Just ensure that in your models.py:
I might even be tempted to use a signal handler to generate this field automatically upon save of the object. See the documentation.