1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 13:24:52 +00:00

Modified at_pattern, disable adding link to email in seahub_urlize; Fixed repo create bug

This commit is contained in:
ZhengXie
2012-10-09 10:20:04 +08:00
parent d209f6074e
commit 1c6a40636c
5 changed files with 10 additions and 11 deletions

View File

@@ -7,6 +7,7 @@ from django.dispatch import receiver
from seaserv import get_emailusers
from shortcuts import get_first_object_or_none
from base.templatetags.seahub_tags import at_pattern
from notifications.models import UserNotification
from profile.models import Profile
@@ -64,8 +65,6 @@ class InnerPubMsgReply(models.Model):
message = models.CharField(max_length=150)
timestamp = models.DateTimeField(default=datetime.datetime.now)
at_pattern = re.compile(r'(\s|^)(@\w+)', flags=re.U)
# @receiver(post_save, sender=InnerPubMsgReply)
def msgreply_save_handler(sender, instance, **kwargs):
"""
@@ -75,7 +74,8 @@ def msgreply_save_handler(sender, instance, **kwargs):
reply_msg = instance.message
innerpub_msg = instance.reply_to
to_user = ''
m = re.match(at_pattern, reply_msg)
if m:
nickname_or_emailprefix = m.group()[1:]