Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(34)  |  Call(27)  |  Derive(0)  |  Import(7)

src/a/r/archfinch-HEAD/search/views.py   archfinch(Download)
from django.utils import simplejson
from django.conf import settings
from archfinch.utils import render_to_response
from archfinch.main.models import Item, Category, Tag
from archfinch.users.models import User
    def invalid_search():
        if json:
            return render_to_response('search/invalid.json', locals(), context_instance=RequestContext(request), mimetype='application/json')
        else:
            return render_to_response('search/invalid.html', locals(), context_instance=RequestContext(request))
            for result in results:
                result.highlighted_name = result.name
        return render_to_response('search/results.json', locals(), context_instance=RequestContext(request), mimetype='application/json')
    else:
        return render_to_response('search/results.html', locals(), context_instance=RequestContext(request))

src/a/r/archfinch-HEAD/users/views.py   archfinch(Download)
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404
from archfinch.utils import render_to_response
from django.template.defaultfilters import slugify
from django.core.urlresolvers import reverse
def top_users(request):
    top_users = User.objects.order_by('-karma')[:10]
 
    return render_to_response('user/top_users.html', locals(), context_instance=RequestContext(request))
 
    single = False
 
    return render_to_response('user/reviews.html', locals(), context_instance=RequestContext(request))
 
 
    single = True
 
    return render_to_response('user/reviews.html', locals(), context_instance=RequestContext(request))
 
 
        form = ReviewForm(initial={'text': text})
 
    return render_to_response('user/review_edit.html', locals(), context_instance=RequestContext(request))
 
 

src/a/r/archfinch-HEAD/account/views.py   archfinch(Download)
from django.views.decorators.cache import never_cache
from django.utils import simplejson
from archfinch.utils import render_to_response, form_error_msg
from archfinch.main.models import Similarity
from archfinch.account.models import SignupForm, AuthenticationForm
    else:
        form = SignupForm()
    return render_to_response("account/signup.html",
        {'form': form},
        context_instance=RequestContext(request))
 
 
def logout(request):
    if is_lazy_user(request.user):
        return render_to_response("account/logout.html", context_instance=RequestContext(request))

src/a/r/archfinch-HEAD/main/views.py   archfinch(Download)
from django.contrib.markup.templatetags.markup import markdown
from django.views.decorators.csrf import csrf_exempt
from archfinch.utils import render_to_response
from archfinch.utils.cache import publish_static
from archfinch.main import tasks
        also_liked = item.also_liked()
 
    response = render_to_response("main/item.html", locals(), context_instance=RequestContext(request))
    response.publish_static = True
    return response
        if feed:
            return locals()
        return render_to_response('main/followed_anonymous.html', locals(), context_instance=RequestContext(request))
 
    user_ids = map(lambda u: u.id, users)
    if not computed:
        wait_page = 'recommend'
        return render_to_response("main/wait.html", locals(), context_instance=RequestContext(request))
    else:
        if json:
            if feed:
                return locals()
            response = render_to_response("links/recommend.%s" % (ext,), locals(), context_instance=RequestContext(request))
        else:
            if len(recommendations) > n:

src/a/r/archfinch-HEAD/lists/views.py   archfinch(Download)
from django.db.models import Max
from django.utils import simplejson
from archfinch.utils import render_to_response
from archfinch.main.models import Item, Opinion
from archfinch.lists.models import List, Entry
from archfinch.users.models import User
from lazysignup.decorators import allow_lazy_user
 
def forbidden(request):
    resp = render_to_response('403.html', context_instance=RequestContext(request))
        opinion = None
 
    return render_to_response('lists/view.html', locals(), context_instance=RequestContext(request))
 
 
def overview(request):
    if request.user.is_authenticated():
        your_lists = request.user.list_set.all()
        recommended = Item.objects.recommended([request.user], category_id=8)  # get recommended lists
    return render_to_response('lists/overview.html', locals(), context_instance=RequestContext(request))
def user(request, username):
    viewed_user = get_object_or_404(User, username=username)
    lists = viewed_user.list_set.all()
    return render_to_response('lists/user.html', locals(), context_instance=RequestContext(request))
 

src/a/r/archfinch-HEAD/comments/views.py   archfinch(Download)
from django.utils import simplejson
from lazysignup.decorators import allow_lazy_user
from archfinch.utils import render_to_response, form_error_msg
from archfinch.comments.models import AddCommentForm
from archfinch.main.models import Item
                return_data['error_msg'] = form_error_msg(form.errors)
            else:
                return render_to_response('form_error.html', locals(), context_instance=RequestContext(request))
 
    else:

src/a/r/archfinch-HEAD/wiki/views.py   archfinch(Download)
from archfinch.wiki.models import PageForm, Page, Revision, RevisionText
from archfinch.main.models import Item
from django.shortcuts import get_object_or_404
from archfinch.utils import render_to_response
from django.core.urlresolvers import reverse
        form = PageForm(initial={'text': text})
 
    return render_to_response('wiki/edit.html', locals(), context_instance=RequestContext(request))