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 » Smoother upgrades?

Page: Previous 1 2 3 Next

no, it's a SCT feature ;)

i've explained it a bit on djangosnippets.org: http://www.djangosnippets.org/snippets/289/

but as a user .. you run syncdb.. just as you did .. and see the SQL statements it would execute.. if you're using postgresql .. you are all set and can select 'yes' .. on any other database you need to say 'no' and convert the statements to your flavor by hand .. but at least you get an idea what has changed ..
Hey, we have Signatures !!! Great, isn't it ? ;)
no, it's a SCT feature ;)

i've explained it a bit on djangosnippets.org: http://www.djangosnippets.org/snippets/289/

but as a user .. you run syncdb.. just as you did .. and see the SQL statements it would execute.. if you're using postgresql .. you are all set and can select 'yes' ..

I tried just proceeding with syncdb but it fails. Had it worked, I'd never have tried the fancy evolution tools:
python manage.py syncdb
Executing module body.
Creating table community_communityuserprofile
Creating table community_taggeditem
Creating table community_grouptemplate
Creating table community_rolememberlimitation
Creating table community_rolemember
Creating table community_communityuserprofilefield
Creating table community_taglabel
Creating table community_permissionflag
Creating table community_communityuserprofilefieldvalue
Creating table community_role
Creating table community_tag
Creating table sphboard_postattachment
Creating table sphboard_threadlastvisit
Creating table sphboard_extendedcategoryconfig
Creating table sphboard_boarduserprofile
Creating table sphboard_threadinformation
Creating table sphboard_userpostcount
Creating table sphboard_postannotation
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/__init__.py", line 272, in execute_manager
    utility.execute()
  File "/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line 219, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py", line 72, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py", line 86, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py", line 168, in handle
    return self.handle_noargs(**options)
  File "/usr/lib/python2.5/site-packages/django/core/management/commands/syncdb.py", line 97, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive)
  File "/usr/lib/python2.5/site-packages/django/core/management/sql.py", line 491, in emit_post_sync_signal
    verbosity=verbosity, interactive=interactive)
  File "/usr/lib/python2.5/site-packages/django/dispatch/dispatcher.py", line 360, in send
    **named
  File "/usr/lib/python2.5/site-packages/django/dispatch/robustapply.py", line 47, in robustApply
    return receiver(*arguments, **named)
  File "/home/dave/src/site/boostcon-trunk/boost_consulting/communitytools/sphenecoll/sphene/sphboard/management.py", line 20, in init_data
    synchronize_threadinformation(verbosity)
  File "/home/dave/src/site/boostcon-trunk/boost_consulting/communitytools/sphenecoll/sphene/sphboard/management.py", line 32, in synchronize_threadinformation
    for thread in all_threads:
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 114, in __iter__
    return iter(self._get_data())
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 483, in _get_data
    self._result_cache = list(self.iterator())
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 189, in iterator
    cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params)
  File "/usr/lib/python2.5/site-packages/django/db/backends/util.py", line 18, in execute
    return self.cursor.execute(sql, params)
psycopg2.ProgrammingError: column sphboard_post.markup does not exist
LINE 1: ...oard_post"."postdate","sphboard_post"."author_id","sphboard_...
Dave Abrahams
Boostpro Computing
http://www.boostpro.com
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.
Dave Abrahams
Boostpro Computing
http://www.boostpro.com
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 ---
Dave Abrahams
Boostpro Computing
http://www.boostpro.com
David Abrahams said @ 2008-03-17 17:28:33:
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
thanks for investigating this problem - it sounds very reasonable .. i think i'll apply your patch - i just have to assure that changelogs won't run more than once then .. (i guess they won't since it will be written into the database the first time.. so nothing will happen the second time anyway..) ...
it's somehow unfortunate that there is no pre_syncdb


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 ..


anyway .. i somehow lost track of the problems.. is anything left open ? - have you tried to change the community/community/ url ?
Hey, we have Signatures !!! Great, isn't it ? ;)
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!
Dave Abrahams
Boostpro Computing
http://www.boostpro.com
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?

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,
Dave Abrahams
Boostpro Computing
http://www.boostpro.com
David Abrahams said @ 2008-03-18 21:00:03:
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?
yes it is

David Abrahams said @ 2008-03-18 21:00:03:
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


looks nice, but it seems you haven't set your MEDIA_URL in settings.py (the folder icons don't work)
Hey, we have Signatures !!! Great, isn't it ? ;)
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.
Dave Abrahams
Boostpro Computing
http://www.boostpro.com
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 ;-)
Dave Abrahams
Boostpro Computing
http://www.boostpro.com

Page: Previous 1 2 3 Next

Please login to post a reply.



Powered by Sphene Community Tools