Created
March 28, 2022 15:37
-
-
Save markng/4f84565329e3e60a843395da5c373cca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
from django.db import models | |
class Topic(models.Model): | |
title = models.CharField(max_length=30) | |
created_by = models.ForeignKey(User, on_delete=models.CASCADE) | |
created_at = models.DateTimeField(auto_now_add=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment