mirror of
https://github.com/Xevion/v1.xevion.dev.git
synced 2025-12-06 01:16:47 -06:00
"-ness" typo, remove global func shadow of id and print (pprint replace)
This commit is contained in:
@@ -25,7 +25,7 @@ def hidden_help():
|
|||||||
return render_template("hidden_help.html")
|
return render_template("hidden_help.html")
|
||||||
|
|
||||||
|
|
||||||
# Parses strings to test for "boolean-ness"
|
# Parses strings to test for "boolean qualities"
|
||||||
def boolparse(string, default=False):
|
def boolparse(string, default=False):
|
||||||
trues = ["true", "1"]
|
trues = ["true", "1"]
|
||||||
if string is None:
|
if string is None:
|
||||||
|
|||||||
@@ -117,5 +117,5 @@ class Post(db.Model):
|
|||||||
|
|
||||||
|
|
||||||
@login.user_loader
|
@login.user_loader
|
||||||
def load_user(id):
|
def load_user(userID):
|
||||||
return User.query.get(int(id))
|
return User.query.get(int(userID))
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import json
|
import json
|
||||||
import pprint
|
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
|
||||||
@@ -13,8 +12,9 @@ from app import app, db
|
|||||||
from app.custom import require_role
|
from app.custom import require_role
|
||||||
from app.forms import LoginForm, RegistrationForm
|
from app.forms import LoginForm, RegistrationForm
|
||||||
from app.models import User
|
from app.models import User
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
print = pprint.PrettyPrinter().pprint
|
pprint = pprint.PrettyPrinter().pprint
|
||||||
fake = faker.Faker()
|
fake = faker.Faker()
|
||||||
strgen = lambda length, charset=string.ascii_letters, weights=None: "".join(
|
strgen = lambda length, charset=string.ascii_letters, weights=None: "".join(
|
||||||
random.choices(list(charset), k=length, weights=weights)
|
random.choices(list(charset), k=length, weights=weights)
|
||||||
|
|||||||
Reference in New Issue
Block a user