fix media
This commit is contained in:
parent
a59093d7d2
commit
c425753f11
2 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ import ox
|
|||
class Event(models.Model):
|
||||
|
||||
class Meta:
|
||||
ordering = ('position', )
|
||||
ordering = ('position', 'date')
|
||||
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
modified = models.DateTimeField(auto_now=True)
|
||||
|
|
|
@ -63,10 +63,10 @@ def timeline(request):
|
|||
},
|
||||
"unique_id": event.slug
|
||||
})
|
||||
if self.media:
|
||||
if event.media:
|
||||
timeline['events'][-1]['media'] = {
|
||||
"url": self.media,
|
||||
"caption": self.media_caption,
|
||||
"url": event.media,
|
||||
"caption": event.media_caption,
|
||||
}
|
||||
context['timeline_json'] = json.dumps(timeline)
|
||||
return render(request, 'timeline.html', context)
|
||||
|
|
Loading…
Reference in a new issue