Profile for David Abrahams
| Name | David Abrahams |
|---|---|
| Email Address | Reveal this emailaddress |
| Jabber Id | dave_abrahams@jabber.org |
| Website URL | http://www.boostpro.com |
| Avatar | |
| Posts | 22 |
| Board Signature | |
-
- 2008-12-29 21:48:41
- Re: Upgrading to Sphene 0.5?
- Board » General
-
I can't imagine what could possibly justify labelling an incomplete
operation as complete. Could you explain, please?
Thanks.
-
- 2008-12-29 18:34:16
- Re: Upgrading to Sphene 0.5?
- Board » General
-
I am using psycopg2 (PostGreSQL). Of course anything is possible, but
I don't have any reason to believe there was any corruption, and
running the commands manually seems to have worked in the end (the
site works just fine now).
-
- 2008-12-28 20:19:52
- Partial SyncDB
- Board » General
-
OK, but it seems pretty clear to me that this is a bug in Sphene. If a database update fails it should not be marked as completed, should it?
-
- 2008-12-28 07:48:04
- Re: Upgrading to Sphene 0.5?
- Board » General
-
Yes, administrator error was holding back our version of the Sphene source on the server. But now that that's handled, I may have caused sphene to think the database is updated even though it really isn't. I say that because there was an error the first time I tried to do it, and the next time around it apparently thought there was nothing to do. I sure hope I'm mistaken, though. Herbert, can you offer any suggestions?
$ python manage.py syncdb Creating table community_rolegroup Creating table community_rolegroupmember 2008-04-06 00: SQL Statement: ALTER TABLE "community_groupmember" ADD userlevel integer 2008-04-06 01: SQL Statement: UPDATE "community_groupmember" SET userlevel = 0 2008-04-06 02: SQL Statement: ALTER TABLE "community_groupmember" ALTER userlevel SET NOT NULL 2008-04-10 00: SQL Statement: ALTER TABLE "community_communityuserprofile" ADD displayname varchar(250) 2008-04-10 01: SQL Statement: UPDATE "community_communityuserprofile" SET displayname = '' 2008-04-10 02: SQL Statement: ALTER TABLE "community_communityuserprofile" ALTER displayname SET NOT NULL 2008-04-15 00: SQL Statement: ALTER TABLE "community_rolemember" ALTER user_id DROP NOT NULL 2008-04-15 01: SQL Statement: ALTER TABLE "community_rolemember" ADD rolegroup_id integer REFERENCES community_rolegroup(id) Detected changes - Do you want to execute SQL Statements ? (yes,no): yes 2008-03-23 00: SQL Statement: ALTER TABLE "sphwiki_wikisnipchange" ADD title VARCHAR(250) 2008-03-23 01: SQL Statement: UPDATE "sphwiki_wikisnipchange" SET title = '' 2008-03-23 02: SQL Statement: ALTER TABLE "sphwiki_wikisnipchange" ALTER title SET NOT NULL 2008-03-23 03: SQL Statement: ALTER TABLE "sphwiki_wikisnipchange" ADD change_type INTEGER 2008-03-23 04: SQL Statement: UPDATE "sphwiki_wikisnipchange" SET change_type = 0 2008-03-23 05: SQL Statement: ALTER TABLE "sphwiki_wikisnipchange" ALTER change_type SET NOT NULL Detected changes - Do you want to execute SQL Statements ? (yes,no): yes Traceback (most recent call last): File "manage.py", line 11, in <module> execute_manager(settings) File "/usr/local/lib/python2.5/site-packages/django/core/management/__init__.py", line 340, in execute_manager utility.execute() File "/usr/local/lib/python2.5/site-packages/django/core/management/__init__.py", line 295, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 192, in run_from_argv self.execute(*args, **options.__dict__) File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 219, in execute output = self.handle(*args, **options) File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 348, in handle return self.handle_noargs(**options) File "/usr/local/lib/python2.5/site-packages/django/core/management/commands/syncdb.py", line 101, in handle_noargs emit_post_sync_signal(created_models, verbosity, interactive) File "/usr/local/lib/python2.5/site-packages/django/core/management/sql.py", line 205, in emit_post_sync_signal interactive=interactive) File "/usr/local/lib/python2.5/site-packages/django/dispatch/dispatcher.py", line 148, in send response = receiver(signal=self, sender=sender, **named) File "/usr/local/www/django/boostcon/boost_consulting/communitytools/sphenecoll/sphene/community/management.py", line 125, in do_changelog curs.execute( sqlstmt ) psycopg2.OperationalError: cannot ALTER TABLE "sphwiki_wikisnipchange" because it has pending trigger events [dave@boost-consulting /usr/local/www/django/boostcon/boost_consulting]$ sudo /usr/local/etc/rc.d/django_boostcon stop Password: Stopping django_boostcon FCGI processes [dave@boost-consulting /usr/local/www/django/boostcon/boost_consulting]$ python manage.py syncdb [dave@boost-consulting /usr/local/www/django/boostcon/boost_consulting]$ sudo /usr/local/etc/rc.d/django_boostcon start Starting django_boostcon FCGI processes
-
- 2008-12-27 18:49:24
- Re: Upgrading to Sphene 0.5?
- Board » General
-
Apparently that is not enough to do the job:
python manage.py syncdb
/usr/local/www/django/boostcon/boost_consulting/communitytools/sphenecoll/sphene/community/__init__.py:7: DeprecationWarning: django.newforms is no longer new. Import django.forms instead.
from django import newforms as djangoforms
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.5/site-packages/django/core/management/__init__.py", line 340, in execute_manager
utility.execute()
File "/usr/local/lib/python2.5/site-packages/django/core/management/__init__.py", line 295, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 192, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 210, in execute
translation.activate('en-us')
File "/usr/local/lib/python2.5/site-packages/django/utils/translation/__init__.py", line 73, in activate
return real_activate(language)
File "/usr/local/lib/python2.5/site-packages/django/utils/translation/__init__.py", line 43, in delayed_loader
return g['real_%s' % caller](*args, **kwargs)
File "/usr/local/lib/python2.5/site-packages/django/utils/translation/trans_real.py", line 209, in activate
_active[currentThread()] = translation(language)
File "/usr/local/lib/python2.5/site-packages/django/utils/translation/trans_real.py", line 198, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/usr/local/lib/python2.5/site-packages/django/utils/translation/trans_real.py", line 181, in _fetch
app = getattr(__import__(appname[
], {}, {}, [appname[p+1:]]), appname[p+1:])
File "/usr/local/www/django/boostcon/boost_consulting/communitytools/sphenecoll/sphene/community/__init__.py", line 11, in <module>
from sphene.community.sphutils import get_sph_setting
File "/usr/local/www/django/boostcon/boost_consulting/communitytools/sphenecoll/sphene/community/sphutils.py", line 6, in <module>
from sphene.community.middleware import get_current_request, get_current_sphdata
File "/usr/local/www/django/boostcon/boost_consulting/communitytools/sphenecoll/sphene/community/middleware.py", line 5, in <module>
from sphene.community.models import Group
File "/usr/local/www/django/boostcon/boost_consulting/communitytools/sphenecoll/sphene/community/models.py", line 44, in <module>
class GroupMember(models.Model):
File "/usr/local/www/django/boostcon/boost_consulting/communitytools/sphenecoll/sphene/community/models.py", line 45, in GroupMember
group = models.ForeignKey( Group, edit_inline = models.TABULAR, core = True )
AttributeError: 'module' object has no attribute 'TABULAR'
This is also what happens when I try to restart the server.
-
- 2008-03-19 03:17:44
- Re: Smoother upgrades?
- Board » General
-
Now fixed. The problem was:
1. I hadn't enabled django.core.context_processors.media, which AFAIK didn't exist in 0.96 (I was using the media_url processor frrom http://www.b-list.org/weblog/2006/06/14/django-tips-template-context-processors)
2. I needed a trailing slash on my MEDIA_URL
3. I needed a link to communitytools/static/sphene from my MEDIA_ROOT
Maybe SCT could benefit from an upgrading guide
-
- 2008-03-18 23:49:53
- Re: Smoother upgrades?
- Board » General
-
Herbert Poul said @ 2008-03-18 21:04:37:looks nice, but it seems you haven't set your MEDIA_URL in settings.py (the folder icons don't work)I noticed that. I think I have set MEDIA_URL, or none of my own images would show up. The problem is that it points to my media, not to yours. I think sphene (and all plug-in Django apps) need a separate MEDIA_URL or something to make this work out cleanly... or maybe this has something to do with pre-existing overrides I have of some of your templates. This will take more investigation.
-
- 2008-03-18 21:00:03
- Re: Smoother upgrades?
- Board » General
-
Herbert Poul said @ 2008-03-17 20:14:46:as for the exception in the django admin interface of roles: i've changed the ordering to "group_id" instead of "group" .. this way it doesn't use community_group.id and it works ..Is that one checked in yet?
Herbert Poul said @ 2008-03-17 20:14:46:anyway .. i somehow lost track of the problems.. is anything left open ? - have you tried to change the community/community/ url ?
I did manage to change that. I wouldn't say my url scheme is super-logical now, but at least the site works. Please see http://boostcon.com
Cheers,
-
- 2008-03-17 22:06:37
- Re: Smoother upgrades?
- Board » General
-
Herbert Poul said @ 2008-03-17 20:14:46:anyway .. i somehow lost track of the problems.. is anything left open ? - have you tried to change the community/community/ url ?No problems left except for any open tickets I may have in the tracker, thanks. From now on I'll make sure that each issue gets a tracker ticket so we don't have that confusion.
I think everything is working now; I'll let you know when the site is live.
Cheers!
-
- 2008-03-17 17:28:33
- Re: Smoother upgrades?
- Board » General
-
David Abrahams said @ 2008-03-17 13:52:50:If I had to guess, I'd say the creation of the sphboard_postannotation table occurs before the changelog for the Post model runs, but the latter creates the "markup" field needed by the former.Nope, that's not it. The real explanation and a workaround is given in http://code.google.com/p/sct-project/issues/detail?id=98
--- Last Edited by David Abrahams at 2008-03-17 17:53:45 ---


