Commit 4d8102ae authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Added my_links and delete views.

parent 13dfdd75
from go.models import URL
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, get_object_or_404, redirect
# Homepage view.
@login_required
def index(request):
return render(request, 'index.html', {
},
)
# My-Links page.
@login_required
def my_links(request):
links = URL.objects.filter( owner = request.user )
return render(request, 'my_links.html', {
'links' : links,
},
)
# Delete link page.
def delete(request, short):
return redirect('index')
# About page, static.
def about(request):
return render(request, 'about.html', {
......
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