Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
schilder2000
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schilder
schilder2000
Commits
783baf5a
You need to sign in or sign up before continuing.
Commit
783baf5a
authored
9 months ago
by
Thomas Schneider
Browse files
Options
Downloads
Patches
Plain Diff
*.py: Formatting
parent
dfac9164
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
schilder2000/helpers.py
+9
-5
9 additions, 5 deletions
schilder2000/helpers.py
schilder2000/instance.py
+2
-2
2 additions, 2 deletions
schilder2000/instance.py
schilder2000/views.py
+1
-3
1 addition, 3 deletions
schilder2000/views.py
with
12 additions
and
10 deletions
schilder2000/helpers.py
+
9
−
5
View file @
783baf5a
...
@@ -30,12 +30,16 @@ class Blueprint(FlaskBlueprint):
...
@@ -30,12 +30,16 @@ class Blueprint(FlaskBlueprint):
class
Flask
(
_Flask
):
class
Flask
(
_Flask
):
def
create_global_jinja_loader
(
self
)
->
BaseLoader
:
def
create_global_jinja_loader
(
self
)
->
BaseLoader
:
return
ChoiceLoader
([
return
ChoiceLoader
(
[
PrefixLoader
({},
delimiter
=
"
:
"
),
PrefixLoader
({},
delimiter
=
"
:
"
),
self
.
jinja_loader
,
self
.
jinja_loader
,
])
]
)
def
register_blueprint
(
self
,
blueprint
:
Blueprint
,
**
options
:
t
.
Any
)
->
None
:
def
register_blueprint
(
self
,
blueprint
:
Blueprint
,
**
options
:
t
.
Any
)
->
None
:
super
().
register_blueprint
(
blueprint
,
**
options
)
super
().
register_blueprint
(
blueprint
,
**
options
)
if
blueprint
.
jinja_loader
is
not
None
:
if
blueprint
.
jinja_loader
is
not
None
:
self
.
jinja_env
.
loader
.
loaders
[
0
].
mapping
[
blueprint
.
name
]
=
blueprint
.
jinja_loader
self
.
jinja_env
.
loader
.
loaders
[
0
].
mapping
[
blueprint
.
name
]
=
(
blueprint
.
jinja_loader
)
This diff is collapsed.
Click to expand it.
schilder2000/instance.py
+
2
−
2
View file @
783baf5a
...
@@ -22,6 +22,6 @@ def schild_html(ident):
...
@@ -22,6 +22,6 @@ def schild_html(ident):
return
bp
.
render_template
(
schild
.
template
,
schild
=
schild
)
return
bp
.
render_template
(
schild
.
template
,
schild
=
schild
)
@bp.route
(
'
/schild/<ident>.pdf
'
)
@bp.route
(
"
/schild/<ident>.pdf
"
)
def
schild_pdf
(
ident
):
def
schild_pdf
(
ident
):
return
render_pdf
(
url_for
(
'
.schild_html
'
,
ident
=
ident
))
return
render_pdf
(
url_for
(
"
.schild_html
"
,
ident
=
ident
))
This diff is collapsed.
Click to expand it.
schilder2000/views.py
+
1
−
3
View file @
783baf5a
from
.
import
db
from
.
import
db
from
.models
import
Schild
from
.models
import
Schild
from
flask
import
(
from
flask
import
Blueprint
,
render_template
,
request
,
redirect
,
url_for
Blueprint
,
render_template
,
request
,
redirect
,
url_for
)
from
flask_wtf
import
FlaskForm
from
flask_wtf
import
FlaskForm
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment