2 artigo/s coa etiqueta Web2py


Erro ó xerar os RSS no web2py

Ó actualizar, non lembro desde que versión, ó xerar os RSS o meu código produce un erro, de momento para solucionalo consígoo mudando no ficheiro /gluon/serializes.py a liña:

return str(obj[key]).encode('utf-8', 'replace') if key in obj else default

por

return str(obj[key]).decode('utf-8', 'replace') if key in obj else default

Ver esta incidencia

Leverage browser caching with apache.

Deixo aquí esta nota para mellorar Leverage browser caching, isto ponse dentro das etiquetas:

<VirtualHost>
</VirtualHost>

#
# associate .js with "text/javascript" type (if not present in mime.conf)
#
AddType text/javascript .js

#
# configure mod_expires
#
# URL: http://httpd.apache.org/docs/2.2/mod/mod_expires.html
#
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 seconds"
    ExpiresByType image/x-icon "access plus 604800 seconds"
    ExpiresByType image/jpeg "access plus 604800 seconds"
    ExpiresByType image/png "access plus 604800 seconds"
    ExpiresByType image/gif "access plus 604800 seconds"
    ExpiresByType application/x-shockwave-flash "access plus 604800 seconds"
    ExpiresByType text/css "access plus 604800 seconds"
    ExpiresByType text/javascript "access plus 604800 seconds"
    ExpiresByType application/x-javascript "access plus 604800 seconds"
    ExpiresByType text/html "access plus 600 seconds"
    ExpiresByType application/xhtml+xml "access plus 600 seconds"
</IfModule>

#