Skip to content

Instantly share code, notes, and snippets.

<body>
<script type="text/javascript" src="file:///G|/CURSO WEB/DWCS6/div/Maye/jquery-1.11.1.min (1).js"></script>
<script type="text/javascript" src="file:///G|/CURSO WEB/DWCS6/div/Maye/jquery.cycle.all.js"></script>
<script type="text/javascript">
$('#slider').cycle({
fx: 'fade',
speed: 'slow',
next: '#next',
prev: '#prev'
{%ifequal user.tipo 'profesional'%}
<div class="btn-group user-button">
<button class="btn btn-primary"><i class="icon-user"></i>{{user.get_full_name}}</button>
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="{% url mis-notificaciones %}"><i class=""></i> Notificaciones</a></li>
<li><a href="{{user.get_absolute_url}}"><i class=""></i> Ver mi perfil</a></li>
<li><a href="{% url perfil-editar user.perfil.id %}"><i class=""></i> Editar mis datos</a></li>
class AfiliacionNacionalCreateView(CreateView):
model = AfiliacionNacional
form_class = AfiliacionNacionalForm
success_url = reverse_lazy('afiliacionnacional-list')
def form_valid(self, form):
messages.info(self.request, 'Afiliacion creado', extra_tags='alert alert-success')
return super(AfiliacionNacionalCreateView, self).form_valid(form)
class AfiliacionNacionalDeleteView(DeleteView):
from django.template.defaultfilter import escape
for evento in eventos:
d = {
'id': str(evento.id),
'title': escape(evento.evento),
'start':escape(evento.inicio),
'end':escpe(evento.final),
'allDay': True,
'color':str(evento.user.userprofile.contraparte.font_color)
cantidad_actores = Familia.objects.filter(municipio__departamento__id = id).count() + \
Cooperativa.objects.filter(municipio__departamento__id = id).count() + \
Centrales.objects.filter(municipio__departamento__id = id).count()+ \
AsistenciaTecnica.objects.filter(municipio__departamento__id = id).count()
@fitoria
fitoria / gist:1165025
Created August 23, 2011 12:54 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Python developer at a start up in Chile.
Favorite Python project: Django or Sugar.
Favorite Conference: PyCon
Python Experience Level: Medium (4 years)
⨀_⨀
⨂_⨂
(/◔ ◡ ◔)/
°ﺑ°
(¬_¬)
(´・ω・`)
(ʘ_ʘ)
(ʘ‿ʘ)
(๏̯͡๏ )
(◕_◕)
def email_to_csv(self, widget, data=None):
""" email_to_csv - Exports the e-mail registered in this month to a csv file"""
# FIXME: Agregar un FileChooserDialog para elegir donde guardar el archivo csv
results = self.database.execute_view("asistencia_mensual", "pizzabashlog")
f = open("emails.csv","w")
for result in results[[date.today().month]]:
# FIXME: Buscar una mejor manera de forzar el salto de línea en el archivo
f.writelines(result.value['email'] + '\n')
@fitoria
fitoria / gist:217614
Created October 24, 2009 16:37 — forked from leah/gist:216443
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom
# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7