Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
199288ea
authored
Mar 21, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: lokalize Notification's subject
parent
7e1d5ab8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
circle/dashboard/models.py
+2
-2
No files found.
circle/dashboard/models.py
View file @
199288ea
...
@@ -10,7 +10,7 @@ from django.db.models import (
...
@@ -10,7 +10,7 @@ from django.db.models import (
DateTimeField
,
DateTimeField
,
)
)
from
django.template.loader
import
render_to_string
from
django.template.loader
import
render_to_string
from
django.utils.translation
import
ugettext_lazy
as
_
,
override
from
django.utils.translation
import
ugettext_lazy
as
_
,
override
,
ugettext
from
model_utils.models
import
TimeStampedModel
from
model_utils.models
import
TimeStampedModel
from
model_utils.fields
import
StatusField
from
model_utils.fields
import
StatusField
...
@@ -50,7 +50,7 @@ class Notification(TimeStampedModel):
...
@@ -50,7 +50,7 @@ class Notification(TimeStampedModel):
with
override
(
language
):
with
override
(
language
):
context
[
'user'
]
=
user
context
[
'user'
]
=
user
rendered
=
render_to_string
(
template
,
context
)
rendered
=
render_to_string
(
template
,
context
)
subject
=
u
nicode
(
subject
)
subject
=
u
gettext
(
unicode
(
subject
)
)
return
cls
.
objects
.
create
(
to
=
user
,
subject
=
subject
,
message
=
rendered
,
return
cls
.
objects
.
create
(
to
=
user
,
subject
=
subject
,
message
=
rendered
,
valid_until
=
valid_until
)
valid_until
=
valid_until
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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