3 Commits

20 changed files with 42 additions and 27 deletions

View File

@@ -2,7 +2,10 @@
### Tool for cities to easily publish their public transport in a standardized form
Public transport is often provided by many, smaller companies, operating mostly in their respective regions. A problem deriving from this is that, on a interregional, national and international, few machine-readable data is available. This impacts customers, as it makes it more difficult to find public transport routes, more so while travelling in regions they are less familiar with.
We designed a tool to provide city officials or volunteers to map the public transport in their jurisdiction using an easy-to-use graphical utility. https://www.gnu.org/software/make/
We designed a tool to provide city officials or volunteers to map the public transport in their jurisdiction using an easy-to-use graphical utility.
## Documentation
Project documentation is available to build from source using sphinx, prebuilt as html and at [ReadTheDocs](transport-accessibility.readthedocs.io).
## Installation instructions
### Dependencies

View File

@@ -1,14 +1,11 @@
## General
- Decide for a license
- Decide how to license produced data as the work of inserting the data and the data itself is not ours. Make the users agree on a FLOSS or CC license for the GTFS files produced from their data? What if someone doesn't own the data they upload? What if it's not free - How can we produce data in that case? ToS?
- Add documentation. Sphinx?
## Frontend
- Add TODOs
## Backend
- Serve data to views in an intuitive way. As an object of a custom class?
- Fetch data to serve to views
- Write data received from views
- Implement views serve data to the templates
- Handle requests corrrectly in views and urls

Binary file not shown.

View File

@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: d189724098e9f98f2667d702c7bbf633
config: 6458309a707672152a253c0dc8b987c5
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '0.1',
VERSION: '0.2',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; Transport Accessibility 0.1 documentation</title>
<title>Index &mdash; Transport Accessibility 0.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
@@ -14,7 +14,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=2709fde1"></script>
<script src="_static/documentation_options.js?v=10f1778b"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to Transport Accessibilitys documentation! &mdash; Transport Accessibility 0.1 documentation</title>
<title>Welcome to Transport Accessibilitys documentation! &mdash; Transport Accessibility 0.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
@@ -15,7 +15,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=2709fde1"></script>
<script src="_static/documentation_options.js?v=10f1778b"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>manage module &mdash; Transport Accessibility 0.1 documentation</title>
<title>manage module &mdash; Transport Accessibility 0.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
@@ -15,7 +15,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=2709fde1"></script>
<script src="_static/documentation_options.js?v=10f1778b"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>transport_accessibility &mdash; Transport Accessibility 0.1 documentation</title>
<title>transport_accessibility &mdash; Transport Accessibility 0.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
@@ -15,7 +15,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=2709fde1"></script>
<script src="_static/documentation_options.js?v=10f1778b"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pt_map package &mdash; Transport Accessibility 0.1 documentation</title>
<title>pt_map package &mdash; Transport Accessibility 0.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
@@ -15,7 +15,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=2709fde1"></script>
<script src="_static/documentation_options.js?v=10f1778b"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Python Module Index &mdash; Transport Accessibility 0.1 documentation</title>
<title>Python Module Index &mdash; Transport Accessibility 0.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
@@ -14,7 +14,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=2709fde1"></script>
<script src="_static/documentation_options.js?v=10f1778b"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; Transport Accessibility 0.1 documentation</title>
<title>Search &mdash; Transport Accessibility 0.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
@@ -15,7 +15,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=2709fde1"></script>
<script src="_static/documentation_options.js?v=10f1778b"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>transport_accessibility package &mdash; Transport Accessibility 0.1 documentation</title>
<title>transport_accessibility package &mdash; Transport Accessibility 0.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
@@ -15,7 +15,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=2709fde1"></script>
<script src="_static/documentation_options.js?v=10f1778b"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>

View File

@@ -16,7 +16,7 @@ django.setup()
project = 'Transport Accessibility'
copyright = '2024, Jan Kiljanski and Johannes Randerath'
author = 'Jan Kiljanski and Johannes Randerath'
release = '0.1'
release = '0.2'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

View File

@@ -0,0 +1,6 @@
<h2>Login</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Login</button>
</form>

View File

@@ -0,0 +1,6 @@
<h2>Register</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Register</button>
</form>

View File

@@ -14,6 +14,7 @@ from .models import *
from .forms import *
import json
from datetime import datetime
from django.contrib.auth.decorators import login_required
def get_timetable(r, trips, stop_sequences):
"""
@@ -48,7 +49,7 @@ def get_timetable(r, trips, stop_sequences):
timetable["stop_times"] = sts
return timetable
@login_required
def index(request):
stops = {s.stop_id: {name: getattr(s, name) for name in ['stop_name', 'stop_lat', 'stop_lon']} for s in Stop.objects.all()}
route_name = lambda r : r.route_short_name if r.route_short_name else r.route_long_name

View File

@@ -108,7 +108,7 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
TIME_ZONE = 'Europe/Berlin'
USE_I18N = True

View File

@@ -1,10 +1,12 @@
"""
URL configuration for transport_accessibility project.
"""
from django.contrib import auth as auth
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include("pt_map.urls"))
path('', include("pt_map.urls")),
path("accounts/", include("django.contrib.auth.urls")),
]