Simple Django App to pull data from and to store them in the Database. The Name of the stations can be configured via the Admin UI and there is a Admin command to pull the data via Cron. 316B

  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.shortcuts import render
  4. from .models import DepartureTime
  5. def departures(request, ):
  6. my_times = DepartureTime.objects.all().filter(product='S-Bahn').order_by('time')
  7. return render(request, 'dash/mvg.tpl.html', {'times': my_times})