author | Todd Larsen <tlarsen@google.com> |
Sat, 15 Nov 2008 03:12:33 +0000 | |
changeset 481 | 94834a1e6c01 |
parent 445 | 31927f21970d |
child 489 | 35fbec27f6cb |
permissions | -rw-r--r-- |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/python2.5 |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
2 |
# |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
3 |
# Copyright 2008 the Melange authors. |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
4 |
# |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
6 |
# you may not use this file except in compliance with the License. |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
7 |
# You may obtain a copy of the License at |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
8 |
# |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
10 |
# |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
11 |
# Unless required by applicable law or agreed to in writing, software |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
14 |
# See the License for the specific language governing permissions and |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
15 |
# limitations under the License. |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
16 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
17 |
"""Views for Host profiles. |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
18 |
""" |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
19 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
20 |
__authors__ = [ |
429
e50e18936f06
Fixed typo in e-mail address
Sverre Rabbelier <srabbelier@gmail.com>
parents:
413
diff
changeset
|
21 |
'"Sverre Rabbelier" <sverre@rabbelier.nl>', |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
22 |
] |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
23 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
24 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
25 |
from django.utils.translation import ugettext_lazy |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
26 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
27 |
from soc.logic import dicts |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
28 |
from soc.views import helper |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
29 |
from soc.views.models import base |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
30 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
31 |
import soc.models.host |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
32 |
import soc.logic.models.host |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
33 |
import soc.views.helper |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
34 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
35 |
|
408
7cd6bdfbf95c
Inherit from BaseForm in all forms instead of from DbModelForm. This change doesn't include changes to templates and usage of as_table everywhere (work in progress).
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
406
diff
changeset
|
36 |
class CreateForm(helper.forms.BaseForm): |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
37 |
"""Django form displayed when creating a Host. |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
38 |
""" |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
39 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
40 |
class Meta: |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
41 |
"""Inner Meta class that defines some behavior for the form. |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
42 |
""" |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
43 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
44 |
#: db.Model subclass for which the form will gather information |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
45 |
model = soc.models.host.Host |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
46 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
47 |
#: list of model fields which will *not* be gathered by the form |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
48 |
exclude = ['inheritance_line'] |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
49 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
50 |
def clean_empty(self, field): |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
51 |
data = self.cleaned_data.get(field) |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
52 |
if not data or data == u'': |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
53 |
return None |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
54 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
55 |
return data |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
56 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
57 |
def clean_home_page(self): |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
58 |
return self.clean_empty('home_page') |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
59 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
60 |
def clean_blog(self): |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
61 |
return self.clean_empty('blog') |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
62 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
63 |
def clean_photo_url(self): |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
64 |
return self.clean_empty('photo_url') |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
65 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
66 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
67 |
class EditForm(CreateForm): |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
68 |
"""Django form displayed when editing a Host. |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
69 |
""" |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
70 |
|
431
96b6ee5efdc3
Added a missing 'pass' statement
Sverre Rabbelier <srabbelier@gmail.com>
parents:
429
diff
changeset
|
71 |
pass |
96b6ee5efdc3
Added a missing 'pass' statement
Sverre Rabbelier <srabbelier@gmail.com>
parents:
429
diff
changeset
|
72 |
|
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
73 |
class View(base.View): |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
74 |
"""View methods for the Host model |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
75 |
""" |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
76 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
77 |
def __init__(self, original_params=None, original_rights=None): |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
78 |
"""Defines the fields and methods required for the base View class |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
79 |
to provide the user with list, public, create, edit and delete views. |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
80 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
81 |
Params: |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
82 |
original_params: a dict with params for this View |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
83 |
original_rights: a dict with right definitions for this View |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
84 |
""" |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
85 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
86 |
self._logic = soc.logic.models.host.logic |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
87 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
88 |
params = {} |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
89 |
rights = {} |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
90 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
91 |
params['name'] = "Host" |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
92 |
params['name_short'] = "Host" |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
93 |
params['name_plural'] = "Hosts" |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
94 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
95 |
params['edit_form'] = EditForm |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
96 |
params['create_form'] = CreateForm |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
97 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
98 |
# TODO(tlarsen) Add support for Django style template lookup |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
99 |
params['edit_template'] = 'soc/models/edit.html' |
409
9d24850db88f
Addressed comments by Pawel and Todd
Sverre Rabbelier <srabbelier@gmail.com>
parents:
408
diff
changeset
|
100 |
params['public_template'] = 'soc/host/public.html' |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
431
diff
changeset
|
101 |
params['list_template'] = 'soc/models/list.html' |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
102 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
103 |
params['lists_template'] = { |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
104 |
'list_main': 'soc/list/list_main.html', |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
105 |
'list_pagination': 'soc/list/list_pagination.html', |
413
ec1b590418df
Rename Host list templates from group_<something> to host_<something> and move then to soc/host/list folder. Update affected files with new paths.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
409
diff
changeset
|
106 |
'list_row': 'soc/host/list/host_row.html', |
ec1b590418df
Rename Host list templates from group_<something> to host_<something> and move then to soc/host/list folder. Update affected files with new paths.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
409
diff
changeset
|
107 |
'list_heading': 'soc/host/list/host_heading.html', |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
108 |
} |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
109 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
110 |
params['delete_redirect'] = '/site/host/list' |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
111 |
params['create_redirect'] = '/site/host/profile' |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
112 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
113 |
params['save_message'] = [ugettext_lazy('Profile saved.')] |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
114 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
115 |
params['edit_params'] = { |
402
021e86368600
Incorperated suggestions by Todd
Sverre Rabbelier <srabbelier@gmail.com>
parents:
400
diff
changeset
|
116 |
self.DEF_SUBMIT_MSG_PARAM_NAME: self.DEF_SUBMIT_MSG_PROFILE_SAVED, |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
117 |
} |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
118 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
119 |
rights['list'] = [helper.access.checkIsDeveloper] |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
120 |
rights['delete'] = [helper.access.checkIsDeveloper] |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
121 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
122 |
params = dicts.merge(original_params, params) |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
123 |
rights = dicts.merge(original_rights, rights) |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
124 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
125 |
base.View.__init__(self, rights=rights, params=params) |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
126 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
127 |
def _editPost(self, request, entity, fields): |
409
9d24850db88f
Addressed comments by Pawel and Todd
Sverre Rabbelier <srabbelier@gmail.com>
parents:
408
diff
changeset
|
128 |
"""See base.View._editPost(). |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
129 |
""" |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
130 |
|
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
131 |
fields['sponsor_ln'] = fields['sponsor'].link_name |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
132 |
fields['user_ln'] = fields['user'].link_name |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
133 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
134 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
135 |
view = View() |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
136 |
|
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
137 |
create = view.create |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
402
diff
changeset
|
138 |
delete = view.delete |
400
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
139 |
edit = view.edit |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
140 |
list = view.list |
8f07048d84ef
Added a generic version of the Document views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
141 |
public = view.public |