Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Seaward
Keel - LDH Middleware
Commits
8ca35339
Commit
8ca35339
authored
Oct 26, 2017
by
David Seaward
Committed by
Gogs
Oct 26, 2017
Browse files
Merge branch 'profile_links' of david.seaward/purist_middleware into master
parents
0299715b
b9f49270
Changes
5
Hide whitespace changes
Inline
Side-by-side
limitmonitor/jinja2/limitmonitor/userlimit.html
View file @
8ca35339
...
...
@@ -104,6 +104,17 @@ SPDX-License-Identifier: AGPL-3.0
</ul>
</article>
<nav>
<ul>
{% for name, link in link_profile_dict %}
<li><a
href=
"{{ link }}"
class=
"page"
>
{{ name }}
</a>
{% endfor %}
</ul>
</nav>
</main>
<footer>
...
...
limitmonitor/views.py
View file @
8ca35339
...
...
@@ -32,6 +32,7 @@ def userlimit(request):
"limits"
:
limits
,
"has_limit"
:
has_limit
,
"link_subscription"
:
settings
.
LINK_SUBSCRIPTION
,
"link_profile_dict"
:
settings
.
LINK_PROFILE_DICT
,
}
return
render
(
request
,
'limitmonitor/userlimit.html'
,
render_data
)
...
...
middleware/settings.py
View file @
8ca35339
import
ldap
import
strictyaml
from
decouple
import
Config
,
Csv
,
RepositoryIni
from
django_auth_ldap.config
import
LDAPSearch
...
...
@@ -10,10 +11,15 @@ from .settings_original import *
CONFIG_PATH
=
'/etc/opt/purist/middleware/config.ini'
SECRET_PATH
=
'/etc/opt/purist/middleware/secret.ini'
LINK_PROFILE_PATH
=
'/etc/opt/purist/middleware/link_profile.strict.yml'
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
())
#
# SECURITY
#
...
...
requires/dependencies.txt
View file @
8ca35339
...
...
@@ -13,8 +13,10 @@ ordereddict==1.1
pycparser==2.18
pyldap==2.4.37
PyNaCl==1.1.2
python-dateutil==2.6.1
pytz==2017.2
requests==2.18.4
ruamel.yaml==0.15.34
six==1.11.0
urllib3==1.22
vine==1.1.4
requires/requirements.txt
View file @
8ca35339
...
...
@@ -14,4 +14,5 @@ jinja2-django-tags==0.5
paramiko==2.3.1
pyasn1==0.3.7
python-decouple==3.1
strictyaml==0.8.0
WooCommerce==1.2.1
Write
Preview
Supports
Markdown
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