05 Sep 2010 @ 9:31 PM 

Este post es para escribir esta poesia que es casi declarativa.

tomado de



from urlparse import urlparse
from django.http import HttpResponseRedirect

def refer_check(func):
    def decorate(request):
        referer = request.META.get('HTTP_REFERER', '')

        if referer == 'http://www.example.com':
            return func(request)
            return HttpResponseRedirect('/')
    return decorate



def my_view(request):
    return render_to_response('myview.html')

Posted By: admin
Last Edit: 05 Sep 2010 @ 09:32 PM

Categories: django


Responses to this post » (None)

Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

 Last 50 Posts
Change Theme...
  • Users » 348
  • Posts/Pages » 39
  • Comments » 16
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Quien Soy

    No Child Pages.


    No Child Pages.


    No Child Pages.