File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
roots/test-docstrings/dummy_django_app Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -22,20 +22,20 @@ class FileModel(models.Model):
2222
2323
2424class SimpleModel (models .Model ):
25- # Foreign Keys
25+ #: Docstring of foreign key
2626 file = models .ForeignKey (
2727 "FileModel" , related_name = "simple_models" , on_delete = models .CASCADE
2828 )
2929
30- # One to one field
30+ #: Docstring of one to one field
3131 childA = models .OneToOneField (
3232 "ChildModelA" , related_name = "simple_model" , on_delete = models .CASCADE
3333 )
3434
35- # Many to many field
35+ #: Docstring of many to many field
3636 childrenB = models .ManyToManyField ("ChildModelB" , related_name = "simple_models" )
3737
38- # Dummy field
38+ #: Docstring of char field
3939 dummy_field = models .CharField (
4040 max_length = 3 ,
4141 help_text = "This should help you" ,
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ def test_model_field(app, do_autodoc):
2424 "" ,
2525 " Very verbose name of dummy field. This should help you" ,
2626 "" ,
27+ " Docstring of char field" ,
28+ "" ,
2729 ]
2830
2931
@@ -41,6 +43,8 @@ def test_foreignkey(app, do_autodoc):
4143 "" ,
4244 " File (related name: :attr:`~dummy_django_app.models.FileModel.simple_models`)" ,
4345 "" ,
46+ " Docstring of foreign key" ,
47+ "" ,
4448 ]
4549
4650
@@ -72,6 +76,8 @@ def test_foreignkey_string(app, do_autodoc):
7276 "" ,
7377 " File (related name: :attr:`~dummy_django_app.models.FileModel.simple_models`)" ,
7478 "" ,
79+ " Docstring of foreign key" ,
80+ "" ,
7581 ]
7682
7783
@@ -131,6 +137,8 @@ def test_manytomany_field(app, do_autodoc):
131137 " ChildrenB "
132138 "(related name: :attr:`~dummy_django_app.models.ChildModelB.simple_models`)" ,
133139 "" ,
140+ " Docstring of many to many field" ,
141+ "" ,
134142 ]
135143
136144
You can’t perform that action at this time.
0 commit comments