Gene Boggs on Nostr: npub19tw7h…fqdp5 >>> print(History.objects.count()) Traceback (most recent call ...
npub19tw7h9uksz03ejsr8wwah0fq7ustnl96vcj65wxn8t3vnsak07dsmfqdp5 (npub19tw…qdp5) >>> print(History.objects.count())
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'History' is not defined
🤔 weird. My models.py is:
```
from django.db import models
from django.utils import timezone
class History(models.Model):
role = models.CharField(max_length=20)
content = models.TextField()
created = models.DateTimeField(default=timezone.now)
```
Hmmmmmmmm
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'History' is not defined
🤔 weird. My models.py is:
```
from django.db import models
from django.utils import timezone
class History(models.Model):
role = models.CharField(max_length=20)
content = models.TextField()
created = models.DateTimeField(default=timezone.now)
```
Hmmmmmmmm