slider

parent e22947fa
......@@ -16,9 +16,17 @@ class AuthRequiredMiddleware(object):
# if request.path_info == reverse('ws-news-list2'):
# return response
if not request.user.is_authenticated and request.path_info != reverse('login') and not request.user.is_active:
if request.path_info ==reverse('ipn'):
print(request.path_info)
elif not request.user.is_authenticated and request.path_info != reverse('login') and not request.user.is_active:
return HttpResponseRedirect(reverse('login'))
#if not request.user.is_authenticated and request.path_info != reverse('login') and not request.user.is_active:
#if not request.user.is_authenticated or not request.user.is_active:
# return HttpResponseRedirect(reverse('login'))
# Code to be executed for each request/response after
# the view is called.
......
......@@ -237,7 +237,15 @@
height="1">
</form>
<form method="post" action="http://repsat.geoint.mx/catalog/ipn/">
<input type="text" name="nombre" value="">
<input type="submit">
</form>
<form method="post" action="../ipn/">
<input type="text" name="nombre" value="">
<input type="submit">
</form>
</td>
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render, redirect
from django.views.decorators.csrf import csrf_exempt
from GeoInt_SIDT.settings import BASE_URL
from catalog.forms import ASFSearchForm
......@@ -569,7 +570,7 @@ def Pay(request):
# ~ prod_list.append({
# ~ 'purchased': products['purchased'],
# ~ 'price' : products['price'],
# ~ 'aggreg_date' : products['aggreg_date'],
# ~ 'aggreg_date' : products['aggreg_date'],
# ~ 'catalog': product
# ~ })
# ~ return JsonResponse({'product_list': prod_list})
......@@ -581,6 +582,7 @@ def Pay(request):
# -----------------------------------------------------------------
@csrf_exempt
def IPN(request):
PATH_USERS = config['PATHS']['PATH_USERS']
print()
......@@ -588,7 +590,7 @@ def IPN(request):
x = request.POST.dict()
for key, value in x.items():
f.write(key+": "+value+'\n')
return HttpResponse("hola")
return redirect('../../')
#print("content-type: text/html\r\n\r\n")
#if request.POST.get['payment_status'] == 'Completed':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment