Browse Source

Automatic formatting commit: 2020-04-05T19:51:57.087237

Getty Ritter 4 years ago
parent
commit
ea233d5e51
2 changed files with 5 additions and 5 deletions
  1. 1 1
      lc/model.py
  2. 4 4
      lc/routes.py

+ 1 - 1
lc/model.py

@@ -27,7 +27,7 @@ class User(Model):
         return User.get(name=slug)
 
     def base_url(self) -> str:
-        return f'/u/{self.name}'
+        return f"/u/{self.name}"
 
 
 class Link(Model):

+ 4 - 4
lc/routes.py

@@ -8,16 +8,16 @@ import lc.request as r
 app = flask.Flask(__name__)
 loader = pystache.loader.Loader(extension="mustache", search_dirs=["templates"],)
 
+
 def render(name, **kwargs):
-    '''Load and use a Mustache template from the project root'''
+    """Load and use a Mustache template from the project root"""
     template = loader.load_name(name)
     return pystache.Renderer().render(template, kwargs)
 
 
-
 @app.route("/")
 def index():
-    return render('main', title='main', content='whoo')
+    return render("main", title="main", content="whoo")
 
 
 @app.route("/u", methods=["POST"])
@@ -30,7 +30,7 @@ def create_user():
 @app.route("/u/<string:user>", methods=["GET", "POST"])
 def get_user(user):
     u = m.User.by_slug(user)
-    return render('main', title=f'user {u.name}', content='stuff')
+    return render("main", title=f"user {u.name}", content="stuff")
 
 
 @app.route("/u/<string:user>/l", methods=["POST"])