Mercurial > public > sg101
annotate smiley/views.py @ 1166:130ac1e98cf4
More V3 forums tweaking.
Adding attachments is working now.
Adding a post via ajax is working.
Still need to display attachments on posts.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 20 Aug 2017 15:55:54 -0500 |
parents | e932f2ecd4a7 |
children |
rev | line source |
---|---|
bgneal@12 | 1 """ |
bgneal@12 | 2 Views for the Smiley application. |
bgneal@12 | 3 """ |
bgneal@1032 | 4 from django.shortcuts import render |
bgneal@12 | 5 from django.contrib.auth.decorators import login_required |
bgneal@12 | 6 from django.views.decorators.http import require_GET |
bgneal@12 | 7 |
bgneal@12 | 8 from smiley.models import Smiley |
bgneal@12 | 9 |
bgneal@12 | 10 @login_required |
bgneal@12 | 11 @require_GET |
bgneal@123 | 12 def farm(request, extra=False): |
bgneal@1032 | 13 return render(request, 'smiley/smiley_farm.html', { |
bgneal@123 | 14 'smilies': Smiley.objects.get_smilies(extra), |
bgneal@1032 | 15 }) |