Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
37ca7227
Commit
37ca7227
authored
Aug 27, 2014
by
Jean Michel Rouly
Browse files
Removed weird serverurl variable in favour of dynamic access
parent
a122202a
Changes
1
Hide whitespace changes
Inline
Side-by-side
go/go/models.py
View file @
37ca7227
...
...
@@ -27,7 +27,10 @@ class URL( models.Model ):
ordering
=
[
'short'
]
def
get_absolute_url
(
self
):
return
"%s/%s"
%
(
settings
.
SERVERURL
,
self
.
short
)
from
django.contrib.sites.models
import
Site
current_site
=
Site
.
objects
.
get_current
()
site_url
=
current_site
.
domain
return
"%s/%s"
%
(
site_url
,
self
.
short
)
@
staticmethod
def
generate_valid_short
():
...
...
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