cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
manage.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 # @COPYRIGHT_begin
4 #
5 # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 # http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19 # @COPYRIGHT_end
20 import os
21 import sys
22 
23 if __name__ == "__main__":
24  if len(sys.argv) < 2:
25  print 'Usage ./manage.py <manager> <args>'
26  sys.exit(1)
27 
28  # cc1dir = os.path.abspath(os.path.dirname(__file__))
29  # sys.path.append(os.path.join(cc1dir, sys.argv[1]))
30 
31  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "%s.settings" % sys.argv[1])
32 
33  from django.core.management import execute_from_command_line
34  args = sys.argv[:]
35  args.pop(1)
36 
37  execute_from_command_line(args)
38