2016-03-21 11:48:44 -07:00
|
|
|
from annoying.decorators import render_to
|
2013-01-12 09:45:20 -08:00
|
|
|
from django.contrib.auth.decorators import login_required
|
2016-11-01 11:21:39 -07:00
|
|
|
from django.http import HttpResponseRedirect
|
2013-01-12 09:45:20 -08:00
|
|
|
from snipts.models import Snipt
|
|
|
|
|
2013-10-19 17:48:00 -07:00
|
|
|
|
2013-02-11 22:13:22 -08:00
|
|
|
@login_required
|
|
|
|
@render_to('account.html')
|
|
|
|
def account(request):
|
|
|
|
return {}
|
|
|
|
|
2013-10-19 17:48:00 -07:00
|
|
|
|
2013-01-12 09:45:20 -08:00
|
|
|
@login_required
|
|
|
|
@render_to('stats.html')
|
|
|
|
def stats(request):
|
|
|
|
|
|
|
|
snipts = Snipt.objects.filter(user=request.user).order_by('-views')
|
|
|
|
|
|
|
|
return {
|
|
|
|
'snipts': snipts
|
|
|
|
}
|