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 » Integrating Sphene with existing site

Page: Previous 1 2 3

another possible fix you could try ... modify sphenecoll/sphene/community/sphpermalink.py in line 26 (the return reverse(...)) insert a line before this return:

    if not isinstance(urlconf, list):
        urlconf = None


Yes, I did try something like that, but didn't get it quite right. Your code above works fine, but strangely, the problem seems to have gone away on its own. Very strange.

I have come across a MySQL error though, in the showThread view (this happens with latest django and either Sphene 0.3 or repository latest Sphene, on a clean install on my desktop machine):


Template error

In template /home/martin/python/sphene/templates/sphene/sphboard/showThread.html, error at line 35
Caught an exception while rendering: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1.0' at line 1")



and the stacktrace:


Traceback (most recent call last):
File "/home/martin/python/django/template/__init__.py" in render_node
  810. result = node.render(context)
File "/home/martin/python/django/template/defaulttags.py" in render
  112. len_values = len(values)
File "/home/martin/python/django/db/models/query.py" in __len__
  111. return len(self._get_data())
File "/home/martin/python/django/db/models/query.py" in _get_data
  482. self._result_cache = list(self.iterator())
File "/home/martin/python/django/db/models/query.py" in iterator
  189. cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params)
File "/home/martin/python/django/db/backends/util.py" in execute
  18. return self.cursor.execute(sql, params)
File "build/bdist.linux-i686/egg/MySQLdb/cursors.py" in execute
  166. self.errorhandler(self, exc, value)
File "build/bdist.linux-i686/egg/MySQLdb/connections.py" in defaulterrorhandler
  35. raise errorclass, errorvalue

  ProgrammingError at /QQ/forum/thread/3/
  (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1.0' at line 1")


This appears to have something to do with ordering of the posts in the thread view
thread.get_all_posts().order_by('postdate'),
in sphene.sphboard.views showThread.
However, when I work through the database interactions in showThread in the django-admin python shell, everything works fine with no errors at all. Very strange indeed.

the mysql error came also up in another thread .. i just didn't commit it yet since i wasn't sure if it worked.

if you're using SCT trunk, try an update.. it should work now..

(you can also set SPH_SETTINGS['board_post_paging'] = 10 in your settings.py .. (this is now default) ... the problem was, that previously it was: 10.
and so it was treated as a float ... (weird that i never had this error with postgresql))
Hey, we have Signatures !!! Great, isn't it ? ;)
Many thanks Herbert. Works fine now.

Can I just say once again that sphene is brilliant!

I'll work on the 'add category' form for group admins over the weekend and send you a copy as soon as it's working.

All the best

Martin
Martin Johnson said @ 2007-10-26 14:54:31:
I'll work on the 'add category' form for group admins over the weekend and send you a copy as soon as it's working.
great, let me know when you encounter any problems/questions ;)
Hey, we have Signatures !!! Great, isn't it ? ;)
Martin Johnson said @ 2007-10-26 14:54:31:
I'll work on the 'add category' form for group admins over the weekend and send you a copy as soon as it's working.
Weekend turned into months... ah well, such is life! For many reasons my web development work had to take a back seat. I'm just about to get stuck in again. Would the 'add category' facility still be useful, or have things moved on from there? Hope you haven't been waiting on me.

Best regards

Martin
Martin Johnson said @ 2008-02-04 21:48:28:
Martin Johnson said @ 2007-10-26 14:54:31:
I'll work on the 'add category' form for group admins over the weekend and send you a copy as soon as it's working.
Weekend turned into months... ah well, such is life!
hehe, happens to me too quite often ;) .. anyhow .. nothing has been done in that direction yet .. (although i have been searching for someone to do such an admin interface through sourceforge a while ago .. without any luck :( ) .. so it would still be very useful

actually .. more useful because i added a bit more complexity to the forum's 'Category' model than the django admin could possible handle (beside the obvious permission limitation) :) - every Category can now have a different "category type" .. this is a simple extension mechanism to allow customizations on how the forum works (adding fields to the post/reply form, modifying thread and post lists, etc.) - i use this for example for the "Who's using SCT" forum category: http://sct.sphene.net/board/show/20/ or my personal blog i'm currently working on.

but.. you probably don't need to care :) if you would be able to create and contribute a "simple" admin interface to add (modify?) categories for privileged users .. this would be great already .. i could later add this magic stuff for category types & co

so .. you are still planning on using SCT for your site ? :)
Hey, we have Signatures !!! Great, isn't it ? ;)
Hi Herbert. I need to have a bit of a think about exactly what I want to do. But I will definitely be using the forum and so will definitely have to have a category add / edit option for group admins. Will get cracking in the next week hopefully and will keep you posted so what I do is useful for you in the future.

First I must remember what I already did...

Page: Previous 1 2 3

Please login to post a reply.



Powered by Sphene Community Tools