Renamed state to status where appropriate.
authorLennard de Rijk <ljvderijk@gmail.com>
Fri, 30 Jan 2009 17:38:28 +0000
changeset 1085 0afbdd0905ef
parent 1084 9c4221f7b747
child 1086 f48c2e5e17c2
Renamed state to status where appropriate. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/logic/cleaning.py
app/soc/logic/helper/request.py
app/soc/logic/models/club.py
app/soc/logic/models/club_admin.py
app/soc/logic/models/host.py
app/soc/logic/models/request.py
app/soc/logic/models/role.py
app/soc/models/group.py
app/soc/models/group_app.py
app/soc/models/request.py
app/soc/models/role.py
app/soc/templates/soc/club_app/review.html
app/soc/templates/soc/request/list/heading.html
app/soc/templates/soc/request/list/row.html
app/soc/templates/soc/request/process_invite.html
app/soc/templates/soc/request/process_request.html
app/soc/templates/soc/request/public.html
app/soc/views/helper/access.py
app/soc/views/models/club_app.py
app/soc/views/models/group.py
app/soc/views/models/request.py
app/soc/views/models/role.py
--- a/app/soc/logic/cleaning.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/logic/cleaning.py	Fri Jan 30 17:38:28 2009 +0000
@@ -199,7 +199,7 @@
 
       # check if there is already an application with the given link_id
       fields = {'link_id': club_link_id,
-                'state': ['accepted','ignored','needs review','completed']}
+                'status': ['accepted','ignored','needs review','completed']}
       club_app_entity = club_app_logic.logic.getForFields(fields, unique=True)
 
       if club_app_entity:
@@ -207,7 +207,7 @@
             ugettext('This link ID is already in use, please specify another one'))
 
       # check if there is already a club with the given link_id
-      fields['state'] = ['new', 'active', 'inactive']
+      fields['status'] = ['new', 'active', 'inactive']
       club_entity = club_logic.logic.getForFields(fields, unique=True)
 
       if club_entity:
--- a/app/soc/logic/helper/request.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/logic/helper/request.py	Fri Jan 30 17:38:28 2009 +0000
@@ -50,4 +50,4 @@
   # mark the request completed, if there is any
   if request_entity:
     request_logic.updateEntityProperties(request_entity,
-        {'state': 'completed'})
+        {'status': 'completed'})
--- a/app/soc/logic/models/club.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/logic/models/club.py	Fri Jan 30 17:38:28 2009 +0000
@@ -57,7 +57,7 @@
           'scope_path': entity.key().name(),
           'role': 'club_admin',
           'role_verbose' : 'Club Admin',
-          'state': 'group_accepted',
+          'status': 'group_accepted',
           }
 
       for admin in [application.applicant, application.backup_admin]:
@@ -66,7 +66,7 @@
         request_logic.logic.updateOrCreateFromFields(properties, key_fields)
 
       # set the application to completed  
-      fields = {'state' : 'completed'}
+      fields = {'status' : 'completed'}
       club_app_logic.logic.updateEntityProperties(application, fields)
 
     super(Logic, self)._onCreate(entity)
--- a/app/soc/logic/models/club_admin.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/logic/models/club_admin.py	Fri Jan 30 17:38:28 2009 +0000
@@ -43,14 +43,14 @@
                                 scope_logic=scope_logic)
 
   def _onCreate(self, entity):
-    """Marks the Club for this Club Admin as active it's state is new.
+    """Marks the Club for this Club Admin as active it's status is new.
     """
 
     club_entity = entity.scope
 
-    if club_entity.state == 'new':
+    if club_entity.status == 'new':
       # this club is new so mark as active
-      fields = {'state' : 'active'}
+      fields = {'status' : 'active'}
       club_logic.logic.updateEntityProperties(club_entity, fields)
 
     # call super
--- a/app/soc/logic/models/host.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/logic/models/host.py	Fri Jan 30 17:38:28 2009 +0000
@@ -44,14 +44,14 @@
 
 
   def _onCreate(self, entity):
-    """Marks the Sponsor for this Host as active it's state is new.
+    """Marks the Sponsor for this Host as active it's status is new.
     """
 
     sponsor_entity = entity.scope
 
-    if sponsor_entity.state == 'new':
+    if sponsor_entity.status == 'new':
       # this sponsor is new so mark as active
-      fields = {'state' : 'active'}
+      fields = {'status' : 'active'}
       sponsor_logic.logic.updateEntityProperties(sponsor_entity, fields)
 
     # call super
--- a/app/soc/logic/models/request.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/logic/models/request.py	Fri Jan 30 17:38:28 2009 +0000
@@ -63,10 +63,10 @@
     """Sends out a message notifying users about the new invite/request.
     """
 
-    if entity.state == 'group_accepted':
+    if entity.status == 'group_accepted':
       # this is an invite
       notifications.sendInviteNotification(entity)
-    elif entity.state == 'new':
+    elif entity.status == 'new':
       # this is a request
       # TODO(Lennard) Create a new request message
       pass
--- a/app/soc/logic/models/role.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/logic/models/role.py	Fri Jan 30 17:38:28 2009 +0000
@@ -64,11 +64,11 @@
     return group
 
   def _updateField(self, entity, name, value):
-    """Special logic for role. If state changes to active we flush the sidebar.
+    """Special logic for role. If status changes to active we flush the sidebar.
     """
 
-    if (name == 'state') and (entity.state != value) and value == 'active':
-      # in case the state of the role changes to active we flush the sidebar
+    if (name == 'status') and (entity.status != value) and value == 'active':
+      # in case the status of the role changes to active we flush the sidebar
       # cache. Other changes will be visible after the retention time expires.
       sidebar.flush(entity.user.account)
 
@@ -78,7 +78,7 @@
     """Flush the sidebar cache when a new active role entity has been created.
     """
 
-    if entity.state == 'active':
+    if entity.status == 'active':
       sidebar.flush(entity.user.account)
 
 
--- a/app/soc/models/group.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/models/group.py	Fri Jan 30 17:38:28 2009 +0000
@@ -166,11 +166,11 @@
       verbose_name=ugettext('Shipping Country/Territory'),
       choices=countries.COUNTRIES_AND_TERRITORIES)
 
-  #: Required property showing the current state of the group
+  #: Required property showing the current status of the group
   #: new: the group has not been active yet
   #: active: the group is active
   #: inactive: used to mark a group as read-only
   #: invalid: the group has been marked as removed
-  state = db.StringProperty(required=True, default='new',
+  status = db.StringProperty(required=True, default='new',
       choices=['new', 'active', 'inactive', 'invalid'])
 
--- a/app/soc/models/group_app.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/models/group_app.py	Fri Jan 30 17:38:28 2009 +0000
@@ -98,9 +98,9 @@
   member_criteria.help_text = ugettext(
     'Members include mentors, admininstrators, and the like.')
 
-  # property containing the state of the application
+  # property containing the status of the application
   # completed means that the application has been processed into a real group
-  state = db.StringProperty(required=True, 
+  status = db.StringProperty(required=True, 
       choices=['accepted','rejected','ignored','needs review','completed'],
       default='needs review',
       verbose_name=ugettext('Application Status'))
--- a/app/soc/models/request.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/models/request.py	Fri Jan 30 17:38:28 2009 +0000
@@ -42,7 +42,7 @@
   role_verbose.help_text = ugettext(
       'This should be the verbose name of the role that is in this request')
 
-  # property that determines the state of the request
+  # property that determines the status of the request
   # new : new Request
   # group_accepted : The group has accepted this request
   # completed : This request has been handled either following a creation of
@@ -50,8 +50,8 @@
   # rejected : This request has been rejected by either the user or the group
   # ignored : The request has been ignored by the group and will not give
   #           the user access to create the role
-  state = db.StringProperty(required=True, default='new',
+  status = db.StringProperty(required=True, default='new',
       choices=['new', 'group_accepted', 'completed', 'rejected','ignored'])
-  state.help_text = ugettext('Shows the state of the request')
+  status.help_text = ugettext('Shows the status of the request')
 
 
--- a/app/soc/models/role.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/models/role.py	Fri Jan 30 17:38:28 2009 +0000
@@ -291,18 +291,18 @@
   agreed_to_tos_on.help_text = ugettext(
       'Indicates when the user agreed to this role Terms of Service.')
 
-  #: field storing the state of this role
+  #: field storing the status of this role
   #: Active means that this role can exercise all it's privileges.
   #: Invalid mean that this role cannot exercise it's privileges.
   #: Inactive means that this role cannot exercise it's data-editing
   #: privileges but should be able to see the data. For instance when a program
   #: has been marked inactive an Organization Admin should still be able to see
   #: the student applications.
-  state = db.StringProperty(default='active',
+  status = db.StringProperty(default='active',
       choices=['active','invalid','inactive'],
-      verbose_name=ugettext('State of this Role'))
-  state.help_text = ugettext(
-      'Indicates the state of the role concerning which privileges may be used')
+      verbose_name=ugettext('Status of this Role'))
+  status.help_text = ugettext(
+      'Indicates the status of the role concerning which privileges may be used')
 
 
   def name(self):
--- a/app/soc/templates/soc/club_app/review.html	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/templates/soc/club_app/review.html	Fri Jan 30 17:38:28 2009 +0000
@@ -31,7 +31,7 @@
   {% readonly_field_as_twoline_table_row entity.fields.irc_channel.label entity.irc_channel %}
   {% readonly_field_as_twoline_table_row entity.fields.backup_admin.label entity.backup_admin.link_id %}
   {% readonly_field_as_twoline_table_row entity.fields.member_criteria.label entity.member_criteria %}
-  {% readonly_field_as_table_row entity.fields.state.label entity.state %}
+  {% readonly_field_as_table_row entity.fields.status.label entity.status %}
   {% readonly_field_as_table_row "Created on" entity.created_on %}
   {% readonly_field_as_table_row "Last Modified on" entity.last_modified_on %}
  </table>
@@ -39,9 +39,9 @@
 
 <tr>
   <td>
-    <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.link_id }}?state=accepted'" value="Accept"/>
-    <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.link_id }}?state=rejected'" value="Reject"/>
-    <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.link_id }}?state=ignored'" value="Ignore"/>
+    <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.link_id }}?status=accepted'" value="Accept"/>
+    <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.link_id }}?status=rejected'" value="Reject"/>
+    <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/review/{{ entity.link_id }}?status=ignored'" value="Ignore"/>
     <input type="button" onclick="location.href='/{{ entity_type_url|lower }}/delete/{{ entity.link_id }}'" value="Delete"/>
   </td>
 </tr>
--- a/app/soc/templates/soc/request/list/heading.html	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/templates/soc/request/list/heading.html	Fri Jan 30 17:38:28 2009 +0000
@@ -2,5 +2,5 @@
   <th class="first" align="right">User</th>
   <th>Role</th>
   <th>For</th>
-  <th>State</th>
+  <th>status</th>
 </tr>
--- a/app/soc/templates/soc/request/list/row.html	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/templates/soc/request/list/row.html	Fri Jan 30 17:38:28 2009 +0000
@@ -6,5 +6,5 @@
   </td>
   <td><div class="role">{{ list.item.role_verbose }}</div></td>
   <td><div class="for">{{ list.item.scope_path }}</div></td>
-  <td><div class="state">{{ list.item.state }}</div></td>
+  <td><div class="status">{{ list.item.status }}</div></td>
 </tr>
--- a/app/soc/templates/soc/request/process_invite.html	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/templates/soc/request/process_invite.html	Fri Jan 30 17:38:28 2009 +0000
@@ -29,7 +29,7 @@
 <tr>
   <td>
     <input type="button" onclick="location.href='{{ invite_accepted_redirect }}'" value="Accept"/>
-    <input type="button" onclick="location.href='/{{ module_name }}/process_invite/{{ entity.scope_path }}/{{ entity.role }}/{{ entity.link_id }}?state=rejected'" value="Reject"/>
+    <input type="button" onclick="location.href='/{{ module_name }}/process_invite/{{ entity.scope_path }}/{{ entity.role }}/{{ entity.link_id }}?status=rejected'" value="Reject"/>
   </td>
 </tr>
 </table>
--- a/app/soc/templates/soc/request/process_request.html	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/templates/soc/request/process_request.html	Fri Jan 30 17:38:28 2009 +0000
@@ -28,9 +28,9 @@
 
 <tr>
   <td>
-    <input type="button" onclick="location.href='/{{ module_name }}/process_request/{{ entity.scope_path }}/{{ entity.link_id }}?state=group_accepted'" value="Accept"/>
-    <input type="button" onclick="location.href='/{{ module_name }}/process_request/{{ entity.scope_path }}/{{ entity.link_id }}?state=rejected'" value="Reject"/>
-    <input type="button" onclick="location.href='/{{ module_name }}/process_request/{{ entity.scope_path }}/{{ entity.link_id }}?state=ignored'" value="Ignore"/>
+    <input type="button" onclick="location.href='/{{ module_name }}/process_request/{{ entity.scope_path }}/{{ entity.link_id }}?status=group_accepted'" value="Accept"/>
+    <input type="button" onclick="location.href='/{{ module_name }}/process_request/{{ entity.scope_path }}/{{ entity.link_id }}?status=rejected'" value="Reject"/>
+    <input type="button" onclick="location.href='/{{ module_name }}/process_request/{{ entity.scope_path }}/{{ entity.link_id }}?status=ignored'" value="Ignore"/>
   </td>
 </tr>
 </table>
--- a/app/soc/templates/soc/request/public.html	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/templates/soc/request/public.html	Fri Jan 30 17:38:28 2009 +0000
@@ -24,7 +24,7 @@
   {% readonly_field_as_table_row entity.fields.role.label entity.role %}
   {% readonly_field_as_table_row entity.fields.link_id.label entity.link_id %}
   {% readonly_field_as_table_row entity.fields.scope_path.label entity.scope_path %}
-  {% readonly_field_as_table_row entity.fields.state.label entity.state %}
+  {% readonly_field_as_table_row entity.fields.status.label entity.status %}
   <!-- TODO(pawel.solyga) make this generic -->
  </table>
 </p>
--- a/app/soc/views/helper/access.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/views/helper/access.py	Fri Jan 30 17:38:28 2009 +0000
@@ -424,7 +424,7 @@
   @allowDeveloper
   @denySidebar
   def checkIsGroupActive(self, django_args, group_logic):
-    """Raises an alternate HTTP response if Group state is not active.
+    """Raises an alternate HTTP response if Group status is not active.
 
     Args:
       django_args: a dictionary with django's arguments
@@ -432,7 +432,7 @@
     Raises:
       AccessViolationResponse:
       * if no Group is found
-      * if the Group state is not active
+      * if the Group status is not active
     """
 
     fields = {'link_id': django_args['link_id']}
@@ -442,7 +442,7 @@
 
     group_entity = group_logic.logic.getFromFieldsOr404(**fields)
 
-    if group_entity.state == 'active':
+    if group_entity.status == 'active':
       return
 
     # TODO tell the user that this group is not active
@@ -451,9 +451,9 @@
 
   def checkCanMakeRequestToGroup(self, django_args, group_logic):
     """Raises an alternate HTTP response if the specified group is not in an
-    active state.
+    active status.
 
-    Note that state hasn't been implemented yet
+    Note that status hasn't been implemented yet
 
     Args:
       group_logic: Logic module for the type of group which the request is for
@@ -465,7 +465,7 @@
     if not group_entity:
       raise out_of_band.Error(DEF_GROUP_NOT_FOUND_MSG, status=404)
 
-    if group_entity.state != 'active':
+    if group_entity.status != 'active':
       # TODO tell the user that this group is not active
       self.deny(django_args)
 
@@ -473,8 +473,8 @@
 
   def checkCanCreateFromRequest(self, django_args, role_name):
     """Raises an alternate HTTP response if the specified request does not exist
-       or if it's state is not group_accepted. Also when the group this request
-       is from is in an inactive or invalid state access will be denied.
+       or if it's status is not group_accepted. Also when the group this request
+       is from is in an inactive or invalid status access will be denied.
     """
 
     self.checkIsUser(django_args)
@@ -490,11 +490,11 @@
 
     request_entity = request_logic.getFromFieldsOr404(**fields)
 
-    if request_entity.state != 'group_accepted':
+    if request_entity.status != 'group_accepted':
       # TODO tell the user that this request has not been accepted yet
       self.deny(django_args)
 
-    if request_entity.scope.state in ['invalid', 'inactive']:
+    if request_entity.scope.status in ['invalid', 'inactive']:
       # TODO tell the user that it is not possible to create this role anymore
       self.deny(django_args)
 
@@ -502,7 +502,7 @@
 
   def checkCanProcessRequest(self, django_args, role_name):
     """Raises an alternate HTTP response if the specified request does not exist
-       or if it's state is completed or denied. Also Raises an alternate HTTP response
+       or if it's status is completed or denied. Also Raises an alternate HTTP response
        whenever the group in the request is not active.
     """
 
@@ -512,11 +512,11 @@
 
     request_entity = request_logic.getFromFieldsOr404(**fields)
 
-    if request_entity.state in ['completed', 'denied']:
+    if request_entity.status in ['completed', 'denied']:
       # TODO tell the user that this request has been processed
       self.deny(django_args)
 
-    if request_entity.scope.state != 'active':
+    if request_entity.scope.status != 'active':
       # TODO tell the user that this group cannot process requests
       self.deny(django_args)
 
@@ -524,7 +524,7 @@
 
   def checkIsMyGroupAcceptedRequest(self, django_args):
     """Raises an alternate HTTP response if the specified request does not exist
-       or if it's state is not group_accepted.
+       or if it's status is not group_accepted.
     """
 
     self.checkIsUser(django_args)
@@ -545,7 +545,7 @@
       # TODO return 404
       self.deny(django_args)
 
-    if request_entity.state != 'group_accepted':
+    if request_entity.status != 'group_accepted':
       self.deny(django_args)
 
     return
@@ -576,7 +576,7 @@
       scope_path = django_args['link_id']
 
     fields = {'user': self.user,
-              'state': 'active'}
+              'status': 'active'}
 
     if scope_path:
       fields['scope_path'] = scope_path
@@ -633,7 +633,7 @@
 
     fields = {'user': user,
               'scope_path': scope_path,
-              'state': 'active'}
+              'status': 'active'}
 
     host = host_logic.getForFields(fields, unique=True)
 
@@ -673,7 +673,7 @@
 
     fields = {'user': user,
               'scope_path': scope_path,
-              'state': 'active'}
+              'status': 'active'}
 
     club_admin_entity = club_admin_logic.getForFields(fields, unique=True)
 
@@ -708,7 +708,7 @@
 
     properties = {
         'applicant': user,
-        'state': 'accepted'
+        'status': 'accepted'
         }
 
     application = app_logic.logic.getForFields(properties, unique=True)
@@ -805,7 +805,7 @@
 
     role_entity = role_logic.logic.getFromFieldsOr404(**fields)
 
-    if role_entity.state != 'active':
+    if role_entity.status != 'active':
       # role is not active
       self.deny(django_args)
 
@@ -843,13 +843,13 @@
 
     role_entity = role_logic.logic.getFromFieldsOr404(**fields)
 
-    if role_entity.state != 'active':
+    if role_entity.status != 'active':
       # cannot manage this entity
       self.deny(django_args)
 
     fields = {'link_id': self.user.link_id,
         'scope_path': django_args['scope_path'],
-        'state' : 'active'
+        'status' : 'active'
         }
 
     manage_entity = manage_role_logic.logic.getForFields(fields, unique=True)
--- a/app/soc/views/models/club_app.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/views/models/club_app.py	Fri Jan 30 17:38:28 2009 +0000
@@ -74,7 +74,7 @@
     new_params['create_template'] = 'soc/models/twoline_edit.html'
     new_params['edit_template'] = 'soc/models/twoline_edit.html'
 
-    new_params['extra_dynaexclude'] = ['applicant', 'backup_admin', 'state',
+    new_params['extra_dynaexclude'] = ['applicant', 'backup_admin', 'status',
         'created_on', 'last_modified_on']
     new_params['create_extra_dynafields'] = {
         'backup_admin_link_id': forms.CharField(
@@ -129,7 +129,7 @@
     is_developer = accounts.isDeveloper(user=user_entity)
 
     filter = {
-        'state': 'needs review',
+        'status': 'needs review',
         }
 
     if not is_developer:
@@ -153,7 +153,7 @@
     # get all the reviewed applications now
 
     # re-use the old filter, but set to only reviewed and accepted
-    filter['state'] = 'accepted'
+    filter['status'] = 'accepted'
 
     aa_params = params.copy() # accepted applications
 
@@ -173,7 +173,7 @@
     # get all the reviewed applications that were denied
 
     # re use the old filter, but this time only for denied apps
-    filter['state'] = 'rejected'
+    filter['status'] = 'rejected'
 
     da_params = params.copy() # denied applications
 
@@ -191,7 +191,7 @@
 
     if is_developer:
       # re use the old filter, but this time only for ignored apps
-      filter['state'] = 'ignored'
+      filter['status'] = 'ignored'
 
       ia_params = params.copy() # ignored applications
 
@@ -224,8 +224,8 @@
       fields['applicant'] = user_logic.logic.getForCurrentAccount()
 
     # the application has either been created or edited so
-    # the state needs to be set accordingly
-    fields['state'] = 'needs review'
+    # the status needs to be set accordingly
+    fields['status'] = 'needs review'
 
   def _public(self, request, entity, context):
     """See base._public().
@@ -261,16 +261,16 @@
     get_dict = request.GET
 
     # check to see if we can make a decision for this application
-    if 'state' in get_dict.keys():
-      state_value = get_dict['state']
+    if 'status' in get_dict.keys():
+      status_value = get_dict['status']
 
-      if state_value in ['accepted', 'rejected', 'ignored']:
-        # this application has been properly reviewed update the state
-        fields = {'state' : state_value}
+      if status_value in ['accepted', 'rejected', 'ignored']:
+        # this application has been properly reviewed update the status
+        fields = {'status' : status_value}
 
         self._logic.updateEntityProperties(entity, fields)
         
-        if state_value == 'accepted':
+        if status_value == 'accepted':
           # the application has been accepted send out a notification
           notifications.sendNewClubNotification(entity)
 
@@ -288,14 +288,14 @@
   @decorators.check_access
   def reviewOverview(self, request, access_type,
              page_name=None, params=None, **kwargs):
-    """Displays multiple lists of applications that are in different
-    states of the application process.
+    """Displays multiple lists of applications that are in a different
+    status of the application process.
     """
 
     params = dicts.merge(params, self._params)
 
     # only select the requests that haven't been reviewed yet
-    filter = {'state' : 'needs review'}
+    filter = {'status' : 'needs review'}
 
     ur_params = params.copy()
     ur_params['list_description'] = ugettext('A list of all unhandled '
@@ -306,7 +306,7 @@
         request, ur_params, filter, 0)
 
     # only select the requests that haven't been turned into a group yet
-    filter['state'] = 'accepted'
+    filter['status'] = 'accepted'
 
     uh_params = params.copy()
     uh_params['list_description'] = ugettext('A list of all applications '
@@ -317,7 +317,7 @@
         request, uh_params, filter, 1)
 
     # only select the requests the have been rejected
-    filter ['state'] = 'rejected'
+    filter ['status'] = 'rejected'
 
     den_params = params.copy()
     den_params['list_description'] = ugettext('A list of all applications '
@@ -328,7 +328,7 @@
         request, den_params, filter, 2)
 
     # only select the request that have been ignored
-    filter ['state'] = 'ignored'
+    filter ['status'] = 'ignored'
 
     ign_params = params.copy()
     ign_params['list_description'] = ugettext('A list of all applications '
--- a/app/soc/views/models/group.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/views/models/group.py	Fri Jan 30 17:38:28 2009 +0000
@@ -57,7 +57,7 @@
     new_params = {}
 
     new_params['extra_dynaexclude'] = ['founder','home', 'tos',
-                                       'member_template', 'state']
+                                       'member_template', 'status']
     new_params['edit_extra_dynafields'] = {
         'founded_by': forms.CharField(widget=widgets.ReadOnlyInput(),
                                    required=False),
@@ -136,7 +136,7 @@
     filter = {
         'scope': group_entity,
         'role': role_names,
-        'state': 'new'
+        'status': 'new'
         }
 
     # create the list parameters
@@ -154,7 +154,7 @@
     filter = {
         'scope': group_entity,
         'role': role_names,
-        'state': 'group_accepted'
+        'status': 'group_accepted'
         }
 
     # create the list parameters
@@ -172,7 +172,7 @@
     filter = {
         'scope': group_entity,
         'role': role_names,
-        'state': 'ignored'
+        'status': 'ignored'
         }
 
     # create the list parameters
@@ -216,7 +216,7 @@
     # create the filter
     filter = {
         'scope' : group_entity,
-        'state': 'active'
+        'status': 'active'
         }
 
     role_views = params['role_views']
@@ -271,7 +271,7 @@
 
     # set fields to match every active role this user has
     fields = {'user': user,
-              'state': 'active'}
+              'status': 'active'}
 
     # get the role views and start filling group_entities
     role_views = self._params['role_views']
--- a/app/soc/views/models/request.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/views/models/request.py	Fri Jan 30 17:38:28 2009 +0000
@@ -85,7 +85,7 @@
     new_params['create_template'] = ['soc/request/create.html']
     new_params['save_message'] = [ugettext('Request saved.')]
     
-    new_params['extra_dynaexclude'] = ['state', 'role_verbose']
+    new_params['extra_dynaexclude'] = ['status', 'role_verbose']
 
     new_params['create_extra_dynafields'] = {
         'role': forms.CharField(widget=widgets.ReadOnlyInput(),
@@ -150,7 +150,7 @@
     fields = {'link_id': kwargs['link_id'],
         'scope_path': kwargs['scope_path'],
         'role': kwargs['role'],
-        'state': 'group_accepted'}
+        'status': 'group_accepted'}
     request_entity = request_logic.getForFields(fields, unique=True)
 
     # set the page name using the request_entity
@@ -159,11 +159,11 @@
 
     get_dict = request.GET
     
-    if 'state' in get_dict.keys():
-      if get_dict['state'] == 'rejected':
+    if 'status' in get_dict.keys():
+      if get_dict['status'] == 'rejected':
         # this invite has been rejected mark as rejected
         request_logic.updateEntityProperties(request_entity, {
-            'state': 'rejected'})
+            'status': 'rejected'})
 
         # redirect to user role overview
         return http.HttpResponseRedirect('/user/roles')
@@ -201,7 +201,7 @@
 
     # only select the Invites for this user that haven't been handled yet
     filter = {'link_id': user_entity.link_id,
-              'state': 'group_accepted'}
+              'status': 'group_accepted'}
 
     uh_params = params.copy()
     uh_params['list_action'] = (redirects.getInviteProcessRedirect, None)
@@ -216,7 +216,7 @@
     # only select the requests from the user
     # that haven't been accepted by an admin yet
     filter = {'link_id': user_entity.link_id,
-              'state': 'new'}
+              'status': 'new'}
 
     ar_params = params.copy()
     ar_params['list_description'] = ugettext(
--- a/app/soc/views/models/role.py	Fri Jan 30 17:23:19 2009 +0000
+++ b/app/soc/views/models/role.py	Fri Jan 30 17:38:28 2009 +0000
@@ -114,7 +114,7 @@
     new_params['extra_django_patterns'] = patterns
     new_params['scope_redirect'] = redirects.getInviteRedirect
 
-    new_params['extra_dynaexclude'] = ['user', 'state', 'agreed_to_tos_on']
+    new_params['extra_dynaexclude'] = ['user', 'status', 'agreed_to_tos_on']
 
     params = dicts.merge(params, new_params, sub_merge=True)
 
@@ -207,7 +207,7 @@
         'scope_path': request_scope_path,
         'role': params['module_name'],
         'role_verbose': params['name'],
-        'state': 'group_accepted'}
+        'status': 'group_accepted'}
 
     if not self._isValidNewRequest(request_fields, params):
       # not a valid invite
@@ -327,7 +327,7 @@
 
     # make sure that this role becomes active once more in case this user
     # has been reinvited
-    fields ['state'] = 'active'
+    fields ['status'] = 'active'
 
     # get the key_name for the new entity
     key_fields =  self._logic.getKeyFieldsFromDict(fields)
@@ -360,7 +360,7 @@
   def manage(self, request, access_type,
                    page_name=None, params=None, **kwargs):
     """Handles the request concerning the view that let's 
-       you manage a role's state.
+       you manage a role's status.
 
     Args:
       request: the standard Django HTTP request object
@@ -389,8 +389,8 @@
     resign = get_dict.get('resign')
 
     if resign == 'true':
-      # change the state of this role_entity to invalid
-      fields = {'state': 'invalid'}
+      # change the status of this role_entity to invalid
+      fields = {'status': 'invalid'}
       logic.updateEntityProperties(role_entity, fields)
 
       # redirect to the roles listing
@@ -486,14 +486,14 @@
     # get the request scope path
     request_scope_path = self._getRequestScopePathFromGroup(group)
 
-    # defensively set the fields we need for this request and set state to new
+    # defensively set the fields we need for this request and set status to new
     user_entity = user_logic.logic.getForCurrentAccount()
     request_fields = {'link_id' : user_entity.link_id,
         'scope' : group,
         'scope_path' : request_scope_path,
         'role' : params['module_name'],
         'role_verbose' : params['name'],
-        'state' : 'new'}
+        'status' : 'new'}
 
     if self._isValidNewRequest(request_fields, params):
       # not a valid request
@@ -540,14 +540,14 @@
     
     get_dict = request.GET
     
-    if 'state' in get_dict.keys():
-      if get_dict['state'] in ['group_accepted', 'rejected', 'ignored']:
+    if 'status' in get_dict.keys():
+      if get_dict['status'] in ['group_accepted', 'rejected', 'ignored']:
         # update the request_entity and redirect away from this page
-        request_state = get_dict['state']
+        request_status = get_dict['status']
         request_logic.logic.updateEntityProperties(request_entity, {
-            'state': get_dict['state']})
+            'status': get_dict['status']})
 
-        if request_state == 'group_accepted':
+        if request_status == 'group_accepted':
           notifications_helper.sendInviteNotification(request_entity)
 
         group_view = params.get('group_view')
@@ -576,7 +576,7 @@
     params: parameters for the current view
     """
     fields = request_fields.copy()
-    fields['state'] = ['new', 'group_accepted', 'ignored']
+    fields['status'] = ['new', 'group_accepted', 'ignored']
 
     request_entity = request_logic.logic.getForFields(fields, unique=True)
     
@@ -587,7 +587,7 @@
     # check if the role already exists
     fields = {'scope' : request_fields['scope'],
         'link_id': request_fields['link_id'],
-        'state': ['active','inactive'],
+        'status': ['active','inactive'],
         }
 
     role_entity = params['logic'].getForFields(fields, unique=True)