Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
ff40cf8edb | ||
|
|
fe1273813c |
|
|
@ -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
|
||||
|
|
|
|||
3
TODO.md
3
TODO.md
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
<h2>Login</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<h2>Register</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Register</button>
|
||||
</form>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
TIME_ZONE = 'Europe/Berlin'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
|
|
|
|||
|
|
@ -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")),
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user