Package ajango :: Package contrib :: Package automatic :: Package management :: Package commands :: Module ajangogui
[hide private]
[frames] | no frames]

Source Code for Module ajango.contrib.automatic.management.commands.ajangogui

 1  ########################################################################### 
 2  #                                                                         # 
 3  #  Copyright (C) 2016  Rafal Kobel <rafyco1@gmail.com>                    # 
 4  #                                                                         # 
 5  #  This program is free software: you can redistribute it and/or modify   # 
 6  #  it under the terms of the GNU General Public License as published by   # 
 7  #  the Free Software Foundation, either version 3 of the License, or      # 
 8  #  (at your option) any later version.                                    # 
 9  #                                                                         # 
10  #  This program is distributed in the hope that it will be useful,        # 
11  #  but WITHOUT ANY WARRANTY; without even the implied warranty of         # 
12  #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the           # 
13  #  GNU General Public License for more details.                           # 
14  #                                                                         # 
15  #  You should have received a copy of the GNU General Public License      # 
16  #  along with this program.  If not, see <http://www.gnu.org/licenses/>.  # 
17  #                                                                         # 
18  ########################################################################### 
19  """ 
20  Polecenie pozwala na edycje pliku szkieletowego w formie graficznej. 
21  Aplikacja wymaga do poprawnego dzialania zainstalowanej biblioteki I{Ajango} 
22  oraz I{PyQt4}. 
23   
24  Skladnia polecenia 
25  ================== 
26   
27  Przykladowe wywolanie polecenia:: 
28   
29      $ python manager.py ajangogui 
30   
31  Generator skorzysta domyslnie z pliku U{skeleton.xml}. Mozna to ustawienie 
32  zmienic wywolujac polecenie z flaga C{-f} po ktorej podana powinna byc nazwa 
33  pliku z szablonem. 
34   
35  Nalezy zwrocic uwage na to iz Ajagno nie jest w stanie wygenerowac aplikacji 
36  w katalogu w ktorym sie znajduje. W przypadku testowania dzialania generatora 
37  zaleca sie wykonanie kopi zapasowej katalogu projektowego oraz podmienianie go 
38  przed kolejnym generowaniem aplikacji. 
39  """ 
40   
41  from django.core.management.base import BaseCommand 
42  from ajango.gui                  import Application 
43   
44 -class Command(BaseCommand):
45 """ 46 Edycja aplikacji w trybie graficznym. 47 48 Polecenie generuje aplikacje na postawie szkieletu. Jest on domyslnie 49 przechowywany w pliku I{skeleton.xml} i moze byc ustawiony flaga C{-f} lub 50 C{--file}. 51 """ 52 help = ("Edit XML sceleton file in graphical mode.")
53 - def add_arguments(self, parser):
54 """ Definiowanie argumentow. """ 55 parser.add_argument( 56 '-f', '--file', 57 action='store', dest='skeleton_file', default='skeleton.xml', 58 help='Path to file with skeleton', 59 )
60 - def handle(self, **options):
61 """ Obsluga polecenia. """ 62 skeleton_file = options['skeleton_file'] 63 Application.main(skeleton_file)
64