Skip to content

Commit

Permalink
Adding optional task to module3
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Holderness authored and Will Holderness committed Feb 4, 2020
1 parent 8575b40 commit 55e9e0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks_module3.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Create Model class

Create the blog post model by adding a new class into `mainapp/models.py`. Name the class `BlogPost` and make it extend `models.Model`. In the class body, add a field called `title` and set it to `models.CharField()`. Pass it a `max_length` of `200`.
Create the blog post model by adding a new class into `mainapp/models.py`. Name the class `BlogPost` and make it extend `models.Model`. In the class body, add a field called `title` and set it to `models.CharField()`. Pass it a `max_length` of `200`. Optionally, you can also pass `unique=True` to require that each blog post has a unique title. You'll see this done in the answer video.

```python
class BlogPost(models.Model):
Expand Down

0 comments on commit 55e9e0c

Please sign in to comment.