➜ flaskblog ls
config.py config.pyc env flaskblog __pycache__ requirements.txt runserver.py
(env)
➜ flaskblog flaskblog
(env)
➜ flaskblog tree
.
├── config.py
├── form.py
├── helper.py
├── helper.pyc
├── __init__.py
├── __init__.pyc
├── models.py
├── models.pyc
├── __pycache__
│ ├── helper.cpython-34.pyc
│ └── __init__.cpython-34.pyc
├── static
│ ├── css
│ │ ├── bootstrap.css
│ │ └── bootstrap.min.css
│ ├── javascript.js
│ ├── js
│ │ ├── bootstrap.js
│ │ └── bootstrap.min.js
│ └── style.css
├── templates
│ ├── addpost.html
│ ├── addtag.html
│ ├── editpost.html
│ ├── edittag.html
│ ├── index.html
│ ├── login.html
│ ├── post.html
│ ├── posts.html
│ ├── search.html
│ ├── signup.html
│ ├── tags.html
│ └── welcome.html
└── views.py
5 directories, 29 files
➜ flaskblog python runserver.py
Traceback (most recent call last):
File "runserver.py", line 1, in <module>
from flaskblog import app
File "/home/vagabund/web/flaskblog/flaskblog/__init__.py", line 4, in <module>
from helper import url_for_other_page
ImportError: No module named 'helper'
➜ flaskblog python runserver.py
Traceback (most recent call last):
File "runserver.py", line 1, in <module>
from flaskblog import app
File "/home/vagabund/web/flaskblog/flaskblog/__init__.py", line 4, in <module>
from helper import url_for_other_page
ImportError: No module named 'helper'
/home/vagabund/web/flaskblog/env/bin/python
➜ flaskblog python runserver.py
Traceback (most recent call last):
File "runserver.py", line 1, in <module>
from flaskblog import app
File "/home/vagabund/web/flaskblog/flaskblog/__init__.py", line 2, in <module>
from flask import Flask
File "/home/vagabund/web/flaskblog/env/lib/python3.4/site-packages/flask/__init__.py", line 17, in <module>
from werkzeug.exceptions import abort
File "/home/vagabund/web/flaskblog/env/lib/python3.4/site-packages/werkzeug/__init__.py", line 109, in <module>
for module, items in all_by_module.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
/usr/bin/python2
➜ flaskblog python
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt
>>>
(env)
➜ flaskblog python2
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
➜ flaskblog source env/bin/activate
(env)
➜ flaskblog python2 runserver.py
Traceback (most recent call last):
File "runserver.py", line 1, in <module>
from flaskblog import app
File "/home/vagabund/web/flaskblog/flaskblog/__init__.py", line 19, in <module>
from models import db
File "/home/vagabund/web/flaskblog/flaskblog/models.py", line 4, in <module>
from flask.ext.sqlalchemy import SQLAlchemy
File "/usr/local/lib/python2.7/dist-packages/flask/exthook.py", line 87, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named flask.ext.sqlalchemy