#!/usr/bin/env python
from os import path
PROJECT_DIR      =  path.abspath(path.join(path.dirname(__file__), '..'))
THIRD_PARTY_DIR  =  path.join(PROJECT_DIR, 'third_party')
DJANGO_DIR       =  path.join(PROJECT_DIR, 'django')

import sys
sys.path[0:0] = [
                   path.join(PROJECT_DIR,     'django_rewriter'), 
                   path.join(DJANGO_DIR,      'Django-1.3'),
                   path.join(THIRD_PARTY_DIR, 'django-registration'),
                   path.join(THIRD_PARTY_DIR, 'sorl-thumbnail'),
]

import settings
from django.core.management import execute_manager

if __name__ == "__main__":
    execute_manager(settings)
