new: django middleware to integrate with Firestats web analysis tool

2006-11-29 Thread Dan Getz

Hello django-ers,

I wrote a small middleware to log each django site pageview with
Firestats log analysis tool (Homepage: http://firestats.cc/wiki). Its
not the most efficient integration method, but it works.
Firestats is a log analysis tool (like AWstats, webalizer, Google
Analytics). Its written in PHP and not python (oh well...).

Source and stuff at the Firestats wiki.

Hope this helps someone.
dan


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Field labels and i18n in newforms

2007-02-02 Thread Dan Getz

When specifying labels for fields in a newforms Form, I use _()
gettext to provide localized versions of the field label. The problem
is the language may change midway, and the label binding is done at
Form initialization when the class is defined. The following code is
what sets the actually printer label:

from newforms/forms.py: Form.__init__():
if self.field.label is None:
self.label = pretty_name(name)
else:
self.label = self.field.label

The solution would be to make the translation later. Likely, when the
form is initialized.
So I am suggesting somehow making the above read:

self.label = _(self.field.label)

When this is appropriate.
Anyone have other suggestion? Has the same problem? Wants to commit a
patch?

Dan


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---