"""
crate_anon/crateweb/consent/migrations/0003_auto_20160628_1301.py
===============================================================================
Copyright (C) 2015, University of Cambridge, Department of Psychiatry.
Created by Rudolf Cardinal (rnc1001@cam.ac.uk).
This file is part of CRATE.
CRATE is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
CRATE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with CRATE. If not, see <https://www.gnu.org/licenses/>.
===============================================================================
**Consent app, migration 0003.**
"""
# Generated by Django 1.9.7 on 2016-06-28 13:01
from __future__ import unicode_literals
from cardinal_pythonlib.django.fields.restrictedcontentfile import (
ContentTypeRestrictedFileField,
)
from django.db import migrations, models
from crate_anon.crateweb.consent.models import (
leaflet_upload_to,
study_details_upload_to,
study_form_upload_to,
)
from crate_anon.crateweb.consent.storage import CustomFileSystemStorage
# FileField "location" defaults left as they are; they don't hurt, and editing
# them does make Django regenerate migrations
_DEFAULT_STORAGE_DIR = (
"/home/rudolf/Documents/code/crate/working/crateweb/crate_filestorage"
)
[docs]class Migration(migrations.Migration):
dependencies = [
("consent", "0002_auto_20160621_1511"),
]
operations = [
migrations.AlterField(
model_name="emailattachment",
name="file",
field=models.FileField(
storage=CustomFileSystemStorage(
base_url="download_privatestorage",
location=_DEFAULT_STORAGE_DIR,
),
upload_to="",
),
),
migrations.AlterField(
model_name="leaflet",
name="pdf",
field=ContentTypeRestrictedFileField(
blank=True,
storage=CustomFileSystemStorage(
base_url="download_privatestorage",
location=_DEFAULT_STORAGE_DIR,
),
upload_to=leaflet_upload_to,
),
),
migrations.AlterField(
model_name="letter",
name="pdf",
field=models.FileField(
storage=CustomFileSystemStorage(
base_url="download_privatestorage",
location=_DEFAULT_STORAGE_DIR,
),
upload_to="",
),
),
migrations.AlterField(
model_name="study",
name="study_details_pdf",
field=ContentTypeRestrictedFileField(
blank=True,
storage=CustomFileSystemStorage(
base_url="download_privatestorage",
location=_DEFAULT_STORAGE_DIR,
),
upload_to=study_details_upload_to,
),
),
migrations.AlterField(
model_name="study",
name="subject_form_template_pdf",
field=ContentTypeRestrictedFileField(
blank=True,
storage=CustomFileSystemStorage(
base_url="download_privatestorage",
location=_DEFAULT_STORAGE_DIR,
),
upload_to=study_form_upload_to,
),
),
]