小编jfd*_*ing的帖子

是否有任何工具可以将markdown转换为其他格式的Wiki文本

要求是我需要将markdown格式的长文档粘贴到没有安装markdown扩展的mediawiki站点.我能找到关于降价,工具或模块/库的所有内容,都负责将markdown转换为HTML.我的问题是:有没有一种方便的方法来完成从markdown到MediaWiki wikitext的工作?

markdown mediawiki

41
推荐指数
2
解决办法
1万
查看次数

声明式样式SQLAlchemy关系的初始问题()

我是SQLAlchemy的新手,甚至是数据库编程,也许我的问题太简单了.现在我有两个类/表:

class User(Base):
    __tablename__ = 'users'
    id = Column(Integer, primary_key=True)
    name = Column(String(40))
    ...

class Computer(Base):
    __tablename__ = 'comps'
    id = Column(Integer, primary_key=True)
    buyer_id = Column(None, ForeignKey('users.id'))
    user_id = Column(None, ForeignKey('users.id'))
    buyer = relation(User, backref=backref('buys', order_by=id))
    user = relation(User, backref=backref('usings', order_by=id))
Run Code Online (Sandbox Code Playgroud)

当然,它无法运行.这是回溯:

  File "/Library/Python/2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/orm/state.py", line 71, in initialize_instance
    fn(self, instance, args, kwargs)
  File "/Library/Python/2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/orm/mapper.py", line 1829, in _event_on_init
    instrumenting_mapper.compile()
  File "/Library/Python/2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/orm/mapper.py", line 687, in compile
    mapper._post_configure_properties()
  File "/Library/Python/2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/orm/mapper.py", line 716, in _post_configure_properties
    prop.init()
  File "/Library/Python/2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/orm/interfaces.py", line 408, in init
    self.do_init() …
Run Code Online (Sandbox Code Playgroud)

python orm sqlalchemy relation

5
推荐指数
1
解决办法
4694
查看次数

标签 统计

markdown ×1

mediawiki ×1

orm ×1

python ×1

relation ×1

sqlalchemy ×1