Commit 2c38747e authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Fleshed out delete view, requires login and URL ownership.

parent cc00bce8
......@@ -22,8 +22,12 @@ def my_links(request):
)
# Delete link page.
@login_required
def delete(request, short):
return redirect('index')
url = URL.objects.get( short = short )
if url.owner == request.user:
url.delete()
return redirect('my_links')
# About page, static.
def about(request):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment