photos.py 654 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
    "type": "array",
    "required": True,
    "content": {
        "url": {
            "type": "url",
            "required": True,
10
            "validators": {"extension": settings.ALLOWED_PHOTOS_EXTENSION},
Florent Chehab's avatar
Florent Chehab committed
11
        },
12
        "title": {"type": "text", "required": True, "validators": {"max_length": 200}},
Florent Chehab's avatar
Florent Chehab committed
13
14
15
        "licence": {
            "type": "text",
            "required": False,
16
            "validators": {"max_length": 200},
Florent Chehab's avatar
Florent Chehab committed
17
18
19
20
        },
        "description": {
            "type": "text",
            "required": False,
21
22
23
            "validators": {"max_length": 500},
        },
    },
Florent Chehab's avatar
Florent Chehab committed
24
}