Skip to content

Commit d6c9253

Browse files
committed
Correct code file references in docs
The documentation was updated to add correct file references to the Python code snippets for Artist, Album, and Song models, and the function view. Previously, it was not clear where these code snippets should be placed.
1 parent 80c983a commit d6c9253

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ We are going to create 3 models in the file models.py
131131
Let's start with the artist model.
132132

133133
```python
134+
# music.models.py
134135
class Artist(models.Model):
135136
name = models.CharField(max_length=100)
136137

@@ -144,6 +145,7 @@ from django.db import models
144145
```
145146
Now the album model
146147
```python
148+
# music.models.py
147149
class Album(models.Model):
148150
title = models.CharField(max_length=100)
149151
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
@@ -156,6 +158,7 @@ class Album(models.Model):
156158
the last model will be the song model that will have relationship with artist and album.
157159

158160
```python
161+
# music.models.py
159162
class Song(models.Model):
160163
author = models.CharField(max_length=100)
161164
title = models.CharField(max_length=100)
@@ -197,6 +200,7 @@ And last but not least you need to create this
197200
you need to create the view. A function view in this case.
198201

199202
```python
203+
# music.views.py
200204
from django.http import HttpResponse
201205

202206

0 commit comments

Comments
 (0)