Posted by drewmccormack |
|
I am trying to get SCT running on Mac OS X 10.5, but I've run into a problem. I've installed 0.96.1, which is running my django site fine, and I'm trying to get SCT 0.3 working (communitydraft).
The problem seems to be with translation. When I run 'manage.py syncdb', I get the following stack dump: drew pbook: manage.py syncdb Traceback (most recent call last): File "./manage.py", line 11, in <module> execute_manager(settings) File "/Library/Python/2.5/site-packages/django/core/management.py", line 1672, in execute_manager execute_from_command_line(action_mapping, argv) File "/Library/Python/2.5/site-packages/django/core/management.py", line 1564, in execute_from_command_line translation.activate('en-us') File "/Library/Python/2.5/site-packages/django/utils/translation/trans_real.py", line 208, in activate _active[currentThread()] = translation(language) File "/Library/Python/2.5/site-packages/django/utils/translation/trans_real.py", line 197, in translation default_translation = _fetch(settings.LANGUAGE_CODE) File "/Library/Python/2.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 "/Users/drew/Downloads/sct-0.3/communitydraft/community/../../communitytools/sphenecoll/sphene/community/__init__.py", line 13, in <module> from sphene.community.sphutils import get_sph_setting File "/Users/drew/Downloads/sct-0.3/communitydraft/community/../../communitytools/sphenecoll/sphene/community/sphutils.py", line 6, in <module> from sphene.community.middleware import get_current_request File "/Users/drew/Downloads/sct-0.3/communitydraft/community/../../communitytools/sphenecoll/sphene/community/middleware.py", line 5, in <module> from sphene.community.models import Group File "/Users/drew/Downloads/sct-0.3/communitydraft/community/../../communitytools/sphenecoll/sphene/community/models.py", line 2, in <module> from django.contrib.auth.models import User File "/Library/Python/2.5/site-packages/django/contrib/auth/models.py", line 4, in <module> from django.contrib.contenttypes.models import ContentType File "/Library/Python/2.5/site-packages/django/contrib/contenttypes/models.py", line 33, in <module> class ContentType(models.Model): File "/Library/Python/2.5/site-packages/django/db/models/base.py", line 30, in __new__ new_class.add_to_class('_meta', Options(attrs.pop('Meta', None))) File "/Library/Python/2.5/site-packages/django/db/models/base.py", line 169, in add_to_class value.contribute_to_class(cls, name) File "/Library/Python/2.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 "/Library/Python/2.5/site-packages/django/utils/functional.py", line 42, in __wrapper__ res = self.__func(*self.__args, **self.__kw) File "/Library/Python/2.5/site-packages/django/utils/translation/trans_real.py", line 268, in gettext _default = translation(settings.LANGUAGE_CODE) File "/Library/Python/2.5/site-packages/django/utils/translation/trans_real.py", line 197, in translation default_translation = _fetch(settings.LANGUAGE_CODE) File "/Library/Python/2.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' Any ideas? Drew |
|
Posted by Herbert Poul |
|
hi,
unfortunately i fear my assumption on the download page that SCT 0.3 is compatible with the django 0.96 is wrong. i tried to fix a couple of problems to make it compatible.. but it is pointless .. there are way too many incompatibilities .. could you use the trunk version of django and SCT ? Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by drewmccormack |
|
Thanks, it's good to know so that I don't waste anymore time on it.
I'll try the trunk. Drew |
|
Posted by drewmccormack |
|
Hi again,
I installed the trunk version of django, and managed to get the basic functionality of sct working. But I the admin tools don't work with the latest trunk: it fails looking for a template file :-( It's probably a problem in django, but does anyone know a workaround? Drew |
|
Posted by Herbert Poul |
|
this is strange.. i just updated my django checkout but everything still works ..
what error message do you get exactly and where ? directly on /admin/ or some subfolder ? Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by drewmccormack |
|
It could be that I have forgotten some important step in the django installation, but here is the template-loader postmortem I get:
Django tried loading these templates, in this order: Using loader django.template.loaders.filesystem.load_template_source: /Users/drew/WebDevelop/Packages/sct-0.3/communitydraft/community/templates/admin/login.html (File does not exist) /Users/drew/WebDevelop/Packages/sct-0.3/communitydraft/sitetemplates/admin/login.html (File does not exist) /Users/drew/WebDevelop/Packages/sct-0.3/communitytools/sphenecoll/templates/admin/login.html (File does not exist) Drew |
|
Posted by Herbert Poul |
|
this is weird.. were there no 'django.template.loaders.app_directories.load_template_source' ?
look into your settings.py to TEMPLATE_LOADERS if it contains 'django.template.loaders.app_directories.load_template_source' .. (and make sure you don't overwrite it in your settings_local.py) (this should all be working out of the box with the communitydraft project.. no idea how something could go wrong with this configuration) Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by drewmccormack |
|
I'm sure I have messed up something. The settings were all right, and I didn't clobber it in settings_local.
The following gets printed in the error, but it doesn't include any paths: Using loader django.template.loaders.app_directories.load_template_source: Is there something I could have forgotten when installing django, other than syncing the database? Drew |
|
Posted by Herbert Poul |
|
i have no idea if the error message should contain paths .. usually this template loader looks through all applications in INSTALLED_APPS (which i'm sure contains django.contrib.auth .. otherwise you wouldn't see anything at that URL :) ) and looks for a 'templates' directory in those applications ..
so if you look at your django installation directory .. there should be a django/contrib/admin/templates/admin/login.html the only thing i could imagine is that something went wrong during checkout or installation .. or the user you start the server with doesn't have read permission on that file.. Hey, we have Signatures !!! Great, isn't it ? ;) |
|
Posted by drewmccormack |
|
I found the problem: for some reason the templates and media for admin were not installed properly. I copied them across, and admin now works.
Now I have a problem that I think could be a real bug in SCT. I am using sqlite database, and when I use the admin interface to add a poll, I get a validation exception: Request Method: POST Request URL: http://127.0.0.1:8000/admin/sphboard/poll/add/ Exception Type: IntegrityError Exception Value: sphboard_poll.post_id may not be NULL Exception Location: /Library/Python/2.5/site-packages/django/db/backends/sqlite3/base.py in execute, line 133 Python Executable: /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python Python Version: 2.5.1 Drew |