If Kotti meets my needs then I may well help with a conversion to Python 3 later on, as I prefer to use that.
Thanks ...
Richard
Hi Richard,
On 20 Jun 2017, at 10:44, Richard Prosser wrote:
- How readily could a chat facility be implemented? I expect that I
would be able to modify something like Flask-SocketIO-Chat
<https://github.com/miguelgrinberg/Flask-SocketIO-Chat> to suit but I am
not yet familiar with the Kotti infrastructure.
I've not used it, but assuming the docs are correct https://gevent-socketio.readthedocs.io/en/latest/ should be easy to integrate into any Python WSGI App.
- Which server would be required in that case? Gevent/Eventlet?
The above would require gevent.
- I presume that it would be possible or even easy to show a list of
documents (pages) but I can't see anything in the documentation about that.
I guess that kotti_blog <https://github.com/Kotti/kotti_blog> would be
useful.
That's indeed very easy with Kotti. You'd basically
construct a SQLAlchemy query that returns the documents you want to show in a view:
from pyramid.view import view_config
from kotti.resources import Document
@view_config(name='myview', renderer='mytemplate.pt', …)
def myview(context, request):
documents = Document.query.filter(<whatever your criteria are>)
return {'documents': documents}
and then iterate over those in mytemplate.pt:
<li tal:repeat="d documents"><a href="request.resource_url(d)">${document.title}</a></li>
- How would I form a URL 'section' like <domain>/games? Is that just a
document?
That'd be an arbitrary Node of any type in your content tree, for example a document.
- Is it easy to integrate Pyramid add-ons?
Kotti is plain Pyramid. Therefore you can use any Pyramid add on as you would in any other Pyramid application.
If Kotti meets my needs then I may well help with a conversion to Python 3
later on, as I prefer to use that.
That'd be great. In fact all the base work is done already (no dependencies without Python 3 compatibility). It just hasn't been done yet, because of missing time.
HTH,
Andreas