Code Monkey home page Code Monkey logo

flask-tumblelog's Introduction

flask-tumblelog's People

Contributors

jrrembert avatar prijindal avatar rozza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flask-tumblelog's Issues

Assertion error in the auth.py file

The line in the auth.py file: return f(_args, *_kwargs)
results in an error: AssertionError: Unimplemented method 'GET'

Any idea why this may be? I followed the tutorial to the word, and everything was fine until I implemented the various post types.

get_absolute_url uses incorrect url_for arguments.

Post defines the following function

def get_absolute_url(self):
        return url_for('post', kwargs={"slug": self.slug})

This function isn't used in the tutorial, but calling it results in a BuildError exception.
The Blueprint for Post is 'posts' not 'post'.
It also doesn't define which 'function' to call, Ie 'posts.detail' or 'posts.list'.

The correct code should be

def get_absolute_url(self):
        return url_for('posts.detail', slug=self.slug)

Error somewhere in the tutorial

So, first off, awesome tutorial, and thanks for making it!

But there seems to be an error somewhere, and I am having trouble pegging it. It's somewhere between the section ending just before this one:
http://docs.mongodb.org/manual/tutorial/write-a-tumblelog-application-with-flask-mongoengine/#configure-mongoengine-and-flask

and the end of this one:
http://docs.mongodb.org/manual/tutorial/write-a-tumblelog-application-with-flask-mongoengine/#add-templates

I can successfully run:
python manage.py runserver

at the first point, but not at the second.

I posted question on SO, and the commenters also remembered having to change a couple things to get it to work:
http://stackoverflow.com/questions/16799231/replicating-flask-mongodb-gets-internal-server-error

I am not so clever as they were to figure out what.

Can only create BlogPosts

Attempting to save a Image, Video, or Quote post results in a redirect to create a new BlogPost. This is off of a fresh clone of 89e7631.

My environment has the following dependencies/versions:

appnope==0.1.0
decorator==4.0.2
Flask==0.10.1
flask-mongoengine==0.7.1
Flask-Script==2.0.5
Flask-WTF==0.12
gnureadline==6.3.3
ipython-genutils==0.1.0
itsdangerous==0.24
Jinja2==2.8
MarkupSafe==0.23
mongoengine==0.10.0
path.py==8.1
pexpect==3.3
pickleshare==0.5
pymongo==3.0.3
simplegeneric==0.8.1
traitlets==4.0.0
Werkzeug==0.10.4
wheel==0.24.0
WTForms==2.0.2

Errors NotRegistered flask-mongoengine Tutorial

Hi,

I started this Turial, Here

And get this error

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

any idea.
Thank you So much.

Cannot add comments in first version of tumbelog

In the section Add Data with the Shell, I can follow along with post = Post(.... After post.save() I get a return <Post: Hello world>. So far, so good.

But…

When I go on with comment, I encounter an error.

comment = Comment(
    author="one",
    body="two"
)

Traceback (most recent call last):
File "<console>", line 3, in <module>
TypeError: __init__() takes exactly 2 arguments (1 given)

I compared my __init__.py with the one in your repository, but could not find any difference. Same with models.py.

What am I doing wrong?

Here is my requirements.txt:

Flask==0.10.1
Flask-Script==0.6.7
Flask-WTF==0.9.5
Jinja2==2.7.2
MarkupSafe==0.21
WTForm==1.0
WTForms==1.0.5
Werkzeug==0.9.4
flask-mongoengine==0.7.0
itsdangerous==0.24
mongoengine==0.8.7
pymongo==2.7
wsgiref==0.1.2

flask tumblelog is not working

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.