|
@@ -28,8 +28,7 @@ from sqlalchemy.types import DateTime
|
28
|
28
|
from sqlalchemy.types import Boolean
|
29
|
29
|
from sqlalchemy.orm import relation, relationship, synonym
|
30
|
30
|
from tg import request
|
31
|
|
-from tg import config
|
32
|
|
-
|
|
31
|
+from tracim.lib.calendar import CALENDAR_USER_URL_TEMPLATE
|
33
|
32
|
from tracim.model import DeclarativeBase, metadata, DBSession
|
34
|
33
|
|
35
|
34
|
# This is the association table for the many-to-many relationship between
|
|
@@ -155,12 +154,12 @@ class User(DeclarativeBase):
|
155
|
154
|
# TODO - 20160531 - Bastien: Cyclic import if import in top of file
|
156
|
155
|
from tracim.config.app_cfg import CFG
|
157
|
156
|
cfg = CFG.get_instance()
|
158
|
|
- return '{proto}://{domain}:{port}/user/{id}.ics#{slug_name}'.format(
|
|
157
|
+ return CALENDAR_USER_URL_TEMPLATE.format(
|
159
|
158
|
proto='https' if cfg.RADICALE_CLIENT_SSL else 'http',
|
160
|
159
|
domain=cfg.RADICALE_CLIENT_HOST or request.domain,
|
161
|
160
|
port=cfg.RADICALE_CLIENT_PORT,
|
162
|
161
|
id=self.user_id,
|
163
|
|
- slug_name=slugify(self.get_display_name(
|
|
162
|
+ slug=slugify(self.get_display_name(
|
164
|
163
|
remove_email_part=True
|
165
|
164
|
), only_ascii=True)
|
166
|
165
|
)
|