2

I'm sure I am missing something embarrassingly obvious here, but as I am following Tipfy's Hello World tutorial, I'm getting nothing but Werkzeug's 404 page whenever I try to load one of the URLs defined in my urls.py file (in /project/app/apps/hello_world).

I've ensured that 'apps.hello_world' is in the list of installed apps in the 'apps_installed' dictionary in config.py. Everything else seems to be in order, and I've read & followed the instructions in the tutorial and Getting Started guide carefully, but I can't see why Tipfy isn't detecting the rules I defined in get_rules() in my hello_world app's urls.py file.

Here is the code from that file:

from tipfy import Rule

def get_rules(app):
    rules = [
        Rule('/', endpoint='hello/world', handler='handlers.HelloWorldHandler'),
        Rule('/hello-jinja', endpoint='hello/jinja', handler='handlers.HelloJinjaHandler'),
        Rule('/hello-json', endpoint='hello/json', handler='handlers.HelloJsonHandler'),
        Rule('/hello-ajax', endpoint='hello/ajax', handler='handlers.HelloAjaxHandler'),
    ]

    return rules

Any help anyone can offer is greatly appreciated - thanks!

tommytwoeyes
  • 483
  • 5
  • 19

1 Answers1

2

Nevermind. I solved it. Although it was nowhere in the Tipfy documentation that I could find, and despite the fact that I'm still a solid newbie with Python, I guess I should have known that my 'hello_world' directory in the apps directory needed an __init__.py file in order to be treated as a module

tommytwoeyes
  • 483
  • 5
  • 19