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
import pygame | |
import sys | |
OLPC_SCREEN_SIZE = (640, 480) | |
BLANCO = (255, 255, 255) | |
AZUL = (0, 0, 255) | |
AMARILLO = (255, 255, 0) | |
class Main(object): |
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
<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' |
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
#context manager para el menú. | |
from django.core.cache import cache | |
from models import Menu | |
def menu_context_manager(request): | |
#probamos si esta el elemento en caché | |
valor = cache.get('menu') | |
#si no está leemos de la base de datos | |
if not valor: |
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
server { | |
#redirigiendo feed | |
rewrite ^/feed/ /feed.rss.xml permanent; | |
#redirigiendo about | |
rewrite ^/about/ /about.html permanent; | |
#redirigiendo feed de categoria | |
rewrite ^/category/([a-z-\d-\¿-\¡]+)/feed/ /category/$1.rss.xml permanent; | |
location / { | |
#redirigiendo entradas viejas hacia urls nuevas (solo se agrega el .html) |
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
Categories: {% for category in article.categories %} <a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a>, {%endfor%} |
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
{%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> |
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 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): |
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
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) |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
var felicidades = {message: 'Felicidades', size: 100 }; | |
felicidades.size = felicidades.size / screen.width; | |
document.write("<h1 style='font-size:" + felicidades.size + " ;'>" + felicidades.message + "</h1>"); | |
</script> | |
</head> | |
<body> | |
</body> |
NewerOlder