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
Christopher M Reffett
go
Commits
4b940ea2
Commit
4b940ea2
authored
Feb 01, 2014
by
Jean Michel Rouly
Browse files
Reverted views
parent
0476774e
Changes
1
Show whitespace changes
Inline
Side-by-side
go/go/views.py
View file @
4b940ea2
...
...
@@ -87,9 +87,13 @@ def index(request):
url
.
owner
=
request
.
user
# If the user entered a short url, it's already been validated,
# so accept it.
# so accept it. If they did not, however, then generate a
# random one and use that instead.
short
=
url_form
.
cleaned_data
.
get
(
'short'
).
strip
()
if
len
(
short
)
>
0
:
url
.
short
=
short
else
:
url
.
short
=
URL
.
generate_valid_short
()
# Grab the expiration field value. It's currently an unsable
# string value, so we need to parse it into a datetime object
...
...
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