This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# truncates a file after a TAG pattern is found | |
# use at your own risk! | |
# | |
# for a bunch of files, you may want to: | |
# find somewhere/ -iname "*.mp3" -exec tag-wipe.py {} \; | |
# | |
# ulysses - [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import template | |
register = template.Library() | |
@register.filter | |
def with_user(instance, user): | |
""" | |
stores the user in the instance attribute '_onuser' wether exists or not. | |
""" | |
setattr(instance, "_onuser", user) |