Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Seaward
Keel - LDH Middleware
Commits
c511aedf
Commit
c511aedf
authored
Nov 22, 2017
by
David Seaward
Browse files
Merge branch 'master' of code.puri.sm:purist/middleware into jwt_authentication
parents
6e446a55
f9108547
Changes
3
Hide whitespace changes
Inline
Side-by-side
limitmonitor/jinja2/limitmonitor/userlimit.html
View file @
c511aedf
...
...
@@ -108,8 +108,17 @@ SPDX-License-Identifier: AGPL-3.0
<nav>
<ul>
{% for name, link in link_profile_dict %}
<li><a
href=
"{{ link }}"
class=
"page"
>
{{ name }}
</a>
{% for section, link_ordered_dict in link_profile_ordered_dict.items() %}
<li>
{{ section }}
<ul>
{% for name, link in link_ordered_dict.items() %}
<li><a
href=
"{{ link }}"
class=
"page"
>
{{ name }}
</a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
...
...
limitmonitor/views.py
View file @
c511aedf
...
...
@@ -32,7 +32,7 @@ def userlimit(request):
"limits"
:
limits
,
"has_limit"
:
has_limit
,
"link_subscription"
:
settings
.
LINK_SUBSCRIPTION
,
"link_profile_dict"
:
settings
.
LINK_PROFILE_DICT
,
"link_profile_
ordered_
dict"
:
settings
.
LINK_PROFILE_
ORDERED_
DICT
,
}
return
render
(
request
,
'limitmonitor/userlimit.html'
,
render_data
)
...
...
middleware/settings.py
View file @
c511aedf
...
...
@@ -17,8 +17,7 @@ config = Config(RepositoryIni(CONFIG_PATH))
secret_config
=
Config
(
RepositoryIni
(
SECRET_PATH
))
with
open
(
LINK_PROFILE_PATH
,
'r'
)
as
stream
:
data
=
strictyaml
.
load
(
stream
.
read
()).
data
LINK_PROFILE_DICT
=
sorted
(
data
.
items
())
LINK_PROFILE_ORDERED_DICT
=
strictyaml
.
load
(
stream
.
read
()).
data
#
# SECURITY
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment