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
d8a10713
Commit
d8a10713
authored
May 13, 2016
by
David Haynes
Browse files
Link creation now supports registereduser
- yay
parent
bda831e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
go/go/templates/link_box.html
View file @
d8a10713
...
...
@@ -31,7 +31,7 @@
<a
href=
"{{url.target}}"
>
{{url.target}}
</a>
<br
/>
{% if url.owner == request.user and request.user
|is_
registered %}
{% if url.owner == request.user
.registereduser.user
and request.user
.
registered
user.approved == True
%}
<strong>
Clicks:
</strong>
{{url.clicks}}
<br
/>
...
...
go/go/views.py
View file @
d8a10713
...
...
@@ -41,7 +41,7 @@ def index(request):
# We don't commit the url object yet because we need to add its
# owner, and parse its date field.
url
=
url_form
.
save
(
commit
=
False
)
url
.
owner
=
request
.
user
url
.
owner
=
request
.
user
.
registereduser
.
user
# If the user entered a short url, it's already been validated,
# so accept it. If they did not, however, then generate 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