wagtailstreamforms 0.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wagtailstreamforms/__init__.py +1 -0
- wagtailstreamforms/blocks.py +93 -0
- wagtailstreamforms/conf.py +35 -0
- wagtailstreamforms/fields.py +218 -0
- wagtailstreamforms/forms.py +61 -0
- wagtailstreamforms/hooks.py +62 -0
- wagtailstreamforms/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtailstreamforms/locale/es/LC_MESSAGES/django.po +328 -0
- wagtailstreamforms/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtailstreamforms/locale/nl/LC_MESSAGES/django.po +464 -0
- wagtailstreamforms/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtailstreamforms/locale/tr/LC_MESSAGES/django.po +317 -0
- wagtailstreamforms/management/__init__.py +0 -0
- wagtailstreamforms/management/commands/__init__.py +0 -0
- wagtailstreamforms/management/commands/prunesubmissions.py +29 -0
- wagtailstreamforms/migrations/0001_initial.py +555 -0
- wagtailstreamforms/migrations/0002_form_site.py +21 -0
- wagtailstreamforms/migrations/0003_alter_form_fields.py +20 -0
- wagtailstreamforms/migrations/__init__.py +0 -0
- wagtailstreamforms/models/__init__.py +39 -0
- wagtailstreamforms/models/abstract.py +15 -0
- wagtailstreamforms/models/file.py +35 -0
- wagtailstreamforms/models/form.py +188 -0
- wagtailstreamforms/models/submission.py +27 -0
- wagtailstreamforms/serializers.py +11 -0
- wagtailstreamforms/streamfield.py +48 -0
- wagtailstreamforms/templates/streamforms/advanced_settings.html +25 -0
- wagtailstreamforms/templates/streamforms/confirm_copy.html +26 -0
- wagtailstreamforms/templates/streamforms/confirm_delete.html +23 -0
- wagtailstreamforms/templates/streamforms/form_block.html +10 -0
- wagtailstreamforms/templates/streamforms/index_submissions.html +104 -0
- wagtailstreamforms/templates/streamforms/list_submissions.html +56 -0
- wagtailstreamforms/templates/streamforms/non_existent_form.html +2 -0
- wagtailstreamforms/templates/streamforms/partials/form_field.html +6 -0
- wagtailstreamforms/templates/streamforms/partials/pagination_nav.html +17 -0
- wagtailstreamforms/templates/streamforms/wagtailadmin/shared/datetimepicker_translations.html +39 -0
- wagtailstreamforms/templatetags/__init__.py +0 -0
- wagtailstreamforms/templatetags/streamforms_tags.py +43 -0
- wagtailstreamforms/urls.py +31 -0
- wagtailstreamforms/utils/__init__.py +0 -0
- wagtailstreamforms/utils/apps.py +25 -0
- wagtailstreamforms/utils/general.py +6 -0
- wagtailstreamforms/utils/loading.py +30 -0
- wagtailstreamforms/utils/requests.py +13 -0
- wagtailstreamforms/utils/version.py +0 -0
- wagtailstreamforms/views/__init__.py +4 -0
- wagtailstreamforms/views/advanced_settings.py +51 -0
- wagtailstreamforms/views/copy.py +83 -0
- wagtailstreamforms/views/submission_delete.py +73 -0
- wagtailstreamforms/views/submission_list.py +112 -0
- wagtailstreamforms/wagtail_hooks.py +255 -0
- wagtailstreamforms/wagtailstreamforms_fields.py +274 -0
- wagtailstreamforms/wagtailstreamforms_hooks.py +31 -0
- wagtailstreamforms-0.0.0.dist-info/METADATA +24 -0
- wagtailstreamforms-0.0.0.dist-info/RECORD +58 -0
- wagtailstreamforms-0.0.0.dist-info/WHEEL +5 -0
- wagtailstreamforms-0.0.0.dist-info/licenses/LICENSE +19 -0
- wagtailstreamforms-0.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
# SOME DESCRIPTIVE TITLE.
|
|
2
|
+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
|
3
|
+
# This file is distributed under the same license as the PACKAGE package.
|
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
5
|
+
#
|
|
6
|
+
#, fuzzy
|
|
7
|
+
msgid ""
|
|
8
|
+
msgstr ""
|
|
9
|
+
"Project-Id-Version: PACKAGE VERSION\n"
|
|
10
|
+
"Report-Msgid-Bugs-To: \n"
|
|
11
|
+
"POT-Creation-Date: 2018-05-30 22:42+0000\n"
|
|
12
|
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
13
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
14
|
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
15
|
+
"Language: \n"
|
|
16
|
+
"MIME-Version: 1.0\n"
|
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
20
|
+
|
|
21
|
+
#: conf.py:7
|
|
22
|
+
msgid "Streamforms"
|
|
23
|
+
msgstr ""
|
|
24
|
+
|
|
25
|
+
#: forms.py:70
|
|
26
|
+
msgid "Date from"
|
|
27
|
+
msgstr ""
|
|
28
|
+
|
|
29
|
+
#: forms.py:74
|
|
30
|
+
msgid "Date to"
|
|
31
|
+
msgstr ""
|
|
32
|
+
|
|
33
|
+
#: models/file.py:11
|
|
34
|
+
msgid "Submission"
|
|
35
|
+
msgstr ""
|
|
36
|
+
|
|
37
|
+
#: models/file.py:16
|
|
38
|
+
msgid "Field"
|
|
39
|
+
msgstr ""
|
|
40
|
+
|
|
41
|
+
#: models/file.py:20
|
|
42
|
+
msgid "File"
|
|
43
|
+
msgstr ""
|
|
44
|
+
|
|
45
|
+
#: models/file.py:29
|
|
46
|
+
msgid "Form submission file"
|
|
47
|
+
msgstr ""
|
|
48
|
+
|
|
49
|
+
#: models/form.py:29
|
|
50
|
+
msgid "Title"
|
|
51
|
+
msgstr ""
|
|
52
|
+
|
|
53
|
+
#: models/form.py:33
|
|
54
|
+
msgid "Slug"
|
|
55
|
+
msgstr ""
|
|
56
|
+
|
|
57
|
+
#: models/form.py:37
|
|
58
|
+
msgid "Used to identify the form in template tags"
|
|
59
|
+
msgstr ""
|
|
60
|
+
|
|
61
|
+
#: models/form.py:40
|
|
62
|
+
msgid "Template"
|
|
63
|
+
msgstr ""
|
|
64
|
+
|
|
65
|
+
#: models/form.py:46 models/form.py:98
|
|
66
|
+
msgid "Fields"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#: models/form.py:49
|
|
70
|
+
msgid "Submit button text"
|
|
71
|
+
msgstr ""
|
|
72
|
+
|
|
73
|
+
#: models/form.py:54
|
|
74
|
+
msgid "Success message"
|
|
75
|
+
msgstr ""
|
|
76
|
+
|
|
77
|
+
#: models/form.py:57
|
|
78
|
+
msgid ""
|
|
79
|
+
"An optional success message to show when the form has been successfully "
|
|
80
|
+
"submitted"
|
|
81
|
+
msgstr ""
|
|
82
|
+
|
|
83
|
+
#: models/form.py:60
|
|
84
|
+
msgid "Error message"
|
|
85
|
+
msgstr ""
|
|
86
|
+
|
|
87
|
+
#: models/form.py:63
|
|
88
|
+
msgid "An optional error message to show when the form has validation errors"
|
|
89
|
+
msgstr ""
|
|
90
|
+
|
|
91
|
+
#: models/form.py:67
|
|
92
|
+
msgid "Post redirect page"
|
|
93
|
+
msgstr ""
|
|
94
|
+
|
|
95
|
+
#: models/form.py:72
|
|
96
|
+
msgid "The page to redirect to after a successful submission"
|
|
97
|
+
msgstr ""
|
|
98
|
+
|
|
99
|
+
#: models/form.py:75
|
|
100
|
+
msgid "Submission hooks"
|
|
101
|
+
msgstr ""
|
|
102
|
+
|
|
103
|
+
#: models/form.py:87
|
|
104
|
+
msgid "Messages"
|
|
105
|
+
msgstr ""
|
|
106
|
+
|
|
107
|
+
#: models/form.py:97
|
|
108
|
+
msgid "General"
|
|
109
|
+
msgstr ""
|
|
110
|
+
|
|
111
|
+
#: models/form.py:106 models/submission.py:15
|
|
112
|
+
msgid "Form"
|
|
113
|
+
msgstr ""
|
|
114
|
+
|
|
115
|
+
#: models/form.py:107
|
|
116
|
+
msgid "Forms"
|
|
117
|
+
msgstr ""
|
|
118
|
+
|
|
119
|
+
#: models/form.py:133
|
|
120
|
+
msgid "Submission date"
|
|
121
|
+
msgstr ""
|
|
122
|
+
|
|
123
|
+
#: models/submission.py:11
|
|
124
|
+
msgid "Form data"
|
|
125
|
+
msgstr ""
|
|
126
|
+
|
|
127
|
+
#: models/submission.py:19
|
|
128
|
+
msgid "Submit time"
|
|
129
|
+
msgstr ""
|
|
130
|
+
|
|
131
|
+
#: models/submission.py:38
|
|
132
|
+
msgid "Form submission"
|
|
133
|
+
msgstr ""
|
|
134
|
+
|
|
135
|
+
#: templates/streamforms/confirm_copy.html:3
|
|
136
|
+
#, python-format
|
|
137
|
+
msgid "Copy of %(form_title)s"
|
|
138
|
+
msgstr ""
|
|
139
|
+
|
|
140
|
+
#: templates/streamforms/confirm_copy.html:7
|
|
141
|
+
#: templates/streamforms/confirm_copy.html:21 wagtail_hooks.py:33
|
|
142
|
+
msgid "Copy"
|
|
143
|
+
msgstr ""
|
|
144
|
+
|
|
145
|
+
#: templates/streamforms/confirm_copy.html:11
|
|
146
|
+
msgid "Are you sure you want to copy this form?"
|
|
147
|
+
msgstr ""
|
|
148
|
+
|
|
149
|
+
#: templates/streamforms/confirm_delete.html:3
|
|
150
|
+
#: templates/streamforms/submissions.html:3
|
|
151
|
+
#, python-format
|
|
152
|
+
msgid "Submissions of %(form_title)s"
|
|
153
|
+
msgstr ""
|
|
154
|
+
|
|
155
|
+
#: templates/streamforms/confirm_delete.html:7
|
|
156
|
+
msgid "Delete form data"
|
|
157
|
+
msgstr ""
|
|
158
|
+
|
|
159
|
+
#: templates/streamforms/confirm_delete.html:12
|
|
160
|
+
msgid ""
|
|
161
|
+
"\n"
|
|
162
|
+
" Are you sure you want to delete this form submission?\n"
|
|
163
|
+
" "
|
|
164
|
+
msgid_plural ""
|
|
165
|
+
"\n"
|
|
166
|
+
" Are you sure you want to delete these form submissions?\n"
|
|
167
|
+
" "
|
|
168
|
+
msgstr[0] ""
|
|
169
|
+
msgstr[1] ""
|
|
170
|
+
|
|
171
|
+
#: templates/streamforms/confirm_delete.html:20
|
|
172
|
+
msgid "Delete"
|
|
173
|
+
msgstr ""
|
|
174
|
+
|
|
175
|
+
#: templates/streamforms/list_submissions.html:11
|
|
176
|
+
msgid "Delete selected submissions"
|
|
177
|
+
msgstr ""
|
|
178
|
+
|
|
179
|
+
#: templates/streamforms/list_submissions.html:41
|
|
180
|
+
msgid "Files"
|
|
181
|
+
msgstr ""
|
|
182
|
+
|
|
183
|
+
#: templates/streamforms/non_existent_form.html:2
|
|
184
|
+
msgid "Sorry, this form has been deleted."
|
|
185
|
+
msgstr ""
|
|
186
|
+
|
|
187
|
+
#: templates/streamforms/partials/pagination_nav.html:4
|
|
188
|
+
#, python-format
|
|
189
|
+
msgid "Page %(page_num)s of %(total_pages)s."
|
|
190
|
+
msgstr ""
|
|
191
|
+
|
|
192
|
+
#: templates/streamforms/partials/pagination_nav.html:8
|
|
193
|
+
msgid "Previous"
|
|
194
|
+
msgstr ""
|
|
195
|
+
|
|
196
|
+
#: templates/streamforms/partials/pagination_nav.html:13
|
|
197
|
+
msgid "Next"
|
|
198
|
+
msgstr ""
|
|
199
|
+
|
|
200
|
+
#: templates/streamforms/submissions.html:11
|
|
201
|
+
#, python-format
|
|
202
|
+
msgid "Form data <span>%(form_title)s</span>"
|
|
203
|
+
msgstr ""
|
|
204
|
+
|
|
205
|
+
#: templates/streamforms/submissions.html:20
|
|
206
|
+
msgid "Filter"
|
|
207
|
+
msgstr ""
|
|
208
|
+
|
|
209
|
+
#: templates/streamforms/submissions.html:26
|
|
210
|
+
msgid "Download CSV"
|
|
211
|
+
msgstr ""
|
|
212
|
+
|
|
213
|
+
#: templates/streamforms/submissions.html:38
|
|
214
|
+
#, python-format
|
|
215
|
+
msgid "There have been no submissions of the '%(title)s' form."
|
|
216
|
+
msgstr ""
|
|
217
|
+
|
|
218
|
+
#: views/copy.py:13
|
|
219
|
+
msgid "New title"
|
|
220
|
+
msgstr ""
|
|
221
|
+
|
|
222
|
+
#: views/copy.py:14
|
|
223
|
+
msgid "New slug"
|
|
224
|
+
msgstr ""
|
|
225
|
+
|
|
226
|
+
#: views/submission_delete.py:52
|
|
227
|
+
#, python-format
|
|
228
|
+
msgid "One submission has been deleted."
|
|
229
|
+
msgid_plural "%(count)d submissions have been deleted."
|
|
230
|
+
msgstr[0] ""
|
|
231
|
+
msgstr[1] ""
|
|
232
|
+
|
|
233
|
+
#: views/submission_list.py:39
|
|
234
|
+
msgid "No Form found matching the query"
|
|
235
|
+
msgstr ""
|
|
236
|
+
|
|
237
|
+
#: wagtail_hooks.py:35
|
|
238
|
+
#, python-format
|
|
239
|
+
msgid "Copy this %s"
|
|
240
|
+
msgstr ""
|
|
241
|
+
|
|
242
|
+
#: wagtail_hooks.py:43
|
|
243
|
+
msgid "Submissions"
|
|
244
|
+
msgstr ""
|
|
245
|
+
|
|
246
|
+
#: wagtail_hooks.py:45
|
|
247
|
+
#, python-format
|
|
248
|
+
msgid "Submissions of this %s"
|
|
249
|
+
msgstr ""
|
|
250
|
+
|
|
251
|
+
#: wagtail_hooks.py:75
|
|
252
|
+
msgid "Latest submission"
|
|
253
|
+
msgstr ""
|
|
254
|
+
|
|
255
|
+
#: wagtail_hooks.py:81
|
|
256
|
+
msgid "Saved submissions"
|
|
257
|
+
msgstr ""
|
|
258
|
+
|
|
259
|
+
#: wagtailstreamforms_fields.py:11
|
|
260
|
+
msgid "Text field (single line)"
|
|
261
|
+
msgstr ""
|
|
262
|
+
|
|
263
|
+
#: wagtailstreamforms_fields.py:17
|
|
264
|
+
msgid "Text field (multi line)"
|
|
265
|
+
msgstr ""
|
|
266
|
+
|
|
267
|
+
#: wagtailstreamforms_fields.py:24
|
|
268
|
+
msgid "Date field"
|
|
269
|
+
msgstr ""
|
|
270
|
+
|
|
271
|
+
#: wagtailstreamforms_fields.py:31
|
|
272
|
+
msgid "Time field"
|
|
273
|
+
msgstr ""
|
|
274
|
+
|
|
275
|
+
#: wagtailstreamforms_fields.py:38
|
|
276
|
+
msgid "Email field"
|
|
277
|
+
msgstr ""
|
|
278
|
+
|
|
279
|
+
#: wagtailstreamforms_fields.py:45
|
|
280
|
+
msgid "URL field"
|
|
281
|
+
msgstr ""
|
|
282
|
+
|
|
283
|
+
#: wagtailstreamforms_fields.py:51
|
|
284
|
+
msgid "Number field"
|
|
285
|
+
msgstr ""
|
|
286
|
+
|
|
287
|
+
#: wagtailstreamforms_fields.py:58
|
|
288
|
+
msgid "Dropdown field"
|
|
289
|
+
msgstr ""
|
|
290
|
+
|
|
291
|
+
#: wagtailstreamforms_fields.py:82
|
|
292
|
+
msgid "Multiselect field"
|
|
293
|
+
msgstr ""
|
|
294
|
+
|
|
295
|
+
#: wagtailstreamforms_fields.py:104
|
|
296
|
+
msgid "Radio buttons"
|
|
297
|
+
msgstr ""
|
|
298
|
+
|
|
299
|
+
#: wagtailstreamforms_fields.py:126
|
|
300
|
+
msgid "Checkboxes"
|
|
301
|
+
msgstr ""
|
|
302
|
+
|
|
303
|
+
#: wagtailstreamforms_fields.py:147
|
|
304
|
+
msgid "Checkbox field"
|
|
305
|
+
msgstr ""
|
|
306
|
+
|
|
307
|
+
#: wagtailstreamforms_fields.py:162
|
|
308
|
+
msgid "Hidden field"
|
|
309
|
+
msgstr ""
|
|
310
|
+
|
|
311
|
+
#: wagtailstreamforms_fields.py:170
|
|
312
|
+
msgid "File field"
|
|
313
|
+
msgstr ""
|
|
314
|
+
|
|
315
|
+
#: wagtailstreamforms_fields.py:185
|
|
316
|
+
msgid "Files field"
|
|
317
|
+
msgstr ""
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from datetime import datetime, timedelta
|
|
2
|
+
|
|
3
|
+
from django.core.management.base import BaseCommand
|
|
4
|
+
|
|
5
|
+
from wagtailstreamforms.models import FormSubmission
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Command(BaseCommand):
|
|
9
|
+
help = "Deletes form submissions older than the provided number of days"
|
|
10
|
+
|
|
11
|
+
def add_arguments(self, parser):
|
|
12
|
+
parser.add_argument("days_to_keep", type=int)
|
|
13
|
+
|
|
14
|
+
def get_queryset(self, date):
|
|
15
|
+
return FormSubmission.objects.filter(submit_time__lt=date)
|
|
16
|
+
|
|
17
|
+
def handle(self, *args, **options):
|
|
18
|
+
keep_from_date = datetime.today().date() - timedelta(days=options["days_to_keep"])
|
|
19
|
+
|
|
20
|
+
queryset = self.get_queryset(keep_from_date)
|
|
21
|
+
|
|
22
|
+
count = queryset.count()
|
|
23
|
+
queryset.delete()
|
|
24
|
+
|
|
25
|
+
msg = "Successfully deleted %s form submissions prior to %s" % (
|
|
26
|
+
count,
|
|
27
|
+
keep_from_date,
|
|
28
|
+
)
|
|
29
|
+
self.stdout.write(self.style.SUCCESS(msg))
|