A two-route design sends separate add and edit URLs to one view. The add route supplies no ID; the edit route supplies the object ID. section 7.2.5
The view distinguishes its work by the ID it receives:
- Use a default ID of 0 for Add mode, then create an empty form on GET or a bound form on POST. section 7.2.5
- Use the supplied ID for Edit mode, fetch the object, and pass it as the ModelForm instance on both GET and POST. section 7.2.5
