Is there an option to add prefix to database tablename?

asked 2017-10-17 00:30:14 -0600

mindme gravatar image

Consider this. There are multiple askbot instances running as apps in a single django project.

How are the database write duplicates handled? By using a different table prefix for each app. Like how Q2A does it.

I don't know if __tablename__ is for Sqlalchemy or Django ORM, but you get the idea For example:


Class Posts(Modles.model):

    __tablename__ = TABLEPREFIX + "posts"

This way multiple sites like support, meta, questions etc can be achieved through a single project.

edit retag flag offensive close merge delete