| 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 generujacy kontener stron.
20
21 Obiekt pozwala na wyswietlenie kilku widokow jednoczenie na jednej stronie.
22
23 Obiekt Generujacy
24 =================
25
26 L{ajango.generator.views.container}
27 """
28
29
30 from ajango.site.sites import SiteBase
31 from ajango.generator.views import ViewBase
32
34 """ Klasa agregujaca strony. """
43 """
44 Ustawienie layoutu kontenera.
45
46 @param self: Instancja obiektu strony.
47 @param layout: Sposob wyswietlania strony I{horizontal} lub I{vertical}
48 """
49 if layout != 'horizontal' and layout != 'vertical':
50 raise ValueError("there are unknown layout %r" % layout)
51 self.container_layout = layout
53 """ Dodanie widoku do wyswietlenia w kontenerze. """
54 if isinstance(view, ViewBase):
55 raise ValueError("view argument must be ViewBase type.")
56 self.views.append(view)
58 """ Wykonanie zadan obiektu. """
59 self.data['layout'] = self.container_layout
60 views_tab_data = []
61 for view in self.views:
62 views_tab_data.append(view.make_content_and_get_data())
63 self.data['views'] = views_tab_data
64
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Thu Oct 20 21:01:52 2016 | http://epydoc.sourceforge.net |