| author | ymh <ymh.work@gmail.com> |
| Mon, 21 Mar 2011 19:26:49 +0100 | |
| changeset 48 | ef3a8cfef2bc |
| parent 24 | 57a2650a7f87 |
| permissions | -rw-r--r-- |
| 24 | 1 |
#! /usr/bin/env python |
2 |
||
3 |
from django.core.management import setup_environ |
|
4 |
from ldtplatform import settings |
|
5 |
||
6 |
setup_environ(settings) |
|
7 |
||
8 |
||
9 |
from ldt.ldt_utils.models import Media |
|
10 |
||
11 |
for media in Media.objects.all(): |
|
12 |
mimetype = media.mimetype |
|
13 |
if not media.mimetype_field and mimetye: |
|
14 |
media.mimetype_field = minetype |
|
15 |
media.save() |