def getRobots (request): global dominio_global contenido = Contenido() data = {'valor':'N/N', 'paso': 3} try: dominio = dominio_global if contenido.getFile(dominio,'robots.txt') : data['valor'] = '<a target="_blank" rel="nofollow" href="http://www.' + dominio + '/robots.txt">http://www.' + dominio + '/robots.txt</a>' data['paso'] = 1 return HttpResponse(json.dumps(data), content_type="application/json") except Exception as e: print str(e) return redirect('/')
def getRobots(request): global dominio_global contenido = Contenido() data = {'valor': 'N/N', 'paso': 3} try: dominio = dominio_global if contenido.getFile(dominio, 'robots.txt'): data[ 'valor'] = '<a target="_blank" rel="nofollow" href="http://www.' + dominio + '/robots.txt">http://www.' + dominio + '/robots.txt</a>' data['paso'] = 1 return HttpResponse(json.dumps(data), content_type="application/json") except Exception as e: print str(e) return redirect('/')
def getSitemap (request): contenido = Contenido() data = {'valor':'N/N', 'paso': 3} try: #self.session = Session() #dominio = self.session['dominio'] #dominio = request.session['dominio'] dominio = dominio_global if contenido.getFile(dominio,'sitemap.xml') : data['valor'] = '<a target="_blank" rel="nofollow" href="http://www.' + dominio + '/sitemap.xml">http://www.' + dominio + '/sitemap.xml</a>' data['paso'] = 1 return HttpResponse(json.dumps(data), content_type="application/json") except Exception as e: print str(e) return redirect('/')
def getSitemap(request): contenido = Contenido() data = {'valor': 'N/N', 'paso': 3} try: #self.session = Session() #dominio = self.session['dominio'] #dominio = request.session['dominio'] dominio = dominio_global if contenido.getFile(dominio, 'sitemap.xml'): data[ 'valor'] = '<a target="_blank" rel="nofollow" href="http://www.' + dominio + '/sitemap.xml">http://www.' + dominio + '/sitemap.xml</a>' data['paso'] = 1 return HttpResponse(json.dumps(data), content_type="application/json") except Exception as e: print str(e) return redirect('/')