app/soc/views/models/program.py
author Sverre Rabbelier <srabbelier@gmail.com>
Mon, 01 Dec 2008 21:38:25 +0000
changeset 643 b57d538a9dd3
child 647 355ac73823a1
permissions -rw-r--r--
Added programs Currently the programs are somewhat of empty, but due to the ease with which we can add new fields later, it is acceptable to commit it in it's current form. Patch by: Sverre Rabbelier
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
643
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/python2.5
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     2
#
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     3
# Copyright 2008 the Melange authors.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     4
#
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     5
# Licensed under the Apache License, Version 2.0 (the "License");
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     6
# you may not use this file except in compliance with the License.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     7
# You may obtain a copy of the License at
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     8
#
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     9
#   http://www.apache.org/licenses/LICENSE-2.0
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    10
#
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    11
# Unless required by applicable law or agreed to in writing, software
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    12
# distributed under the License is distributed on an "AS IS" BASIS,
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    14
# See the License for the specific language governing permissions and
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    15
# limitations under the License.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    16
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    17
"""Views for Programs.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    18
"""
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    19
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    20
__authors__ = [
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    21
    '"Sverre Rabbelier" <sverre@rabbelier.nl>',
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    22
  ]
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    23
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    24
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    25
from google.appengine.api import users
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    26
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    27
from django import forms
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    28
from django.utils.translation import ugettext_lazy
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    29
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    30
from soc.logic import dicts
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    31
from soc.logic import cleaning
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    32
from soc.logic.models import sponsor as sponsor_logic
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    33
from soc.views.helper import redirects
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    34
from soc.views.models import base
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    35
from soc.views.models import sponsor as sponsor_view
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    36
from soc.views import helper
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    37
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    38
import soc.logic.models.program
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    39
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    40
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    41
class View(base.View):
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    42
  """View methods for the Sponsor model.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    43
  """
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    44
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    45
  DEF_CREATE_INSTRUCTION_MSG_FMT = ugettext_lazy(
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    46
      'Please use this form to select a Sponsor for the new Program')
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    47
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    48
  def __init__(self, original_params=None):
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    49
    """Defines the fields and methods required for the base View class
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    50
    to provide the user with list, public, create, edit and delete views.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    51
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    52
    Params:
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    53
      original_params: a dict with params for this View 
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    54
    """    
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    55
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    56
    params = {}
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    57
    params['logic'] = soc.logic.models.program.logic
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    58
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    59
    params['name'] = "Program"
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    60
    params['name_short'] = "Program"
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    61
    params['name_plural'] = "Programs"
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    62
    params['url_name'] = "program"
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    63
    params['module_name'] = "program"
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    64
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    65
    params['extra_dynaexclude'] = ['home']
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    66
    params['create_extra_dynafields'] = {
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    67
        'scope_path': forms.CharField(widget=forms.HiddenInput,
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    68
                                   required=False),
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    69
         'clean_link_id': cleaning.clean_link_id,
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    70
        }
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    71
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    72
    params = dicts.merge(original_params, params)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    73
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    74
    base.View.__init__(self, params=params)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    75
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    76
  def create(self, request, page_name=None, params=None, **kwargs):
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    77
    """Specialized create view to enforce needing a scope_path
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    78
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    79
    This view simply gives control to the base.View.create if the
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    80
    scope_path is specified in kwargs. If it is not present, it
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    81
    instead displays the result of self.selectSponsor. Refer to the
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    82
    respective docstrings on what they do.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    83
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    84
    Args: 
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    85
      see base.View.create
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    86
    """
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    87
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    88
    if 'scope_path' in kwargs:
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    89
      return super(View, self).create(request, page_name=page_name,
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    90
          params=params, **kwargs)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    91
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    92
    params = dicts.merge(params, self._params)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    93
    return self.selectSponsor(request, page_name, params)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    94
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    95
  def selectSponsor(self, request, page_name, params):
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    96
    """Displays a list page allowing the user to select a Sponsor
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    97
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    98
    After having selected the Sponsor, the user is redirected to the
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    99
    'create a new program' page with the scope_path set appropriately.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   100
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   101
    Params usage:
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   102
      The params dictionary is passed to getCreateProgramRedirect from
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   103
        the redirects module, please see the docstring for
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   104
        getCreateProgramRedirect on how it uses it.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   105
      The params dictionary is also passed to getListContent from
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   106
        the helper.list module, please refer to its docstring also.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   107
      The params dictionary is passed to self._list as well, refer
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   108
        to its docstring for details on how it uses it.
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   109
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   110
    Args:
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   111
      request: the standard Django HTTP request object
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   112
      page_name: the page name displayed in templates as page and header title
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   113
      params: a dict with params for this View
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   114
    """
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   115
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   116
    new_params = {}
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   117
    new_params['list_action'] = (redirects.getCreateProgramRedirect, params)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   118
    new_params['instruction_text'] = \
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   119
        self.DEF_CREATE_INSTRUCTION_MSG_FMT % self._params
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   120
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   121
    params = dicts.merge(new_params, params)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   122
    params = dicts.merge(params, sponsor_view.view._params)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   123
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   124
    content = helper.lists.getListContent(request, params, sponsor_logic.logic)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   125
    contents = [content]
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   126
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   127
    return self._list(request, params, contents, page_name)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   128
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   129
  def _editGet(self, request, entity, form):
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   130
    """See base.View._editGet().
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   131
    """
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   132
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   133
    # fill in the email field with the data from the entity
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   134
    form.fields['scope_path'].initial = entity.scope_path
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   135
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   136
  def getDjangoURLPatterns(self, params=None):
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   137
    """See base.View.getDjangoURLPatterns().
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   138
    """
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   139
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   140
    default_patterns = self._params['django_patterns_defaults']
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   141
    default_patterns += [
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   142
        (r'^%(url_name)s/create/(?P<scope_path>%(ulnp)s)$',
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   143
            'soc.views.models.%s.create', 'Create %(name_short)s')]
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   144
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   145
    params = {}
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   146
    params['django_patterns_defaults'] = default_patterns
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   147
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   148
    params = dicts.merge(params, self._params)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   149
    patterns = super(View, self).getDjangoURLPatterns(params)
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   150
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   151
    return patterns
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   152
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   153
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   154
view = View()
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   155
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   156
create = view.create
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   157
delete = view.delete
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   158
edit = view.edit
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   159
list = view.list
b57d538a9dd3 Added programs
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
   160
public = view.public