Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8676883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:18:39+00:00 2026-06-12T20:18:39+00:00

The Tumblelog app on the MongoDB site does not work . I’ve followed the

  • 0

The Tumblelog app on the MongoDB site does not work .

I’ve followed the example absolutely and I get a 404 error when I run it in my local host. I’m using Eclipse Indigo (3.7.2) with pyDev on Ubuntu 12.0.4.

I’m not sure if it’s because of the register_blueprints, which I included in the __init__.py

I did it like this as in the tutorial:

from flask import Flask
from flask.ext.mongoengine import MongoEngine

app = Flask(__name__)
app.config["MONGODB_DB"] = "my_tumble_log"
app.config["SECRET_KEY"] = "KeepThisS3cr3t"

db = MongoEngine(app)


if __name__ == '__main__':
    app.run()


    def register_blueprints(app):
    # Prevents circular imports
        from tumblelog.views import posts
        app.register_blueprint(posts)
    register_blueprints(app)

Otherwise I have followed the tutorial exactly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:18:41+00:00Added an answer on June 12, 2026 at 8:18 pm

    register_blueprints is never called – app.run blocks until you kill the script (at which point there is no point to adding routes).

    Change the order and everything will run:

    def register_blueprints(app):
    # Prevents circular imports
        from tumblelog.views import posts
        app.register_blueprint(posts)
    
    register_blueprints(app)
    
    if __name__ == '__main__':
        app.run()
    

    regist_blueprints is not actually preventing circular imports – the pattern to avoid circular imports is to create the app in a different file and import both app and blueprint into a third file to run everything:

    #  application.py
    from flask import Flask  # etc.
    
    app = Flask("your_package_name")
    

     

    # tumblelog/views.py
    from flask import Blueprint, current_app  # etc.
    
    posts = Blueprint("tumblelog")
    
    @posts.route("/")
    def index():
        # use current_app rather than app here
    

     

    # run_server.py (use the same pattern for .wsgi files)
    from application import app
    from tumblelog.views import posts
    
    app.register_blueprint(posts)
    
    if __name__ == "__main__":
        app.run()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i was just wondering if a jQuery.get() request have any difference to a normal
I try to add a recaptcha field to my registration form and followed Marcos
I have a database tumblelog (using mongoengine) in which I added some data in
Got my little mechanize code: br.open('http://tumblr.com/customize'); print br.response().read() print br.form['edit_tumblelog[cname]'] # there definitely is
I'm making a simple Ember application that takes some Tumblr json, lists the posts,
I am trying to log in to Tumblr using Curl, Below curl post logins
Everyone knows? about avatar url in tumblr api / read / json? like for
Ok, so im working with tumblr's API and im using SimpleXMLElement with php and
I'm using Recaptcha within Django. I was using the following tutorial to integrate it
I'm trying to use Syntax Highlighter with my blog at http://a.shinynew.me . This is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.