Login

Snippets by fylb

Snippet List

Log to syslog

This will use the syslog system to log your logs. This is usefull when you use WSGI and want to have a per day logging file (TimedRotatingFileHandler is not process safe, and you may lose data when using it with WSGI). Under a debian system, you'll have to modify **/etc/rsyslog.conf** and add: local0.* -/var/log/django/django.log local1.* -/var/log/django/payment.log

  • logging
  • syslog
Read More

Percent Field

This can be used in a forms.Form or forms.ModelForm in django. Render a decimal field between 0 and 1 into a value between 0 and 100, and vice-versa.

  • field
  • percent
Read More

fylb has posted 2 snippets.