~philip-peitsch/campopener/couchdb-backend

« back to all changes in this revision

Viewing changes to src/campopener/templates/people/Index.py

  • Committer: Philip Peitsch
  • Date: 2010-11-07 09:08:44 UTC
  • Revision ID: philip.peitsch@gmail.com-20101107090844-4vqn7eu9tpcx7skx
Removed autogen'ed template files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
 
 
3
 
 
4
 
 
5
 
 
6
 
##################################################
7
 
## DEPENDENCIES
8
 
import sys
9
 
import os
10
 
import os.path
11
 
try:
12
 
    import builtins as builtin
13
 
except ImportError:
14
 
    import __builtin__ as builtin
15
 
from os.path import getmtime, exists
16
 
import time
17
 
import types
18
 
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
19
 
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
20
 
from Cheetah.Template import Template
21
 
from Cheetah.DummyTransaction import *
22
 
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
23
 
from Cheetah.CacheRegion import CacheRegion
24
 
import Cheetah.Filters as Filters
25
 
import Cheetah.ErrorCatchers as ErrorCatchers
26
 
from campopener.templates.Site import Site
27
 
 
28
 
##################################################
29
 
## MODULE CONSTANTS
30
 
VFFSL=valueFromFrameOrSearchList
31
 
VFSL=valueFromSearchList
32
 
VFN=valueForName
33
 
currentTime=time.time
34
 
__CHEETAH_version__ = '2.4.3'
35
 
__CHEETAH_versionTuple__ = (2, 4, 3, 'development', 0)
36
 
__CHEETAH_genTime__ = 1289113167.789
37
 
__CHEETAH_genTimestamp__ = 'Sun Nov 07 17:59:27 2010'
38
 
__CHEETAH_src__ = 'campopener\\templates\\people\\Index.tmpl'
39
 
__CHEETAH_srcLastModified__ = 'Sun Nov 07 17:37:41 2010'
40
 
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
41
 
 
42
 
if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
43
 
    raise AssertionError(
44
 
      'This template was compiled with Cheetah version'
45
 
      ' %s. Templates compiled before version %s must be recompiled.'%(
46
 
         __CHEETAH_version__, RequiredCheetahVersion))
47
 
 
48
 
##################################################
49
 
## CLASSES
50
 
 
51
 
class Index(Site):
52
 
 
53
 
    ##################################################
54
 
    ## CHEETAH GENERATED METHODS
55
 
 
56
 
 
57
 
    def __init__(self, *args, **KWs):
58
 
 
59
 
        super(Index, self).__init__(*args, **KWs)
60
 
        if not self._CHEETAH__instanceInitialized:
61
 
            cheetahKWArgs = {}
62
 
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
63
 
            for k,v in KWs.items():
64
 
                if k in allowedKWs: cheetahKWArgs[k] = v
65
 
            self._initCheetahInstance(**cheetahKWArgs)
66
 
        
67
 
 
68
 
    def body(self, **KWS):
69
 
 
70
 
 
71
 
 
72
 
        ## CHEETAH: generated from #def body at line 4, col 1.
73
 
        trans = KWS.get("trans")
74
 
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
75
 
            trans = self.transaction # is None unless self.awake() was called
76
 
        if not trans:
77
 
            trans = DummyTransaction()
78
 
            _dummyTrans = True
79
 
        else: _dummyTrans = False
80
 
        write = trans.response().write
81
 
        SL = self._CHEETAH__searchList
82
 
        _filter = self._CHEETAH__currentFilter
83
 
        
84
 
        ########################################
85
 
        ## START - generated method body
86
 
        
87
 
        write(u'''<div id="content">
88
 
    <h1>Content</h1>
89
 
    blah blah blah
90
 
</div>
91
 
<ul id="nav">
92
 
    <li><a href="''')
93
 
        _v = VFSL([locals()]+SL+[globals(), builtin],"url",False)(controller='people',action='list') # u"$url(controller='people',action='list')" on line 10, col 18
94
 
        if _v is not None: write(_filter(_v, rawExpr=u"$url(controller='people',action='list')")) # from line 10, col 18.
95
 
        write(u'''">List all people</a></li>
96
 
    <li><a href="''')
97
 
        _v = VFSL([locals()]+SL+[globals(), builtin],"url",False)(controller='people',action='edit') # u"$url(controller='people',action='edit')" on line 11, col 18
98
 
        if _v is not None: write(_filter(_v, rawExpr=u"$url(controller='people',action='edit')")) # from line 11, col 18.
99
 
        write(u'''">Add person</a></li>
100
 
</ul>
101
 
<div id="mainPageContent">
102
 
    <div id="peopleActions">
103
 
        <div id="peopleText">
104
 
        <h4>People</h4>
105
 
 
106
 
        <p>Description of things that can be done with "People". Eg. Add/Remove campers, update camper details, roles, etc.</p>\t\t
107
 
 
108
 
        <div id="addCrew">
109
 
            <div class="addBox">
110
 
                <a href="">Add Camper</a>
111
 
            </div>
112
 
            <div class="addBox">
113
 
                <a href="">Add Leader</a>
114
 
            </div>
115
 
        </div>
116
 
    </div>
117
 
</div>
118
 
<div id="actionPane">
119
 
    <h4>People</h4>
120
 
    <ul id="addCrew">
121
 
        <li><a href="''')
122
 
        _v = VFSL([locals()]+SL+[globals(), builtin],"url",False)(controller='people',action='edit') # u"$url(controller='people',action='edit')" on line 33, col 22
123
 
        if _v is not None: write(_filter(_v, rawExpr=u"$url(controller='people',action='edit')")) # from line 33, col 22.
124
 
        write(u'''">Add Camper</a></li>
125
 
        <li><a href="''')
126
 
        _v = VFSL([locals()]+SL+[globals(), builtin],"url",False)(controller='people',action='edit') # u"$url(controller='people',action='edit')" on line 34, col 22
127
 
        if _v is not None: write(_filter(_v, rawExpr=u"$url(controller='people',action='edit')")) # from line 34, col 22.
128
 
        write(u'''">Add Leader</a></li>
129
 
    </ul>
130
 
</div>
131
 
<div id="todo">
132
 
    <h4>To-Do</h4>
133
 
    <p>Highlighted actions that need to be done:</p>
134
 
    <ul>
135
 
        <li>Add Campers & Leaders</li>
136
 
        <li>Fill out roles </li>
137
 
        <li>Sort into gropus</li>
138
 
    </ul>
139
 
</div>
140
 
<div id="side">
141
 
    ''')
142
 
        _v = VFSL([locals()]+SL+[globals(), builtin],"search",True) # u'$search' on line 47, col 5
143
 
        if _v is not None: write(_filter(_v, rawExpr=u'$search')) # from line 47, col 5.
144
 
        write(u'''
145
 
    <div id="stats">
146
 
        <h4>Statistics</h4>
147
 
        <ul>
148
 
            <li><a>Campers:</a></li>
149
 
            <li><a>Groups:</a></li>
150
 
            <li><a>Unpaid Campers:</a></li>
151
 
        </ul>
152
 
    </div>
153
 
</div>
154
 
''')
155
 
        
156
 
        ########################################
157
 
        ## END - generated method body
158
 
        
159
 
        return _dummyTrans and trans.response().getvalue() or ""
160
 
        
161
 
 
162
 
    def writeBody(self, **KWS):
163
 
 
164
 
 
165
 
 
166
 
        ## CHEETAH: main method generated for this template
167
 
        trans = KWS.get("trans")
168
 
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
169
 
            trans = self.transaction # is None unless self.awake() was called
170
 
        if not trans:
171
 
            trans = DummyTransaction()
172
 
            _dummyTrans = True
173
 
        else: _dummyTrans = False
174
 
        write = trans.response().write
175
 
        SL = self._CHEETAH__searchList
176
 
        _filter = self._CHEETAH__currentFilter
177
 
        
178
 
        ########################################
179
 
        ## START - generated method body
180
 
        
181
 
        write(u'''
182
 
''')
183
 
        
184
 
        ########################################
185
 
        ## END - generated method body
186
 
        
187
 
        return _dummyTrans and trans.response().getvalue() or ""
188
 
        
189
 
    ##################################################
190
 
    ## CHEETAH GENERATED ATTRIBUTES
191
 
 
192
 
 
193
 
    _CHEETAH__instanceInitialized = False
194
 
 
195
 
    _CHEETAH_version = __CHEETAH_version__
196
 
 
197
 
    _CHEETAH_versionTuple = __CHEETAH_versionTuple__
198
 
 
199
 
    _CHEETAH_genTime = __CHEETAH_genTime__
200
 
 
201
 
    _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__
202
 
 
203
 
    _CHEETAH_src = __CHEETAH_src__
204
 
 
205
 
    _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__
206
 
 
207
 
    _mainCheetahMethod_for_Index= 'writeBody'
208
 
 
209
 
## END CLASS DEFINITION
210
 
 
211
 
if not hasattr(Index, '_initCheetahAttributes'):
212
 
    templateAPIClass = getattr(Index, '_CHEETAH_templateClass', Template)
213
 
    templateAPIClass._addCheetahPlumbingCodeToClass(Index)
214
 
 
215
 
 
216
 
# CHEETAH was developed by Tavis Rudd and Mike Orr
217
 
# with code, advice and input from many other volunteers.
218
 
# For more information visit http://www.CheetahTemplate.org/
219
 
 
220
 
##################################################
221
 
## if run from command line:
222
 
if __name__ == '__main__':
223
 
    from Cheetah.TemplateCmdLineIface import CmdLineIface
224
 
    CmdLineIface(templateObj=Index()).run()
225
 
 
226