22 '"Lennard de Rijk" <ljvderijk@gmail.com>', |
22 '"Lennard de Rijk" <ljvderijk@gmail.com>', |
23 '"Pawel Solyga" <pawel.solyga@gmail.com>', |
23 '"Pawel Solyga" <pawel.solyga@gmail.com>', |
24 ] |
24 ] |
25 |
25 |
26 |
26 |
27 from google.appengine.api import users |
|
28 |
|
29 from django import forms |
27 from django import forms |
30 from django import http |
28 from django import http |
31 from django.core import urlresolvers |
|
32 from django.utils.translation import ugettext |
29 from django.utils.translation import ugettext |
33 |
30 |
34 from soc.logic import cleaning |
31 from soc.logic import cleaning |
35 from soc.logic import dicts |
32 from soc.logic import dicts |
36 from soc.logic.models import sponsor as sponsor_logic |
|
37 from soc.logic.models import user as user_logic |
33 from soc.logic.models import user as user_logic |
38 from soc.views import helper |
34 from soc.views import helper |
39 from soc.views import out_of_band |
|
40 from soc.views.helper import access |
35 from soc.views.helper import access |
41 from soc.views.helper import decorators |
36 from soc.views.helper import decorators |
42 from soc.views.helper import dynaform |
37 from soc.views.helper import dynaform |
43 from soc.views.helper import redirects |
38 from soc.views.helper import redirects |
44 from soc.views.helper import responses |
39 from soc.views.helper import responses |
78 new_params['rights'] = rights |
73 new_params['rights'] = rights |
79 new_params['logic'] = soc.logic.models.request.logic |
74 new_params['logic'] = soc.logic.models.request.logic |
80 |
75 |
81 new_params['name'] = "Request" |
76 new_params['name'] = "Request" |
82 |
77 |
83 new_params['sidebar_defaults'] = [('/%s/list', 'List %(name_plural)s', 'list')] |
78 new_params['sidebar_defaults'] = [('/%s/list', 'List %(name_plural)s', |
|
79 'list')] |
84 |
80 |
85 new_params['create_template'] = ['soc/request/create.html'] |
81 new_params['create_template'] = ['soc/request/create.html'] |
86 |
82 |
87 new_params['extra_dynaexclude'] = ['status', 'role_verbose'] |
83 new_params['extra_dynaexclude'] = ['status', 'role_verbose'] |
88 |
84 |
96 new_params['edit_extra_dynaproperties'] = { |
92 new_params['edit_extra_dynaproperties'] = { |
97 'scope_path': forms.CharField(widget=forms.HiddenInput, |
93 'scope_path': forms.CharField(widget=forms.HiddenInput, |
98 required=True), |
94 required=True), |
99 } |
95 } |
100 |
96 |
101 patterns = [(r'^%(url_name)s/(?P<access_type>process_invite)/%(key_fields)s$', |
97 patterns = [(r'^%(url_name)s/(?P<access_type>process_invite)/' |
|
98 '%(key_fields)s$', |
102 'soc.views.models.%(module_name)s.process_invite', |
99 'soc.views.models.%(module_name)s.process_invite', |
103 'Process Invite to become')] |
100 'Process Invite to become')] |
104 |
101 |
105 new_params['extra_django_patterns'] = patterns |
102 new_params['extra_django_patterns'] = patterns |
106 |
103 |
107 new_params['invite_processing_template'] = 'soc/request/process_invite.html' |
104 new_params['invite_processing_template'] = 'soc/request/process_invite.html' |
108 new_params['request_processing_template'] = 'soc/request/process_request.html' |
105 new_params['request_processing_template'] = \ |
|
106 'soc/request/process_request.html' |
109 |
107 |
110 params = dicts.merge(params, new_params) |
108 params = dicts.merge(params, new_params) |
111 |
109 |
112 super(View, self).__init__(params=params) |
110 super(View, self).__init__(params=params) |
113 |
111 |