Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Debian New Member Process
nm.debian.org
Commits
9468b86a
Commit
9468b86a
authored
Mar 13, 2012
by
Enrico Zini
Browse files
Forgot to add template tags
parent
49973aa8
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/templatetags/perms.py
0 → 100644
View file @
9468b86a
from
django
import
template
from
backend
import
const
register
=
template
.
Library
()
@
register
.
filter
def
editable_by
(
value
,
arg
):
return
value
.
can_be_edited
(
arg
)
@
register
.
filter
def
is_admin
(
value
):
# Make sure we work with an AM
if
hasattr
(
value
,
"am_or_none"
):
value
=
value
.
am_or_none
if
value
is
None
:
return
False
return
value
.
is_fd
or
value
.
is_dam
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment