Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-5736

Comment on: "manual/tutorial/write-a-tumblelog-application-with-flask-mongoengine.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • None
    • 0.25

    Description

      Hey,

      In the step where you define the schema, and set the classes for Post and Comment there's an error.

      The comment class has to come before the Post class, or MongoEngine can't find it, and returns the following error:

      mongoengine.errors.NotRegistered: `Comment` has not been registered in the document registry.
      Importing the document class automatically registers it, has it
      been imported?

      If you're going to keep the structure as is, and define define Post before Comment you have to make sure you pass the name as a string (i.e., 'Comment').

      I hosted a hackathon this weekend using this tutorial, and lots of beginners were stuck on this bug.

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 33 weeks, 3 days ago