I'm trying to setup newsmeme app, which I found to be a full featured
application so i can learn by example.
So, after I run
python setup.py develop
and after that
python application.py
I get following errors:
Traceback (most recent call last):
File "application.py", line 23, in <module>
from newsmeme import helpers
File "/home/luff/newsmeme/newsmeme/__init__.py", line 10, in <module>
from newsmeme.application import create_app
File "/home/luff/newsmeme/newsmeme/application.py", line 24, in <module>
from newsmeme import views
File "/home/luff/newsmeme/newsmeme/views/__init__.py", line 2, in <module>
from .frontend import frontend
File "/home/luff/newsmeme/newsmeme/views/frontend.py", line 7, in <module>
from newsmeme.models import Post, Tag
File "/home/luff/newsmeme/newsmeme/models/__init__.py", line 12, in
<module>
from newsmeme.models.users import User
File "/home/luff/newsmeme/newsmeme/models/users.py", line 64, in <module>
class User(db.Model):
File "/home/luff/newsmeme/newsmeme/models/users.py", line 90, in User
class Permissions(Permissions):
NameError: name 'Permissions' is not defined
--
and there is no file permissions in models which is called in
from newsmeme.models.permissions import Permissions
What am I missing here?
Thanks
Hi, On Wed, Apr 6, 2011 at 4:37 PM, Srecko <shrekuntu@gmail.com> wrote: > I'm trying to setup newsmeme app, which I found to be a full featured > application so i can learn by example. > So, after I run > > python setup.py develop > > and after that > > python application.py > > I get following errors: > > Traceback (most recent call last): > File "application.py", line 23, in <module> > from newsmeme import helpers > File "/home/luff/newsmeme/newsmeme/__init__.py", line 10, in <module> > from newsmeme.application import create_app > File "/home/luff/newsmeme/newsmeme/application.py", line 24, in <module> > from newsmeme import views > File "/home/luff/newsmeme/newsmeme/views/__init__.py", line 2, in <module> > from .frontend import frontend > File "/home/luff/newsmeme/newsmeme/views/frontend.py", line 7, in <module> > from newsmeme.models import Post, Tag > File "/home/luff/newsmeme/newsmeme/models/__init__.py", line 12, in > <module> > from newsmeme.models.users import User > File "/home/luff/newsmeme/newsmeme/models/users.py", line 64, in <module> > class User(db.Model): > File "/home/luff/newsmeme/newsmeme/models/users.py", line 90, in User > class Permissions(Permissions): > NameError: name 'Permissions' is not defined > -- > and there is no file permissions in models which is called in > > from newsmeme.models.permissions import Permissions > > What am I missing here? For some reason, a fresh `hg clone` is missing newsmeme/models/permissions.py. A simple workaround is to download (see 'raw' link) this file directly in the models/ directory: https://bitbucket.org/danjac/newsmeme/src/7cc053c9fa40/newsmeme/models/permissions.py I'm not the newsmeme developer, but here's how I would fire up this project in a local development environment: hg clone https://bitbucket.org/danjac/newsmeme python setup.py develop python manage.py createall python manage.py runserver The createall step is defined in manage.py and creates the database tables in ./newsmeme.db. Hope this helps, Ron
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've added the missing files to the repo. On 06/04/11 22:08, Ron DuPlain wrote: > Hi, > > On Wed, Apr 6, 2011 at 4:37 PM, Srecko <shrekuntu@gmail.com> wrote: >> I'm trying to setup newsmeme app, which I found to be a full featured >> application so i can learn by example. >> So, after I run >> >> python setup.py develop >> >> and after that >> >> python application.py >> >> I get following errors: >> >> Traceback (most recent call last): >> File "application.py", line 23, in <module> >> from newsmeme import helpers >> File "/home/luff/newsmeme/newsmeme/__init__.py", line 10, in <module> >> from newsmeme.application import create_app >> File "/home/luff/newsmeme/newsmeme/application.py", line 24, in <module> >> from newsmeme import views >> File "/home/luff/newsmeme/newsmeme/views/__init__.py", line 2, in <module> >> from .frontend import frontend >> File "/home/luff/newsmeme/newsmeme/views/frontend.py", line 7, in <module> >> from newsmeme.models import Post, Tag >> File "/home/luff/newsmeme/newsmeme/models/__init__.py", line 12, in >> <module> >> from newsmeme.models.users import User >> File "/home/luff/newsmeme/newsmeme/models/users.py", line 64, in <module> >> class User(db.Model): >> File "/home/luff/newsmeme/newsmeme/models/users.py", line 90, in User >> class Permissions(Permissions): >> NameError: name 'Permissions' is not defined >> -- >> and there is no file permissions in models which is called in >> >> from newsmeme.models.permissions import Permissions >> >> What am I missing here? > > For some reason, a fresh `hg clone` is missing > newsmeme/models/permissions.py. A simple workaround is to download > (see 'raw' link) this file directly in the models/ directory: > > https://bitbucket.org/danjac/newsmeme/src/7cc053c9fa40/newsmeme/models/permissions.py > > I'm not the newsmeme developer, but here's how I would fire up this > project in a local development environment: > > hg clone https://bitbucket.org/danjac/newsmeme > python setup.py develop > python manage.py createall > python manage.py runserver > > The createall step is defined in manage.py and creates the database > tables in ./newsmeme.db. > > Hope this helps, > > Ron -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNnYGuAAoJEBOb/VnsY8urttkH/inw2zfq8JG3VVagb1kdAXJr PPgwPuw1ngXYMi741zBUhHCzzZnQpE/1E7g7wEtAqHGD1EMx7h2YNGZR9jSwHjZz EaB5ZIc2SZ/u9XfTpr7imCWi1DLulSwbnQqoe2AMSATSWF7pqFLBfSKBHTU7fkvX PgzJuoVSyudt2u7T4iwtnPkoTO4WugzMzRIKY+1eEbOjn/KkodBdhEV6CTU3RZJB 5E085fnoP9McG8xzLAGu1IghQYVybPLO/BrvSSXm6OtNw9Frr37r256RXL36xkFd Qhi9Wu7cWJGbvZZmje32iSNjkS8S03C6LZmg0tJWgEbKKW+LtkX2tfieoCy1o0Q= =VrRW -----END PGP SIGNATURE-----