Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

flask tumblelog is not working #7

Open
vikashruhil opened this issue Mar 29, 2015 · 3 comments
Open

flask tumblelog is not working #7

vikashruhil opened this issue Mar 29, 2015 · 3 comments

Comments

@vikashruhil
Copy link

Vikashs-MacBook-Air:tumblelog vikashruhil$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 6, in
from tumblelog import app
File "/Users/vikashruhil/Downloads/flask-tumblelog-master/tumblelog/init.py", line 18, in
register_blueprints(app)
File "/Users/vikashruhil/Downloads/flask-tumblelog-master/tumblelog/init.py", line 13, in register_blueprints
from tumblelog.views import posts
File "/Users/vikashruhil/Downloads/flask-tumblelog-master/tumblelog/views.py", line 5, in
from tumblelog.models import Post, Comment
File "/Users/vikashruhil/Downloads/flask-tumblelog-master/tumblelog/models.py", line 6, in
class Post(db.DynamicDocument):
File "/usr/local/lib/python2.7/site-packages/mongoengine/base/metaclasses.py", line 361, in new
meta['index_specs'] = new_class._build_index_specs(meta['indexes'])
File "/usr/local/lib/python2.7/site-packages/mongoengine/base/document.py", line 722, in _build_index_specs
unique_indices = cls._unique_with_indexes()
File "/usr/local/lib/python2.7/site-packages/mongoengine/base/document.py", line 861, in _unique_with_indexes
field.document_type != cls):
File "/usr/local/lib/python2.7/site-packages/mongoengine/fields.py", line 563, in document_type
self.document_type_obj = get_document(self.document_type_obj)
File "/usr/local/lib/python2.7/site-packages/mongoengine/base/common.py", line 25, in get_document
""".strip() % name)
mongoengine.errors.NotRegistered: Comment has not been registered in the document registry.
Importing the document class automatically registers it, has it
been imported?

@thinkerou
Copy link

@knaggita
Copy link

start with class comment followed by post(interchange their order)

@afizing
Copy link

afizing commented Dec 13, 2015

I did that .. but unfortunately still getting the same error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants