Home | Trees | Indices | Help |
---|
|
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 """ Modul zarzadzania widokami. """ 20 21 from ajango.generator.config_global import ConfigGlobal 2224 """ Klasa zarzadzajaca vidokami. """6338 """ Przygotowanie widokow. """ 39 if self.menu != None: 40 self.menu.execute(app.get_name()) 41 self.code = "%s\n%s" % (self.code, 42 self.menu.get_renderer('renderer').render()) 43 for elem in self.views: 44 print("Save view (%s) in application (%s)" % 45 (elem.get_name(), app.get_name())) 46 elem.make_execute() 47 self.code = "%s \n%s" % (self.code, 48 elem.get_renderer('code').render()) 49 project_m = ConfigGlobal().get('project_manager') 50 project_m.add_url(elem.get_name(), app.get_name()) 51 self.imports = "%s \n%s" % (self.imports, app.imp_renderer.render())53 """ Zapisanie wszystkich widokow do odpowiedniej aplikacji. """ 54 self.prepare_views(app) 55 url = app.get_url() + "/views.py" 56 try: 57 fview = open(url, "a") 58 fview.write("# This code is generated by Ajango framework\n") 59 fview.write("\n%s\n" % self.imports) 60 fview.write("%s\n" % self.code) 61 finally: 62 fview.close()
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Oct 20 21:01:52 2016 | http://epydoc.sourceforge.net |