示例#1
0
    'sanction': 'sanction==0.3.1',
    'simplejson': 'simplejson<=3.8.2',
    'six': 'six==1.10.0',
    'threaded_multihost': 'django-threaded-multihost<=1.4-1',
    'tinymce': 'django-tinymce==1.5.3',
    'unidecode': 'unidecode<=0.4.19',
    #'stopforumspam': 'stopforumspam'
}

#necessary for interoperability of django and coffin
try:
    from askbot import patches
    from askbot.deployment.assertions import assert_package_compatibility
    assert_package_compatibility()
    patches.patch_django()
    patches.patch_coffin()  # must go after django
except ImportError:
    pass


def get_install_directory():
    """returns path to directory
    where code of the askbot django application
    is installed
    """
    return os.path.dirname(__file__)


def get_path_to(relative_path):
    """returns absolute path to a file
    relative to ``askbot`` directory
示例#2
0
basic actions on behalf of the forum application
"""
import os
import smtplib
import sys
import logging

VERSION = (0, 7, 22)

#necessary for interoperability of django and coffin
try:
    from askbot import patches
    from askbot.deployment.assertions import assert_package_compatibility
    assert_package_compatibility()
    patches.patch_django()
    patches.patch_coffin()#must go after django
except ImportError:
    pass

def get_install_directory():
    """returns path to directory
    where code of the askbot django application 
    is installed
    """
    return os.path.dirname(__file__)

def get_path_to(relative_path):
    """returns absolute path to a file
    relative to ``askbot`` directory
    ``relative_path`` must use only forward slashes
    and must not start with a slash