This my Answer to the stackoverflow question: Django: Print url of view without hardcoding the url:
If you use named url patterns you can do the follwing in your template
{% url create_object %}
