This piece of Restructuredtext (Cleaning up and the code is preceding and following text).
Cleaning up...
.. code-block::
from sqlobject import StringCol, SQLObject, ForeignKey, sqlhub, connectionForURI
sqlhub.processConnection = connectionForURI('sqlite:/:memory:')
class Person(SQLObject):
name = StringCol()
class Address(SQLObject):
address = StringCol()
person = ForeignKey('Person')
Person.createTable()
Address.createTable()
The code
Is built correctly by rst2html but generates following error when I try to process it with Pelican (pelican content command):
(ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied.
How can I solve this? I tried various indentations, with and without empty line between codeblock and actual code…
To answer this question I can paraphrase the comment of mzjn. Adding Python to the line ..code-block solved the problem.