Esempio n. 1
0
def discover(request):
    upcoming_services = Service.objects.filter(
        status=Service.APPROVE_STAT).order_by(
            'date_submitted').reverse().filter(in_development=True)
    user_voice = UserVoice()
    user_voice.retrieve_data_for_all()

    return render_to_response("discover.html", {
        'upcoming_services': upcoming_services,
        'user_voice': user_voice
    }, RequestContext(request))
Esempio n. 2
0
def user_voice_view(request):
    user_voice = None
    try:
        user_voice = UserVoice()
        user_voice.retrieve_data()
    except:
        import traceback
        traceback.print_exc(file=sys.stderr)
        return HttpResponseServerError()
    return render_to_response("uservoice.html", {'uservoice': user_voice},
                              RequestContext(request))
Esempio n. 3
0
def service(request, nick):
    #service must have this nick and be approved:
    service = get_object_or_404(Service,
                                nickname__iexact=nick,
                                status=Service.APPROVE_STAT)
    service_user_voice = UserVoice(nickname=nick, service=service)
    return render_to_response(
        "service.html", {
            'service': service,
            'uservoice': service_user_voice,
            'uservoice_url': settings.USER_VOICE_URL,
        }, RequestContext(request))