Coverage for crateweb/consent/migrations/0003_auto_20160628_1301.py: 100%
9 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-08-27 10:34 -0500
« prev ^ index » next coverage.py v7.8.0, created at 2025-08-27 10:34 -0500
1"""
2crate_anon/crateweb/consent/migrations/0003_auto_20160628_1301.py
4===============================================================================
6 Copyright (C) 2015, University of Cambridge, Department of Psychiatry.
7 Created by Rudolf Cardinal (rnc1001@cam.ac.uk).
9 This file is part of CRATE.
11 CRATE is free software: you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 CRATE is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with CRATE. If not, see <https://www.gnu.org/licenses/>.
24===============================================================================
26**Consent app, migration 0003.**
28"""
30# Generated by Django 1.9.7 on 2016-06-28 13:01
31from __future__ import unicode_literals
33from cardinal_pythonlib.django.fields.restrictedcontentfile import (
34 ContentTypeRestrictedFileField,
35)
36from django.db import migrations, models
38from crate_anon.crateweb.consent.models import (
39 leaflet_upload_to,
40 study_details_upload_to,
41 study_form_upload_to,
42)
43from crate_anon.crateweb.consent.storage import CustomFileSystemStorage
45# FileField "location" defaults left as they are; they don't hurt, and editing
46# them does make Django regenerate migrations
48_DEFAULT_STORAGE_DIR = (
49 "/home/rudolf/Documents/code/crate/working/crateweb/crate_filestorage"
50)
53class Migration(migrations.Migration):
55 dependencies = [
56 ("consent", "0002_auto_20160621_1511"),
57 ]
59 operations = [
60 migrations.AlterField(
61 model_name="emailattachment",
62 name="file",
63 field=models.FileField(
64 storage=CustomFileSystemStorage(
65 base_url="download_privatestorage",
66 location=_DEFAULT_STORAGE_DIR,
67 ),
68 upload_to="",
69 ),
70 ),
71 migrations.AlterField(
72 model_name="leaflet",
73 name="pdf",
74 field=ContentTypeRestrictedFileField(
75 blank=True,
76 storage=CustomFileSystemStorage(
77 base_url="download_privatestorage",
78 location=_DEFAULT_STORAGE_DIR,
79 ),
80 upload_to=leaflet_upload_to,
81 ),
82 ),
83 migrations.AlterField(
84 model_name="letter",
85 name="pdf",
86 field=models.FileField(
87 storage=CustomFileSystemStorage(
88 base_url="download_privatestorage",
89 location=_DEFAULT_STORAGE_DIR,
90 ),
91 upload_to="",
92 ),
93 ),
94 migrations.AlterField(
95 model_name="study",
96 name="study_details_pdf",
97 field=ContentTypeRestrictedFileField(
98 blank=True,
99 storage=CustomFileSystemStorage(
100 base_url="download_privatestorage",
101 location=_DEFAULT_STORAGE_DIR,
102 ),
103 upload_to=study_details_upload_to,
104 ),
105 ),
106 migrations.AlterField(
107 model_name="study",
108 name="subject_form_template_pdf",
109 field=ContentTypeRestrictedFileField(
110 blank=True,
111 storage=CustomFileSystemStorage(
112 base_url="download_privatestorage",
113 location=_DEFAULT_STORAGE_DIR,
114 ),
115 upload_to=study_form_upload_to,
116 ),
117 ),
118 ]