1#!/usr/bin/env python 2 3# This file is part of GNU Dico. 4# Copyright (C) 2008-2009, 2012-2014 Wojciech Polak 5# 6# GNU Dico is free software; you can redistribute it and/or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 3, or (at your option) 9# any later version. 10# 11# GNU Dico is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# GNU General Public License for more details. 15# 16# You should have received a copy of the GNU General Public License 17# along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. 18 19import os 20import sys 21 22if __name__ == '__main__': 23 SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) 24 sys.path.insert(0, os.path.join(SITE_ROOT, '../')) 25 26 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dicoweb.settings') 27 28 from django.core.management import execute_from_command_line 29 30 execute_from_command_line(sys.argv) 31