Python Forum

Full Version: May I ask how is this going?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
from django.db import models

# Create your models here.

class Topic(models.Model):
    """用户学习的主题"""
    text = models.CharField(max_length=200)
    date_added = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return self.text
Error:
Traceback (most recent call last): File "C:/Python/study_notes/agss/models.py", line 5, in <module> class T(models.Model): File "C:\Python\study_notes\11_env\lib\site-packages\django\db\models\base.py", line 100, in __new__ app_config = apps.get_containing_app_config(module) File "C:\Python\study_notes\11_env\lib\site-packages\django\apps\registry.py", line 244, in get_containing_app_config self.check_apps_ready() File "C:\Python\study_notes\11_env\lib\site-packages\django\apps\registry.py", line 127, in check_apps_ready raise AppRegistryNotReady("Apps aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Cryptic title
What are you looking for?
(May-15-2018, 02:57 PM)Larz60+ Wrote: [ -> ]Cryptic title
What are you looking for?

  • I asked why the error