This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="span2 captcha" id="captcha_enquete" style="display:none"> | |
<p> </p> | |
<p id="recaptcha_image"></p> | |
<a href="javascript:Recaptcha.reload()">[Dificuldade para ler?]</a> | |
<script type="text/javascript"> | |
var RecaptchaOptions = { | |
theme : 'custom', | |
language: 'br' | |
}; | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def emails_validate(email): | |
emails_list = [] | |
for i in email: | |
try: | |
validate_email(i.strip()) | |
emails_list.append(i) | |
except Exception, e: | |
pass | |
return emails_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Q: | |
_AVAIBLE_COMPARATORS = ('=', '>', '<', '>=', '<=', 'LIKE', '<>', 'IS', ) | |
def __init__(self): | |
self.data = [] | |
def where(self, field, comparator, value, escape=True, condition_or=False): | |
if not comparator in self._AVAIBLE_COMPARATORS: | |
raise "not comparator" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
res = s.extra(select={"actotal": """SELECT COUNT('id_sindicato') | |
FROM paginas P INNER JOIN sindicato S | |
ON (P.id_sindicato=S.id_sindicato) | |
INNER JOIN federacao F ON (S.id_federacao=F.id_federacao) | |
WHERE P.boletins=true AND F.sigla=federacao.sigla"""}).\ | |
values("federationbulletin__federation__initials", | |
"actotal").\ | |
annotate( | |
virtualtarget_views_total=Sum("virtualtarget_views_total"), | |
virtualtarget_clicks=Sum("virtualtarget_clicks"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def report(request): | |
context = {} | |
s = syndicatebulletin.objects | |
syn = Syndicate.objects | |
syndicate_id = request.GET.get("syndicate_id") | |
federation_id = request.GET.get("federation_id") | |
dt_from = request.GET.get("from") | |
dt_to = request.GET.get("to") | |
group = request.GET.get("group") | |
name = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT "sindicato"."abreviacao", "federacao"."sigla", "paginas"."boletins", "sindicato"."nome", SUM("syndicate_bulletin"."virtualtarget_optout") AS "virtualtarget_optout", SUM("syndicate_bulletin"."virtualtarget_processed") AS "virtualtarget_processed", SUM("syndicate_bulletin"."virtualtarget_clicks") AS "virtualtarget_clicks", SUM("syndicate_bulletin"."virtualtarget_delivered") AS "virtualtarget_delivered", SUM("syndicate_bulletin"."virtualtarget_views_total") AS "virtualtarget_views_total" FROM "syndicate_bulletin" INNER JOIN "sindicato" ON ("syndicate_bulletin"."syndicate_id" = "sindicato"."id_sindicato") INNER JOIN "federation_bulletin" ON ("syndicate_bulletin"."federationbulletin_id" = "federation_bulletin"."id") INNER JOIN "federacao" ON ("federation_bulletin"."federation_id" = "federacao"."id_federacao") LEFT OUTER JOIN "paginas" ON ("sindicato"."id_sindicato" = "paginas"."id_sindicato") GROUP BY "sindicato"."abreviacao", "federacao"."sigla", "paginas"."boletins", "sindicato"."nome" ORDER BY "federacao |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( typeof utils == 'undefined' ) { | |
var utils = {}; | |
} | |
utils.request = { | |
get : function(param) { | |
if(document.location.search.length == 0) | |
return {}; | |
var tmp = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getCidsLugarCerto(req,k): | |
""" | |
Retorna a lista de cidade por estado | |
""" | |
from mod_ppc.db.ppc_cid_cidade import instancia as ccid | |
from mod_ppc.config import configVars | |
from mod_gen.util.py2json import py2json as _py2json | |
from mod_gen.db.db import close | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tal:block tal:define="mod python:getAplicativoByTituloSite('Noticia');" tal:condition="python:atributos['peso'] == '0' and atributos['identificador'] and atributos['limite']"> | |
<tal:block tal:define="itens_ python:scripts['ordenalista'](mod=mod,listarconteudo=listarconteudo,hash=[atributos['identificador']],limite=atributos['limite'], getContent=getContent)"> | |
<tal:block tal:repeat="item itens_"> | |
<div class="line size3of3" tal:condition="python:item['destaque'] == 1"> | |
<div class="destaque_cinema unit" tal:attributes="peso item/peso"> | |
<a tal:attributes="href item/url" alt="" title=""> | |
<div class="unit prs"> | |
<img tal:attributes="src:375x230 python:getUrlByFile(item['imagem_destaque'], id_site=48); alt string:${item/titulo_destaque}"/> | |
</div> | |
<div class="desc_destaque_cinema unit"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@decorator_py2json | |
def estEdtProc(req, k): | |
"01.08.02 - Cadastrar / Editar Estabelecimento" | |
from mod_pga.db.pga_ehf_esthorafuncionamento import instancia as cehf | |
from mod_pga.db.pga_esp_estprodutoservico import instancia as cesp | |
from mod_pga.db.pga_efp_estformapagamento import instancia as cefp | |
from mod_pga.db.pga_est_estabelecimento import instancia as cest | |
from mod_pga.db.pga_epc_estpalavrachave import instancia as cepc | |
from mod_pga.db.pga_esa_estcategoria import instancia as cesa | |
from mod_pga.db.pga_esl_esttelefone import instancia as cesl |
OlderNewer