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
0b0fd220
Commit
0b0fd220
authored
Apr 19, 2017
by
David Haynes
🙆
Browse files
Merge branch '2.2-dev' of git.gmu.edu:srct/go into 2.2-dev
parents
409d57cd
b0293d82
Pipeline
#1254
passed with stage
in 1 minute and 22 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
go/go/models.py
View file @
0b0fd220
...
@@ -134,14 +134,13 @@ class URL(models.Model):
...
@@ -134,14 +134,13 @@ class URL(models.Model):
"""
"""
if
cache
.
get
(
"hashids_counter"
)
is
None
:
if
cache
.
get
(
"hashids_counter"
)
is
None
:
cache
.
set
(
"hashids_counter"
,
URL
.
objects
.
count
())
cache
.
set
(
"hashids_counter"
,
URL
.
objects
.
count
())
cache
.
incr
(
"hashids_counter"
)
short
=
HASHIDS
.
encrypt
(
cache
.
get
(
"hashids_counter"
))
tries
=
1
tries
=
1
while
tries
<
100
:
while
tries
<
100
:
try
:
try
:
URL
.
objects
.
get
(
short__iexact
=
short
)
short
=
HASHIDS
.
encrypt
(
cache
.
get
(
"hashids_counter"
)
)
tries
+=
1
tries
+=
1
cache
.
incr
(
"hashids_counter"
)
cache
.
incr
(
"hashids_counter"
)
URL
.
objects
.
get
(
short__iexact
=
short
)
except
URL
.
DoesNotExist
as
ex
:
except
URL
.
DoesNotExist
as
ex
:
print
(
ex
)
print
(
ex
)
return
short
return
short
...
...
go/go/templates/core/about.html
View file @
0b0fd220
...
@@ -103,7 +103,7 @@ SRCT Go • About
...
@@ -103,7 +103,7 @@ SRCT Go • About
<br></br>
<br></br>
Go 1.0:
Go 1.0:
<br
/>
<br
/>
<a
href=
"https://github.com/jrouly"
>
Michel Roul
e
y
</a>
,
<a
href=
"https://github.com/jrouly"
>
Michel Rouly
</a>
,
<a
href=
"https://github.com/creffett"
>
Chris Reffett
</a>
,
<a
href=
"https://github.com/creffett"
>
Chris Reffett
</a>
,
<a
href=
"https://github.com/nanderson94"
>
Nicholas Anderson
</a>
,
<a
href=
"https://github.com/nanderson94"
>
Nicholas Anderson
</a>
,
and
<a
href=
"https://github.com/akshaykarthik"
>
Akshay Karthik
</a>
.
and
<a
href=
"https://github.com/akshaykarthik"
>
Akshay Karthik
</a>
.
...
...
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