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 nameedu
and a model namedStudent
then 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 nameedu
and a model namedStudent
then 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 nameedu
and a model namedStudent
with many to many relationship with another model namedCourse
then 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 nameedu
and a model namedStudent
with many to many relationship with another model namedCourse
then the view name would beedu_student-student-course_set-list
.
- For detailed view: