photos.py 815 Bytes
Newer Older
1
2
from django.conf import settings

3
PHOTOS_TAG_CONFIG = {
Florent Chehab's avatar
Florent Chehab committed
4
5
6
7
8
9
10
    "type": "array",
    "required": True,
    "content": {
        "url": {
            "type": "url",
            "required": True,
            "validators": {
11
                "extension": settings.ALLOWED_PHOTOS_EXTENSION
Florent Chehab's avatar
Florent Chehab committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
            }
        },
        "title": {
            "type": "text",
            "required": True,
            "validators": {
                "max_length": 200
            }
        },
        "licence": {
            "type": "text",
            "required": False,
            "validators": {
                "max_length": 200
            }
        },
        "description": {
            "type": "text",
            "required": False,
            "validators": {
                "max_length": 500
            }
        }
    }
}