Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools
Board » General » Problem running example in tutorial with SCT 0.3

Hi,

This looks like a very cool project.

I am having a problem similiar to what others have reported, however I have not been able to resolve it :(

I have been getting the following error when running "manage.py syncdb"

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/lib/python2.5/site-packages/django/core/management.py", line 1672, in execute_manager
    execute_from_command_line(action_mapping, argv)
  File "/usr/lib/python2.5/site-packages/django/core/management.py", line 1564, in execute_from_command_line
    translation.activate('en-us')
  File "/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py", line 208, in activate
    _active[currentThread()] = translation(language)
  File "/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py", line 197, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py", line 180, in _fetch
    app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]), appname[p+1:])
  File "/home/http/django/cradmin/../communitytools/sphenecoll/sphene/community/__init__.py", line 11, in <module>
    from sphene.community.forms import EditProfileForm, Separator
  File "/home/http/django/cradmin/../communitytools/sphenecoll/sphene/community/forms.py", line 45, in <module>
    
  File "/usr/lib/python2.5/site-packages/django/contrib/auth/models.py", line 4, in <module>
    from django.contrib.contenttypes.models import ContentType
  File "/usr/lib/python2.5/site-packages/django/contrib/contenttypes/models.py", line 33, in <module>
    class ContentType(models.Model):
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 30, in __new__
    new_class.add_to_class('_meta', Options(attrs.pop('Meta', None)))
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 169, in add_to_class
    value.contribute_to_class(cls, name)
  File "/usr/lib/python2.5/site-packages/django/db/models/options.py", line 53, in contribute_to_class
    setattr(self, 'verbose_name_plural', meta_attrs.pop('verbose_name_plural', self.verbose_name + 's'))
  File "/usr/lib/python2.5/site-packages/django/utils/functional.py", line 42, in __wrapper__
    res = self.__func(*self.__args, **self.__kw)
  File "/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py", line 268, in gettext
    _default = translation(settings.LANGUAGE_CODE)
  File "/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py", line 197, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py", line 180, in _fetch
    app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]), appname[p+1:])
AttributeError: 'module' object has no attribute 'community'


I have upgraded to Django 0.96-1 but I still have the same problem (I removed the old Django 0.96 install before installing the new version). I have probably forgotten something really obvious!
I have tried the SCT code from both SVN and the tarball from code.google.com

Any help would be appreciated!
Tom.
hi,
unfortunately SCT is only compatible with django trunk right now.. i would recommend to use the SVN trunk version of both, SCT and django.

i've tried to suggest that django would release a new maintenance release .. but they are eagerly working on django 1.0 .. so until they release a 1.0 release, SCT will only work with django trunk...

cu,
herbert
Hey, we have Signatures !!! Great, isn't it ? ;)
Thank you, I will try that.

Tom.
I had the same problem, so I did as Herbert suggests and upgraded to Django trunk. Now the syncdb goes off without a hitch, and I can log into Django's admin just fine.

However, I get a "Page not found" error from Django when I navigate to the root URL, and "No Group matches the given query" when I go to /wiki.

When I go to /board, I get "NoReverseMatch at /board/show/0/" if I am logged into Django's admin. If I am not logged into the Django admin, it actually loads the board page but tells me there are currently no categories (I've checked the admin console and the MySQL database and the example categories are definitely in the database).

Any help would be greatly appreciated, I'd love to start working with SCM. Let me know if you need any more information at all. I can actually show you the page itself if you want, as I've tried it both with the development server and with mod_python (on the same server) and I seem to get the same results.

Thanks in advance.
in the Tutorial there is a section about 1.) creating a new Group object and 2.) modifying the urls.py ..

have you done so ? have you made sure that the groupName in urls.py matches the Group you have created ?

btw. if you are starting a new project.. i would recommend using 'communitydraft' .. it's already set up and should work out of the box ..
Hey, we have Signatures !!! Great, isn't it ? ;)
I neglected to mention, I am in fact running CommunityDraft. I've checked out CommunityTools as well and Django trunk as per the instructions on the forum and the site.

I've also checked the database, the example data is there and is even viewable from the Django admin.

One setting I was kind of confused about, in settings_local.py, was the SECRET_KEY. I wasn't sure what to put there and I just changed to it a password that I sometimes use. Could my problems be because I've changed that from "Make me unique"?

no, the SECRET_KEY is nothing SCT related.. it's used by django .. http://www.djangoproject.com/documentation/settings/#secret-key

anyhoo.. so you used django trunk and SCT trunk ? and you run ./manage.py runserver from communitydraft/community ?

this .. is a bit different then .. the groupName in the communitydraft is specified through the SPH_HOST_MIDDLEWARE_URLCONF_MAP variable.. not urls.py .. because it uses the middleware: sphene.community.middleware.\MultiHostMiddleware

by default it is:

SPH_HOST_MIDDLEWARE_URLCONF_MAP = {
    '127.0.0.1:8000': { 'urlconf': 'urlconfs.community_urls',
                        'params': { 'groupName': 'example' }
                        },
    r'^(?P<groupName>\w+).localhost.*$': { 'urlconf': 'urlconfs.community_urls', },
}


you could use the following in your settings_local.py:

SPH_HOST_MIDDLEWARE_URLCONF_MAP = {
    '.*': { 'urlconf': 'urlconfs.community_urls',
            'params': { 'groupName': 'example' }
            },
}


- replace 'groupName': 'example' with your groupName .. - this could also be used to basically have vhosts with one SCT installation .. (for example i'm running http://sct.sphene.net on the same apache/django/sct instance as https://herbert.poul.at/ )
Hey, we have Signatures !!! Great, isn't it ? ;)
Problem solved. Thank you very much!
Problem solved. Thank you very much!
great, let me know if you encounter any additional problems :)
- it would also be nice to hear from you if you got a project up and running which uses SCT ;)
Hey, we have Signatures !!! Great, isn't it ? ;)

Please login to post a reply.



Powered by Sphene Community Tools