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 » Feature Discussions » Summary feature for board

Hi

I've got another feature request. I'm looking to be able to do a annotation on a thread level. Let me explain. I'm planning to (mis)use the board for Q&A style site. People can ask questions and set of users are allowed to reply to the question (the "experts"). If the "asker" has had sufficient answers he can choose one of the users who replied to create a summary answer that replaces the thread below the question. The thread does not get deleted and is still available from the summary as a reference.

I've been testing board and it basically has everything I need except the summary feature. I'm willing to code this part myself, but I would first like to discuss a bit what would be the best way to do this.

Thanks for your nice work,
Tim
hi,

i think the best way would be to create your own category type of type 'faq' and then create your own model which contains a 'Summary' field and always references to the forum post.. (just like i do in the 'sphlinklist' application - where i store the 'url' in it's own model) - take a look at sphlinklist or sphblog - you can use custom category types to use custom templates for the list of categories as well as the post-display .. i fear that the custom category type-interface is not fully complete yet.. so it's possible that we need to improve a few things so it allows further customization ..

what do you think ? have you looked at the sphlinklist application before ?

cu,
herbert
Hey, we have Signatures !!! Great, isn't it ? ;)
Hi,

I've look at the sphlinklist and sphblog code and that seems to be a nice way to use the features of the rest of the SCT. I've tried getting the blog to work but I'm getting tracebacks and I do not directly see what it wrong. But anyway. Some more documentation on how this works would be great. It seems the right way to do it.

Tim
hmm.. what kind of tracebacks ? maybe you could try the sphlinklist .. it should be easier to get it to work ..

i haven't yet written too much documentation since it's not done yet .. you can look at a few things i have written in the django users mailinglist to get some feedback.

is this a kind of useful to you ? :) .. i think i'll try to right a bit of documentation tonight or tomorrow if i have time..

--- Last Edited by Herbert Poul at 2008-02-21 12:59:35 ---
Hey, we have Signatures !!! Great, isn't it ? ;)
This is the traceback for the blog. I get this when click on the "Submit new Post" button :

AttributeError at /blog/postthread/
'NoneType' object has no attribute 'name'
Request Method: POST
Request URL: http://localhost:8080/blog/postthread/
Exception Type: AttributeError
Exception Value: 'NoneType' object has no attribute 'name'
Exception Location: /home/tim/communitytools/sphenecoll/sphene/sphboard/models.py in get_absolute_post_thread_url, line 373

I've also tried to get the linklist to work. But it I can't get it to appear as a Catergory Type in the admin interface. After looking at the code a bit I think I'm missing a url pattern for it, that causes views.py to not get called which contains the doinit() function to register the caterogy. (That is how I see it). But since the views.py file for sphlinklist only contains the doinit() function and no real views I don't think I can make a URL pattern for it. So should I place the doinit inside a __init__.py or somewhere else in my project ?
function and no real views I don't think I can make a URL pattern for it. So should I place the doinit inside a __init__.py or somewhere else in my project ?
well .. i have moved the doinit from the __init__.py file out into the views.py .. because it caused errors with the last i18n changes.. (recursive imports) .. you could try adding it to the models.py though

(i actually thought views.py is always loaded.. no matter if it is part of any url pattern)
Hey, we have Signatures !!! Great, isn't it ? ;)
well .. i have moved the doinit from the __init__.py file out into the views.py .. because it caused errors with the last i18n changes.. (recursive imports) .. you could try adding it to the models.py though

(i actually thought views.py is always loaded.. no matter if it is part of any url pattern)
That worked :-) I could tell that the views.py is not loaded because there appeared no views.pyc.

Anyway. I'll try using this Category framework to see if I can add my FAQ/summary this way.

Thanks for the support !
Tim
Exception Location: /home/tim/communitytools/sphenecoll/sphene/sphboard/models.py in get_absolute_post_thread_url, line 373
this looks to me like you are not having a valid Group model .. you always need to have at least one bogus Group (community -> Group) which you use.. the simplest way would be to have a urlconf which always uses a dictionary like: defaultdict = { 'groupName': 'example' }

the better way would be to use the SPH_HOST_MIDDLEWARE_URLCONF_MAP setting with the middleware sphene.community.middleware.\MultiHostMiddleware


anyway .. that's just my guess of the problem ...

do you still need more guidance for the category types (i could write a small documentation on how the sphlinklist is done) - or is the code enough for you right now ?
Hey, we have Signatures !!! Great, isn't it ? ;)

Please login to post a reply.



Powered by Sphene Community Tools