How to have a URL like this in Django?
How can I handle these things?

If you want to handle this thing, to obtain my-url, then use the form field clean method to return the valid url. Thats what it is meant for.
How can I have URLs like example.com/category/catename-operation/ in Django?
Also in some cases the user enters a space separated category, how can I handle that?
E.g if the user enters the category as "my home", then the URL for this category will become 
example.com/my home/ which is not a valid URL.
How can I handle these things?