First time here? Check out the FAQ!

Revision history  [back]

Is there an option to add prefix to database tablename?

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:

TABLEPREFIX = "meta"

Class Posts(Modles.model):

    __tablename__ = TABLEPREFIX + "posts"

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