25 |
25 |
26 from django import forms |
26 from django import forms |
27 from django import http |
27 from django import http |
28 from django.utils.translation import ugettext |
28 from django.utils.translation import ugettext |
29 |
29 |
|
30 from soc.logic import cleaning |
30 from soc.logic import dicts |
31 from soc.logic import dicts |
31 from soc.logic.models import user as user_logic |
32 from soc.logic.models import user as user_logic |
32 from soc.views.helper import decorators |
33 from soc.views.helper import decorators |
33 from soc.views.helper import lists as list_helper |
34 from soc.views.helper import lists as list_helper |
34 from soc.views.helper import redirects |
35 from soc.views.helper import redirects |
87 new_params['public_template'] = 'soc/group/public.html' |
88 new_params['public_template'] = 'soc/group/public.html' |
88 |
89 |
89 new_params['list_row'] = 'soc/group/list/row.html' |
90 new_params['list_row'] = 'soc/group/list/row.html' |
90 new_params['list_heading'] = 'soc/group/list/heading.html' |
91 new_params['list_heading'] = 'soc/group/list/heading.html' |
91 |
92 |
|
93 new_params['create_extra_dynaproperties'] = { |
|
94 'clean_contact_street': cleaning.clean_ascii_only('contact_street'), |
|
95 'clean_contact_city': cleaning.clean_ascii_only('contact_city'), |
|
96 'clean_contact_state': cleaning.clean_ascii_only('contact_state'), |
|
97 'clean_contact_postalcode': cleaning.clean_ascii_only('contact_postalcode'), |
|
98 'clean_shipping_street': cleaning.clean_ascii_only('shipping_street'), |
|
99 'clean_shipping_city': cleaning.clean_ascii_only('shipping_city'), |
|
100 'clean_shipping_state': cleaning.clean_ascii_only('shipping_state'), |
|
101 'clean_shipping_postalcode': cleaning.clean_ascii_only('shipping_postalcode'), |
|
102 } |
|
103 |
|
104 |
92 new_params['role_views'] = {} |
105 new_params['role_views'] = {} |
93 |
106 |
94 params = dicts.merge(params, new_params, sub_merge=True) |
107 params = dicts.merge(params, new_params, sub_merge=True) |
95 |
108 |
96 super(View, self).__init__(params=params) |
109 super(View, self).__init__(params=params) |