Re: localization in python code (views, models etc)

2011-07-12 Thread Cal Leeming
On 12 Jul 2011 01:22, "Lachlan Musicman" wrote: > > On Mon, Jul 11, 2011 at 21:02, stan wrote: > >> > >> > class Book(models.Model): > >> >title = models.CharField(max_length=120) > >> >date_published = models.DateField() > >> > >> Big tip - if you *actually* need a date_published field,

[GSoC composite fields] Weekly check-in #7

2011-07-12 Thread Michal Petrucha
Basic support in the admin is now working: adding, editing and deleting single instances with composite primary keys. Obviously, there's no inline support yet since relationship fields are not yet ready. Michal [1] https://github.com/konk/django signature.asc Description: Digital signature

Re: localization in python code (views, models etc)

2011-07-12 Thread Jannis Leidel
On 11.07.2011, at 10:58, stan wrote: > Hi, > > Maybe I missed something, but I didn't found any explanation in the > doc about how to localize a date or a number in the python code side. > Maybe I am totally wrong about wanting to do that but I can't see a > solution to resolve the following pro

Re: localization in python code (views, models etc)

2011-07-12 Thread akaariai
On Jul 12, 12:28 pm, Jannis Leidel wrote: > Yeah, django.utils.formats.localize is the main function to localize > a value using the format localization engine from Python. The missing > documentation is a bug, IMO. Just a minor correction: localize does not use the localization engine from Pytho

Re: localization in python code (views, models etc)

2011-07-12 Thread Jannis Leidel
On 12.07.2011, at 12:15, akaariai wrote: > On Jul 12, 12:28 pm, Jannis Leidel wrote: >> Yeah, django.utils.formats.localize is the main function to localize >> a value using the format localization engine from Python. The missing >> documentation is a bug, IMO. > > Just a minor correction: loca

Re: Decision for ticket #6362 - Remove blank spaces with strip when validating the data

2011-07-12 Thread burc...@gmail.com
Hi Dmitry, I think we could have combination of "validators" + "processors": they will return either exception or cleaned value. For example, SomeField(cleaners=[clean_and_validate_email()]) Did you mean exactly this or rather separated SomeField(validators=[...], processors=[...]) ? On Mon, Ju

Re: Decision for ticket #6362 - Remove blank spaces with strip when validating the data

2011-07-12 Thread Dmitry Gladkov
Hi Yuri, At first I thought that we should extend validators logic, but then I realized that validation and cleaning (agree that 'cleaners' is a better term than 'processors') are rather different tasks and mixing them could be ambiguous, not mentioning backwards incompatibile as a cleaner should

django.contrib.comments - No reference to commented object in preview

2011-07-12 Thread Tomáš Ehrlich
Hi there, why there is no reference to commented object in preview? django/contrib/comments/views/comments.py:95 return render_to_response( template_list, { "comment" : form.data.get("comment", ""), "form" : form, "next": next,

Re: django.contrib.comments - No reference to commented object in preview

2011-07-12 Thread Thejaswi Puthraya
Hi, On Jul 13, 1:42 am, Tomáš Ehrlich wrote: > Hi there, > why there is no reference to commented object in preview? > Any specific use-case? Specifying it can make it easier to decide. > django/contrib/comments/views/comments.py:95 >         return render_to_response( >             template_li

Re: django.contrib.comments - No reference to commented object in preview

2011-07-12 Thread Tomáš Ehrlich
Hi there, the reason is I want to show commented object (or some parts of it) during preview or correcting errors. I saw this behavior on lots of sites. Rewriting whole method because of one line seems like overkill to me. Ticket: https://code.djangoproject.com/ticket/16456 On 13 čnc, 07:22, The