+
+
+@ajax(method='get')
+def lessons_for_cybernauts(request):
+ books = Book.objects.filter(for_cybernauts=True)
+ data = []
+ for book in books:
+ try:
+ changes = book.get_current_changes()
+ time_changed = max(change.created_at for change in changes)
+ xml_url = reverse('catalogue_book_xml', args=[book.slug])
+ data.append({
+ 'slug': book.slug,
+ 'url': xml_url,
+ 'time_changed': time_changed.isoformat(),
+ })
+ except Book.NoTextError:
+ pass
+ return {'lessons': data}