Package ajango :: Package site :: Package sites :: Module empty
[hide private]
[frames] | no frames]

Source Code for Module ajango.site.sites.empty

 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  Modul strony wyswietlajacej napisy. 
21   
22  Obiekt obsluguje strone wyswietlajaca dowolne elemeny. 
23   
24  Obiekt Generujacy 
25  ================= 
26   
27  L{ajango.generator.views.empty} 
28  """ 
29   
30  from __future__        import print_function 
31  from ajango.site.sites import SiteBase 
32   
33 -class Site(SiteBase):
34 """ Klasa strony wyswietlajacej napisy. """
35 - def __init__(self, ob):
36 self.echo = [] 37 SiteBase.__init__(self, ob)
38 - def init(self):
39 """ Metoda inicjalizujaca. """ 40 self.type = 'empty' 41 self.echo = []
42 - def add_echo(self, text):
43 """ Dodanie napisu do wyswietlenia. """ 44 self.echo.append(text)
45 - def content(self):
46 """ Buduje dane dla strony. """ 47 elements = [] 48 print(self.echo) 49 for elem in self.echo: 50 elements.append(elem) 51 self.data['echo'] = elements
52