ANN: Django-fr.org is out!

2007-06-21 Thread David Larlet
Hi, I'm proud to announce that after a few months of stagnation the french community is online with a new site (powered by django of course) : http://www.django-fr.org/ The aim of this site is to provide translations of the documentation, useful links and of course to create a local community! I

Re: classes

2007-06-21 Thread Aidas Bendoraitis
Actually, type is a function, not a method. type(x) == x.__class__ Regards, Aidas Bendoraitis aka Archatas On 6/18/07, Joseph Heck <[EMAIL PROTECTED]> wrote: > > x = '123' > x.__class__ will give a reasonable answer, x.type() doesn't. (Python 2.4) > > If you can get away with using type(), it's

Re: newforms and File (image) upload

2007-06-21 Thread SanPy
The view should be like this, btw: def photo_upload(request): form = PhotoUploadForm() if request.POST: form = PhotoUploadForm(request.user, request.POST, request.FILES) if form.is_valid(): form.save() json = {'status': 'success', 'message': _("Uplo

Re: newforms and File (image) upload

2007-06-21 Thread SanPy
The view should be like this, btw: def photo_upload(request): form = PhotoUploadForm() if request.POST: form = PhotoUploadForm(request.user, request.POST, request.FILES) if form.is_valid(): form.save() json = {'status': 'success', 'message': _("Uplo

Re: newforms and File (image) upload

2007-06-21 Thread SanPy
Here are some code samples. Functionality may change in the future: class PhotoUploadForm(newforms.Form): item_id = newforms.IntegerField(widget=newforms.widgets.HiddenInput) photo = newforms.ImageField(label=_('photo'), widget=newforms.widgets.FileInput) def __init__(self,

Re: Mysql sleeping queries

2007-06-21 Thread David Reynolds
On 21 Jun 2007, at 2:06 am, Malcolm Tredinnick wrote: Okay, this is all good information. Does it only happen when DEBUG=True, or at other times as well? Both. One of the things people in IRC suggested I check was whether DEBUG was set to True. It happens in both cases for us. I guess

Re: gettext and _: what changed?

2007-06-21 Thread Michael
Wow... you guys are incredible! Of course I don't mind waiting... I was expecting 3-6 months! On Jun 21, 5:43 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2007-06-21 at 07:14 +, Michael wrote: > > Thanks Malcolm. > > > I'm assuming that the unicode branch is going to be merge

Re: Introducing DjangoSites.Org

2007-06-21 Thread Kenneth Gonsalves
On 20-Jun-07, at 8:22 PM, Kenneth Gonsalves wrote: >> The site is now live and ready to be used and abused. Please, login >> and submit your sites. > > i had registered as 'lawgon' and waited several hours - but no mail. > Can you check out? still havent got the mail, but the login is working

Re: virtualhosts, mod_python, and Django's cache

2007-06-21 Thread Kenneth Gonsalves
On 21-Jun-07, at 12:50 PM, [EMAIL PROTECTED] wrote: > cache gets confused. But if I do that, the settings don't work > correctly and the site won't load. What am I doing wrong? you need a pythonInterpretor line in each Location with a different name. It is in the documentation -- regards

Re: gettext and _: what changed?

2007-06-21 Thread Malcolm Tredinnick
On Thu, 2007-06-21 at 07:14 +, Michael wrote: > Thanks Malcolm. > > I'm assuming that the unicode branch is going to be merged soon? Or > otherwise, is it worth me submitting a patch to your ticket with: > > from django.utils.translation import gettext as _ > > added to all files that use _

virtualhosts, mod_python, and Django's cache

2007-06-21 Thread [EMAIL PROTECTED]
I am having a terrible time getting multiple vhosts running Django up and running. I have two sites configured just like the configuration below (except with different ServerName directives and different DJANGO_SETTINGS_MODULE variables. The trouble is that Django's cache is confusing the two si

Re: gettext and _: what changed?

2007-06-21 Thread Michael
Thanks Malcolm. I'm assuming that the unicode branch is going to be merged soon? Or otherwise, is it worth me submitting a patch to your ticket with: from django.utils.translation import gettext as _ added to all files that use _()? (or maybe there are other complications.) Cheers, Michael. O

<    1   2