list descriptions are html, locations are places

This commit is contained in:
j 2012-01-27 17:58:34 +05:30
parent 7eb00fc02e
commit d81c50f590
1 changed files with 4 additions and 1 deletions

View File

@ -158,6 +158,9 @@ def import_layers(item, layers):
for layer in layers:
oldLayerId = layer['id']
layer_name = '%ss'%layer['track']
layer_name = {
'locations': 'places'
}.get(layer_name, layer_name)
annotation = Annotation(item=item, layer=layer_name)
annotation.start = float(layer['time_in'])/1000
annotation.end = float(layer['time_out'])/1000
@ -238,7 +241,7 @@ for l in lists:
p,c = List.objects.get_or_create(name=l['title'], user=l['user'])
p.type = l['type'] == 'static' and 'static' or 'smart'
p.status = l['public'] and 'featured' or 'private'
p.description = l['description']
p.description = html_parser(l['description'])
p.save()
if l['type'] == 'static':
for v in l['items']: