Skip to content

Commit

Permalink
Needs to be in here for stacking.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lamb <lamby@debian.org>
  • Loading branch information
lamby committed Sep 18, 2012
1 parent 2971718 commit 789ea47
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/librement/profile/views.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import feedparser

from django.contrib import messages
from django.shortcuts import render, get_object_or_404, redirect
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required

from styleme.utils.ajax import ajax

from .forms import ProfileForm, URLForm, PictureForm

def view(request, username):
Expand All @@ -12,6 +16,19 @@ def view(request, username):
'user': user,
})

@ajax()
def xhr_rss(request, username):
user = get_object_or_404(User, username=username)

feed = None

if user.profile.rss_url:
feed = feedparser.parse(user.profile.rss_url)

return render(request, 'profile/view.html', {
'feed': feed,
})

@login_required
def edit(request):
if request.method == 'POST':
Expand Down

0 comments on commit 789ea47

Please sign in to comment.