Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Political Memory
memopol
Commits
7343014f
Commit
7343014f
authored
Jun 11, 2016
by
Nicolas Joyard
Browse files
Import templatetags from django-representatives[-votes]
parent
bbf10045
Changes
1
Hide whitespace changes
Inline
Side-by-side
memopol/templatetags/memopol_tags.py
View file @
7343014f
...
...
@@ -21,6 +21,10 @@ def fix_url(url):
return
re
.
sub
(
'^(https?://)?'
,
'https://'
,
url
.
strip
())
def
cssify
(
string
):
return
re
.
sub
(
'[^a-z_-]'
,
''
,
string
.
lower
())
@
register
.
filter
def
twitter_link
(
url
):
furl
=
fix_url
(
url
)
...
...
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