Ask Your Question

How does an instance of Askbot know where its core files are?

asked 2012-12-17 14:25:31 -0600

mrB's avatar

updated 2012-12-17 14:27:26 -0600

I made the mistake of assuming that I would be able to migrate up to the newest version of Askbot. I ran into issues. I cloned the Git repository into /Users/Bryan/work/delete_askbot and checked out the the Revision that was working and trying to use the fixtures I had created before I migrated so I can test the migration.

My askbot instance keeps trying to use the original path:

The original instance was at:

The instance I'm trying to work revert back to the earlier with is:

Here's the Python Path for the temporary instance of Askbot:

In [8]: sys.path

Where is '/Users/Bryan/work/askbot-discussion' added to the Python path?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-17 16:21:30 -0600

Evgeny's avatar

You can figure this out by

import askbot
import os.path
ASKBOT_DIR = os.path.dirname(askbot.__file__)

If you want to find where the settings file is, then use the same trick in the file and store that file name in an additional setting.

edit flag offensive delete link more


I know the path for the askbot module that is being imported. I'm trying to figure out how to import an askbot module with a different path. The current import of askbot is /Users/Bryan/work/askbot-discussion/askbot I want to import the askbot module at /Users/Bryan/work/delete_askbot/askbot

mrB's avatar mrB  ( 2012-12-18 10:24:06 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-12-17 14:25:31 -0600

Seen: 195 times

Last updated: Dec 17 '12