Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
AE
Sith
Commits
83f38e61
Verified
Commit
83f38e61
authored
Apr 26, 2018
by
Sli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forum Form optimisation
parent
443616a7
Pipeline
#1483
passed with stage
in 11 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
forum/models.py
forum/models.py
+2
-4
No files found.
forum/models.py
View file @
83f38e61
...
...
@@ -31,6 +31,7 @@ from django.utils import timezone
from
django.utils.functional
import
cached_property
from
datetime
import
datetime
from
itertools
import
chain
import
pytz
from
core.models
import
User
,
Group
...
...
@@ -144,10 +145,7 @@ class Forum(models.Model):
return
"%s"
%
(
self
.
name
)
def
get_full_name
(
self
):
name
=
''
for
parent
in
self
.
get_parent_list
():
name
+=
parent
.
name
+
'/'
return
name
+
self
.
name
return
'/'
.
join
(
chain
.
from_iterable
([[
parent
.
name
for
parent
in
self
.
get_parent_list
()],
[
self
.
name
]]))
def
get_absolute_url
(
self
):
return
reverse
(
'forum:view_forum'
,
kwargs
=
{
'forum_id'
:
self
.
id
})
...
...
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