Nomenclature of default views
View names are used for reversing the urls which may be required for difeerent purposes like testing. As the views are created automatically, the view names are created as follows:
-
For any model the view-name is created as follows:
- For detailed view:
<model_label>-<detail>with all.replaced with_and all lower cases. For example: if there is an app with nameeduand a model namedStudentthen the view name would beedu_student-detail. - For list view:
<model_label>-<list>with all.replaced with_and all lower cases. For example: if there is an app with nameeduand a model namedStudentthen the view name would beedu_student-list.
- For detailed view:
-
For any child model (in relationship with other model) a nested url is created and the view name is generated as follows:
- For detailed view:
<parent_model_label>-<parent_model_name>-<relatedName>-<detail>with all.replaced with_and all lower cases. For example: if there is an app with nameeduand a model namedStudentwith many to many relationship with another model namedCoursethen the view name would beedu_student-student-course_set-detail. - For detailed view:
<parent_model_label>-<parent_model_name>-<relatedName>-<list>with all.replaced with_and all lower cases. For example: if there is an app with nameeduand a model namedStudentwith many to many relationship with another model namedCoursethen the view name would beedu_student-student-course_set-list.
- For detailed view: