Coder Social home page Coder Social logo

politik-bei-uns / politik-bei-uns-web-old Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 6.0 3.11 MB

Offenes Ratsinformationssystem: Weboberfläche

License: BSD 3-Clause "New" or "Revised" License

Python 51.29% Shell 1.81% CSS 10.45% JavaScript 18.00% HTML 18.46%

politik-bei-uns-web-old's People

Contributors

exmatrikulator avatar grindhold avatar konstin avatar sumpfralle avatar the-infinity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

politik-bei-uns-web-old's Issues

PostgreSQL als Datenbank-Backend

Mittlerweile ist durch OParl die Datenstruktur klar genug, um eine relationale Datenbank nutzen zu können. PostgreSQL würde sich aufgrund der Datenmengen anbieten.

Logo in hübsch

Das Logo ist noch recht vorläufig.
Somit TODO: ein Grafikdesigner müsste sich das mal zu Gemüte führen.

Suchergebnisse aus anderen Gemeinden ausblenden

Bei der Suche nach einer Strasse in einer Stadt werden auch benachbarte Strassen angezeigt. Wenn man dann auf eine Strassenlinie klickt, dann werden bei den Treffern auch andere Gemeinden berücksichtigt, in denen eine gleichnamige Strasse vorkommt. Das dürfte fast nie erwünscht sein.

Neuaufbau der Responsive CSS mit Bootstrap

Durch die vielen Änderungen und die Integration von Bootstrap gibt es diverse kleinere Fehler in der Responsiveness der Seite.
Somit TODO: Neuaufbau der CSS-Regeln mit konsequenter Beachtung von Bootstrap.

Aachener Straße in Köln

Wenn man auf der Startseite von politik-bei-uns.de "Aachener" eintippt, dann werden automatisch vier Straßen in Berlin-Charlottenburg bzw. Moers aufgelistet. Die Aachener Straße in Köln (eine der Haupt-Straßen in der Stadt) fehlt jedoch.

URLs in JSON responses should be properly escaped

Many OParl responses contain URL strings in the JSON data. These URLs should be properly escaped. Currently this is not the case. For example, the next link in the paginated object list https://politik-bei-uns.de/oparl/body/54eaf4911ae6a017fc442c3a/person is

"links": {"next": "https://politik-bei-uns.de/oparl/body/54eaf4911ae6a017fc442c3a/person?q=modified:<2016-08-05T10:33:00.188000"}

That URL contains multiple characters that must be escaped (<, :) in its query string

API: falsche schema-strings

Die API liefert typestrings im stile von:

http://oparl.org/schema/1.0/System

sollte jedoch diese hier liefern:

https://schema.oparl.org/1.0/System

"UndefinedError: 'dict object' has no attribute ..."

Nach Abarbeitung von https://github.com/okfde/ris-web/wiki/Installation und Aufruf von http://localhost:23000 sehe ich dies. Hierzu eine Idee?

jinja2.exceptions.UndefinedError

UndefinedError: 'dict object' has no attribute u'5482ec449bcda40691218ef1'
Traceback (most recent call last)

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__

    return self.wsgi_app(environ, start_response)

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app

    response = self.make_response(self.handle_exception(e))

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception

    reraise(exc_type, exc_value, tb)

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app

    response = self.full_dispatch_request()

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request

    rv = self.handle_user_exception(e)

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception

    reraise(exc_type, exc_value, tb)

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request

    rv = self.dispatch_request()

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request

    return self.view_functions[rule.endpoint](**req.view_args)

    File "/srv/www/ris-web/webapp/views.py", line 66, in index

    html = render_template('index.html', session=session)

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask/templating.py", line 128, in render_template

    context, ctx.app)

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask/templating.py", line 110, in _render

    rv = template.render(context)

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render

    return self.environment.handle_exception(exc_info, True)

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception

    reraise(exc_type, exc_value, tb)

    File "/srv/www/ris-web/webapp/templates/index.html", line 1, in top-level template code

    {% extends "layout.html" %}

    File "/srv/www/ris-web/webapp/templates/layout.html", line 1, in top-level template code

    {% extends "bootstrap/base.html" %}

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask_bootstrap/templates/bootstrap/base.html", line 1, in top-level template code

    {% block doc -%}

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask_bootstrap/templates/bootstrap/base.html", line 4, in block "doc"

    {%- block html %}

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask_bootstrap/templates/bootstrap/base.html", line 20, in block "html"

    {% block body -%}

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/flask_bootstrap/templates/bootstrap/base.html", line 23, in block "body"

    {% block content -%}

    File "/srv/www/ris-web/webapp/templates/layout.html", line 79, in block "content"

    {% block riscontent %}{% endblock %}

    File "/srv/www/ris-web/webapp/templates/index.html", line 43, in block "riscontent"

    <div id="region-question" class="question">Ausgewählte Region: <span id="region-current">{{ config['regions'][region_id]['name'] }}</span> <span id="change-region" class="awesome extrawide">Ändern</span></div>

    File "/srv/www/ris-web/venv/lib/python2.7/site-packages/jinja2/environment.py", line 378, in getitem

    return obj[argument]

    UndefinedError: 'dict object' has no attribute u'5482ec449bcda40691218ef1'

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

    dump() shows all variables in the frame
    dump(obj) dumps all that's known about the object

https

Der Zugriff sollte per default per https erfolgen oder zumindest ermöglicht werden. Insbesondere die Übertragung von Ortsangaben als auch z.B. Suchen nach bestimmten gesundheitlichen oder politischen Themen müssen verschlüsselt möglich sein.

Dazu gibt es auch neue Grundsatzempfehlungen des Internet Architecture Board (IAB):

IAB Statement on Internet Confidentiality
https://www.iab.org/2014/11/14/iab-statement-on-internet-confidentiality/

Internet Society Commends Internet Architecture Board Recommendation on Encryption-by-Default for the Internet
http://www.internetsociety.org/news/internet-society-commends-internet-architecture-board-recommendation-encryption-default

RSS-Feed Link ist in <link> falsch

Beispielseite: https://politik-bei-uns.de/suche?r=54ecd5631ae6a07485f645d7&q=%22Utopiastadt%22&ppp=10&output=facets

Im Quellcode findet man:
<link rel="alternate" type="application/rss+xml" title="RSS Feed neuer Dokumente in dieser Suche" href="/suche/feed/?r=54ecd5631ae6a07485f645d7&q=&#34;Utopiastadt&#34;&fq=" />
in /suche/feed/?r=54ecd5631ae6a07485f645d7&q=&#34;Utopiastadt&#34;&fq= muss der / nach Feed gelöscht werden.

Weil unten beim RSS-Symbol funktioniert der Link: https://politik-bei-uns.de/suche/feed?r=54ecd5631ae6a07485f645d7&q=%22Utopiastadt%22&fq= besitzt aber kein / nach feed

RSS-Feed soll Text der PDFs beinhalten

Wenn es schon die geniale Funktion gibt, dass PDFs in Hypertext/Text konvertiert wird, dann sollten genau diese Inhalte aus dem PDFs auch im RSS-Feed zu finden sein. Gerade bei sehr langen Mitteilungen/Anfragen möchte man diese vielleicht lieber im Feedreader lesen.

map error (mapquest)

Die eingebundenen Kartendaten (Mapquest) funktionieren nicht mehr, da Mapquest Dienst deaktiviert hat.

Alternative leaflet-provider wären z.B.
OSM oder OSM-De

siehe leaflet-extras.github.io/leaflet-providers/

OpenGovLD-konforme Ausgabe

OpenGovLD (https://github.com/OpenGovLD/specs/) ist eine Spezifikation mit einer weltweiten Zielgruppe die in der Open Government Community Group des W3C (http://www.w3.org/community/opengov/) erarbeitet wird:

Die im gegenwärtigen OParl-Entwurf vorgesehenen Datenarten werden darin ebenso berücksichtigt wie die im Popolo Projekt (http://www.popoloproject.com/) in den letzten Jahren erfolgten Vorarbeiten. Im Gegensatz auf OParl basiert OpenGovLD auf JSON-LD und ermöglicht deshalb Linked Data-Anwendungen ohne Zusatzaufwand.

Ich beabsichtige eine Ergänzung der Plattform um entsprechende Ausgabeschnittstellen bis etwa Sommer 2015. Unterstützung ist erwünscht ;-)

Suche nach "Straße und Stadt" fehlerhaft

[Ich habe es nur auf der politik-bei-uns-Seite (mit Webkit- und Gecko-basierten Browsern) ausprobiert.]

Beim Bestätigen der Suchanfrage unter "Sehen Sie sich an, was die Politik in Ihrer Umgebung macht:" durch Klicken auf die Schaltfläche "Anzeigen" wird nur die Lade-Animation angezeigt, aber keine Inhalte/keine Änderung der Perspektive in der Karte.

superordinatedPaper-list contains an object

https://politik-bei-uns.de/oparl/paper/5671f6e41ae6a00300cce0b6

the above paper contains the following as superordinatedPaper

[   
  {                               
    "_id": "566562c51ae6a0584c8b64b7",                                                    
    "collection": "paper"                     
  }                 
]  

its supposed to contain an array of url-strings

Dokumentation des MongoDB Exportformat

Es würde sehr helfen, wenn das MongoDB Exportformat dokumentiert wäre.

Das würde es ermöglichen andere Scraper u.ä. einzubinden und zu verwenden.

Dokumentation: was tut `generate_xml_sitemaps.py` ?

In der Datei scripts/generate_xml_sitemaps.py steht am Anfang nur:

Generiert XML Sitemaps fuer files

Wofür werden die "XML Sitemaps" benötigt?
Für welche Dateien ("files") werden diese generiert?

(Anlass für die Frage ist eine Fehlermeldung die ich bei der Ausführung erhalte.)

String in endDate in membership.json

Beim Auslesen der OParl API von Politik-bei-uns sind ein paar Fehler beim (typisierten) Deserialisieren von JSON aufgefallen

https://politik-bei-uns.de/oparl/membership/562881d01ae6a02bb1892a28 line: 1, column: 114, endDate = "Der Paritätische"
https://politik-bei-uns.de/oparl/membership/57a2aec01ae6a00fe17a3754 line: 1, column: 114, endDate = "AG § 78 KJHG"
https://politik-bei-uns.de/oparl/membership/5581fa271ae6a004d80f6461 line: 1, column: 114, endDate = "Trägerverein Altes Landratsamt (in Gründung)"
https://politik-bei-uns.de/oparl/membership/549b3b341ae6a0073c43c40a line: 1, column: 114, endDate = "Vertreter Der Paritätische"
https://politik-bei-uns.de/oparl/membership/549b3abd1ae6a0073c43c130 line: 1, column: 114, endDate = "Kreispolizeibehörde"

agendaItem's result is an object

https://politik-bei-uns.de/oparl/agendaItem/5668bc201ae6a0280fdfa081

the above object's result field contains an object instead of the required string

{
  "PolitikBeiUns:originalId": 7198,
  "body": "https://politik-bei-uns.de/oparl/body/566348611ae6a0740409c26f",
  "consultation": "https://politik-bei-uns.de/oparl/consultation/5668bc201ae6a0280fdfa080",
  "created": "2015-12-09T23:41:19+01:00",
  "id": "https://politik-bei-uns.de/oparl/agendaItem/5668bc201ae6a0280fdfa081",
  "meeting": "https://politik-bei-uns.de/oparl/meeting/5668bc241ae6a0280fdfa0b2",
  "modified": "2016-01-17T23:45:35+01:00",
  "name": "Ä nderung der Gemeindeordnung fü r das Land NRW und Auswirkungen auf die Beteiligungen der Kreisstadt Unna",
  "number": "4.1",
  "public": true,
  "result": {
    "int": 208620601371978602145391450824676722997
  },
  "result_details": "Ja: 48, Nein: 0, Enthaltungen: 0",
  "type": "https://schema.oparl.org/1.0/AgendaItem"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.