예제 #1
0
파일: views.py 프로젝트: hj91/markup
def gml(request, mark_reference):
    mark = get_object_or_404(Mark, reference=mark_reference)
    date_drawn = int(time.mktime(mark.date_drawn.timetuple()))
    context = {'mark': mark, 'obj_decoded': simplejson.loads(mark.points_obj_simplified), 'date_drawn': date_drawn}
    response = render_response(request, 'gml.xml', context, mimetype='application/xml')
    response['Content-Disposition'] = "attachment; filename=%s.gml" % mark.reference
    return response
예제 #2
0
파일: views.py 프로젝트: hj91/markup
def list_invites(request):
    if not request.user.is_authenticated():
        return HttpResponseRedirect('/accounts/login/')
    else:
        invites = Invitation.objects.order_by('id')
        context = {'invites': invites}
        return render_response(request, 'list_invites.html', context)
예제 #3
0
def list_invites(request):
    if not request.user.is_authenticated():
        return HttpResponseRedirect('/accounts/login/')
    else:
        invites = Invitation.objects.order_by('id')
        context = {'invites': invites}
        return render_response(request, 'list_invites.html', context)
예제 #4
0
파일: views.py 프로젝트: hj91/markup
def makemark(request):
    mark_form = MarkForm(request.POST)
    if mark_form.is_valid():
        mark_data = {'points_obj': mark_form.cleaned_data['points_obj'], 'country_code': mark_form.cleaned_data['country_code']}
        common.save_new_mark_with_data(mark_data)
    else:
        mark_form = MarkForm()
    return render_response(request, 'makemark.html', {'form': mark_form})
예제 #5
0
def makemark(request):
    mark_form = MarkForm(request.POST)
    if mark_form.is_valid():
        mark_data = {
            'points_obj': mark_form.cleaned_data['points_obj'],
            'country_code': mark_form.cleaned_data['country_code']
        }
        common.save_new_mark_with_data(mark_data)
    else:
        mark_form = MarkForm()
    return render_response(request, 'makemark.html', {'form': mark_form})
예제 #6
0
def community(request):
    if 'offset' in request.GET:
        try:
            offset = int(request.GET['offset'])
            per_page = int(request.GET['per_page'])
        except ValueError:
            return HttpResponseBadRequest()
        top_limit = offset + per_page
        all_marks = Mark.objects.exclude(flaggings__gte=1)[offset:top_limit]
    else:
        all_marks = Mark.objects.exclude(flaggings__gte=1)
    return render_response(request, 'community.html', {'all_marks': all_marks})
예제 #7
0
파일: views.py 프로젝트: hj91/markup
def community(request):
    if 'offset' in request.GET:
        try:
            offset = int(request.GET['offset'])
            per_page = int(request.GET['per_page'])
        except ValueError:
            return HttpResponseBadRequest()
        top_limit = offset + per_page
        all_marks = Mark.objects.exclude(flaggings__gte=1)[offset:top_limit]
    else:
        all_marks = Mark.objects.exclude(flaggings__gte=1)
    return render_response(request, 'community.html', {'all_marks': all_marks})
예제 #8
0
def gml(request, mark_reference):
    mark = get_object_or_404(Mark, reference=mark_reference)
    date_drawn = int(time.mktime(mark.date_drawn.timetuple()))
    context = {
        'mark': mark,
        'obj_decoded': simplejson.loads(mark.points_obj_simplified),
        'date_drawn': date_drawn
    }
    response = render_response(request,
                               'gml.xml',
                               context,
                               mimetype='application/xml')
    response[
        'Content-Disposition'] = "attachment; filename=%s.gml" % mark.reference
    return response
def subscribe(request):
    """ Subscribe a new email address to our contact list """
    form = forms.EmailSubscribeForm(request.POST or None)
    if request.method == 'POST':
        if form.is_valid():
            data = form.cleaned_data
            responsys.subscribe(settings.RESPONSYS_CAMPAIGN, 
                                data['email'],
                                'text',
                                responsys.make_source_url(request),
                                request.locale,
                                data['country'])
            return HttpResponseRedirect('/')
     # Not a POST or an Error 
    return render_response(request, 'newsletter.html', {'form': form})
예제 #10
0
파일: views.py 프로젝트: hj91/markup
def evan(request):
    evan_urls = {
        'laser_url': 'http://graffitiresearchlab.com/projects/laser-tag/',
        'throwies_url': 'http://graffitiresearchlab.com/projects/led-throwies/',
        'glove_url': 'http://whiteglovetracking.com/',
        'eyewriter_url': 'http://www.eyewriter.org/',
        'graffiti_url': 'http://graffitianalysis.com/',
        'jayz_url': 'http://www.youtube.com/watch?v=QftcJtvLr8g',
        'research_url': 'http://www.graffitiresearchlab.com/',
        'fat_url': 'http://fffff.at/',
        'npr_url': 'http://www.npr.org/templates/story/story.php?storyId=124980282',
        'nyt_url': 'http://evan-roth.com/press/High-Tech-Graffiti-Spray-Paint-Is-So-20th-Century-New-York-Times.pdf',
        'liberation_url': 'http://evan-roth.com/press/C-est-graff-docteur.pdf',
        'time_url': 'http://www.time.com/time/photogallery/0,29307,1911799_1912685,00.html',
        'cnn_url': 'http://edition.cnn.com/2010/TECH/web/09/10/gif.images/index.html',
        'guardian_url': 'http://www.guardian.co.uk/search?search=%22evan+roth%22&sitesearch-radio=guardian&go-guardian=Search',
        'abc_url': 'http://abcnews.go.com/Technology/popup?id=2425229',
        'esquire_url': 'http://www.esquire.com/features/best-brightest-2007/graffiti1207',
        'juxtapoz_url': 'http://evan-roth.com/press/juxtapoz-2010-10-oct-eroth.pdf',
    }
    return render_response(request, 'evan-roth.html', evan_urls)
예제 #11
0
def evan(request):
    evan_urls = {
        'laser_url':
        'http://graffitiresearchlab.com/projects/laser-tag/',
        'throwies_url':
        'http://graffitiresearchlab.com/projects/led-throwies/',
        'glove_url':
        'http://whiteglovetracking.com/',
        'eyewriter_url':
        'http://www.eyewriter.org/',
        'graffiti_url':
        'http://graffitianalysis.com/',
        'jayz_url':
        'http://www.youtube.com/watch?v=QftcJtvLr8g',
        'research_url':
        'http://www.graffitiresearchlab.com/',
        'fat_url':
        'http://fffff.at/',
        'npr_url':
        'http://www.npr.org/templates/story/story.php?storyId=124980282',
        'nyt_url':
        'http://evan-roth.com/press/High-Tech-Graffiti-Spray-Paint-Is-So-20th-Century-New-York-Times.pdf',
        'liberation_url':
        'http://evan-roth.com/press/C-est-graff-docteur.pdf',
        'time_url':
        'http://www.time.com/time/photogallery/0,29307,1911799_1912685,00.html',
        'cnn_url':
        'http://edition.cnn.com/2010/TECH/web/09/10/gif.images/index.html',
        'guardian_url':
        'http://www.guardian.co.uk/search?search=%22evan+roth%22&sitesearch-radio=guardian&go-guardian=Search',
        'abc_url':
        'http://abcnews.go.com/Technology/popup?id=2425229',
        'esquire_url':
        'http://www.esquire.com/features/best-brightest-2007/graffiti1207',
        'juxtapoz_url':
        'http://evan-roth.com/press/juxtapoz-2010-10-oct-eroth.pdf',
    }
    return render_response(request, 'evan-roth.html', evan_urls)
예제 #12
0
def mark_sammy(request):
    mark = get_object_or_404(Mark, reference=mark_reference)
    return render_response(request, 'sammy/mark.html', {'mark': mark})
예제 #13
0
def mozilla(request):
    return render_response(request, 'mozilla.html')
예제 #14
0
파일: views.py 프로젝트: hj91/markup
def about_gml(request):
    return render_response(request, 'gml.html')
예제 #15
0
def coming_soon(request):
    return render_response(request, 'coming_soon.html')
예제 #16
0
def credits(request):
    return render_response(request, 'credits.html')
예제 #17
0
파일: views.py 프로젝트: hj91/markup
def newsletter(request):
    form = EmailSubscribeForm()
    return render_response(request, 'newsletter.html', {'form': form})
예제 #18
0
def home(request):
    mr = settings.MEDIA_ROOT
    return render_response(request, 'home.html', {'mr': mr})
예제 #19
0
파일: views.py 프로젝트: hj91/markup
def manifesto(request):
    return render_response(request, 'manifesto.html')
예제 #20
0
파일: views.py 프로젝트: hj91/markup
def moderate_sammy(request):
    if not request.user.is_authenticated():
        return HttpResponseRedirect('/accounts/login/')
    else:
        return render_response(request, 'sammy/moderate.html')
예제 #21
0
파일: views.py 프로젝트: hj91/markup
def about(request):
    return render_response(request, 'about.html')
예제 #22
0
파일: views.py 프로젝트: hj91/markup
def home(request):
    mr = settings.MEDIA_ROOT
    return render_response(request, 'home.html', {'mr': mr})
예제 #23
0
파일: views.py 프로젝트: hj91/markup
def mozilla(request):
    return render_response(request, 'mozilla.html')
예제 #24
0
파일: views.py 프로젝트: hj91/markup
def code(request):
    return render_response(request, 'code.html')
예제 #25
0
파일: views.py 프로젝트: hj91/markup
def credits(request):
    return render_response(request, 'credits.html')
예제 #26
0
def makemark_sammy(request):
    mark_form = MarkForm()
    return render_response(request, 'sammy/makemark.html', {'form': mark_form})
예제 #27
0
파일: views.py 프로젝트: hj91/markup
def account_locked(request):
    return render_response(request, 'registration/locked.html')
예제 #28
0
def account_locked(request):
    return render_response(request, 'registration/locked.html')
예제 #29
0
def manifesto(request):
    return render_response(request, 'manifesto.html')
예제 #30
0
def moderate_sammy(request):
    if not request.user.is_authenticated():
        return HttpResponseRedirect('/accounts/login/')
    else:
        return render_response(request, 'sammy/moderate.html')
예제 #31
0
파일: views.py 프로젝트: hj91/markup
def makemark_sammy(request):
    mark_form = MarkForm()
    return render_response(request, 'sammy/makemark.html', {'form': mark_form})
예제 #32
0
def about(request):
    return render_response(request, 'about.html')
예제 #33
0
파일: views.py 프로젝트: hj91/markup
def linear_sammy(request):
    return render_response(request, 'sammy/linear.html')
예제 #34
0
def about_gml(request):
    return render_response(request, 'gml.html')
예제 #35
0
def newsletter(request):
    form = EmailSubscribeForm()
    return render_response(request, 'newsletter.html', {'form': form})
예제 #36
0
def code(request):
    return render_response(request, 'code.html')
예제 #37
0
def linear_sammy(request):
    return render_response(request, 'sammy/linear.html')
예제 #38
0
파일: views.py 프로젝트: hj91/markup
def mark(request, mark_reference):
    mark = get_object_or_404(Mark, reference=mark_reference)
    return render_response(request, 'mark.html', {'mark': mark})
예제 #39
0
파일: views.py 프로젝트: hj91/markup
def coming_soon(request):
    return render_response(request, 'coming_soon.html')