some PEP8 fixes
authorReimar Bauer <rb.proj AT googlemail DOT com>
Sun, 19 Jan 2014 21:01:47 +0100
changeset 186ddcf9027531e
parent 185 6f504fc6b213
child 187 0fd6a26f018d
some PEP8 fixes
pymove3d.py
     1.1 --- a/pymove3d.py	Sun Jan 19 20:52:55 2014 +0100
     1.2 +++ b/pymove3d.py	Sun Jan 19 21:01:47 2014 +0100
     1.3 @@ -1,21 +1,14 @@
     1.4 +import os
     1.5 +import codecs
     1.6 +
     1.7 +from docutils.core import publish_parts
     1.8  from flask import Flask
     1.9  from flask import render_template
    1.10  from flask import request
    1.11 -from flask import abort, redirect, url_for
    1.12 -import os
    1.13 -from flask import send_from_directory
    1.14 -import logging
    1.15 -from logging import Formatter
    1.16 -
    1.17  from flask.ext.babel import gettext as _
    1.18  from flask.ext.babel import Babel
    1.19 -
    1.20  from config import LANGUAGES
    1.21  from sayings import get_saying
    1.22 -from jinja2 import Environment, FileSystemLoader
    1.23 -
    1.24 -import codecs
    1.25 -from docutils.core import publish_parts
    1.26  
    1.27  
    1.28  LANGUAGE_SELECTED = "de"
    1.29 @@ -26,6 +19,7 @@
    1.30  
    1.31  app.config['BABEL_DEFAULT_LOCALE'] = 'de'
    1.32  
    1.33 +
    1.34  def get_content(filename):
    1.35      content = u""
    1.36      if os.path.isfile(filename):
    1.37 @@ -36,11 +30,11 @@
    1.38      return content
    1.39  
    1.40  def get_topmenue():
    1.41 -    menue =  [('/competition', _(u'Competition')),
    1.42 +    menue = [('/competition', _(u'Competition')),
    1.43                ('/task', _(u'Task')),
    1.44                ('/submission', _(u'Submission')),
    1.45                ('/coursematerial', _(u'Coursematerial')),
    1.46 -              ]
    1.47 +            ]
    1.48      return menue
    1.49  
    1.50  app.jinja_env.globals.update(get_topmenue=get_topmenue)
    1.51 @@ -57,8 +51,8 @@
    1.52  def index():
    1.53      saying, author = get_saying()
    1.54      return render_template("/index.html", 
    1.55 -                           saying = saying,
    1.56 -                           author = author,
    1.57 +                           saying=saying,
    1.58 +                           author=author,
    1.59                             competition_info=_(u'About Competition'),
    1.60                             dates=_(u'Dates'),
    1.61                             impressions=_(u'Impressions'))
    1.62 @@ -69,8 +63,8 @@
    1.63      LANGUAGE_SELECTED = "de"
    1.64      saying, author = get_saying()
    1.65      return render_template("/index.html",
    1.66 -                           saying = saying,
    1.67 -                           author = author,
    1.68 +                           saying=saying,
    1.69 +                           author=author,
    1.70                             competition_info=_(u'About Competition'),
    1.71                             dates=_(u'Dates'),
    1.72                             impressions=_(u'Impressions'))
    1.73 @@ -81,8 +75,8 @@
    1.74      global LANGUAGE_SELECTED
    1.75      LANGUAGE_SELECTED = "en"
    1.76      return render_template("/index.html",
    1.77 -                           saying = saying,
    1.78 -                           author = author,
    1.79 +                           saying=saying,
    1.80 +                           author=author,
    1.81                             competition_info=_(u'About Competition'),
    1.82                             dates=_(u'Dates'),
    1.83                             impressions=_(u'Impressions'))
Impressum Datenschutzerklärung