Model Validation

2011-09-24 Thread jenia ivlev
I have a model M that has a field num=models.IntegerField() I have a modelform called 'F' for model 'M'. I want to ensure that num is never negative. If I do validation in my form class, 'F', then i can do clean_num(): if negative than throw ValidationError('Num can never be negative'). This

Re: Parellel request from the same user in very short time

2011-09-24 Thread Russell Keith-Magee
On Sat, Sep 24, 2011 at 10:08 PM, Martin Tiršel wrote: > Hello, > > I am using Apache with mod_wsgi and following setting: > > WSGIDaemonProcess dev.xyz.com processes=1 threads=5 user=xyz group=xyz > display-name=dev.xyz.com > > I am observing some situations where a user

Django auth context processor: not to query for user for each request

2011-09-24 Thread Alexey Moskvin
Hi, I enabled django auth middleware, so now I have a user variable in my request context. In this case for each page request user object is queried from the database. Is it possible to set up this middleware to use a cached user object (for example, put by me in session)? User objects are not

Re: Parellel request from the same user in very short time

2011-09-24 Thread Thomas Orozco
Well, depends on what you're going to do with this data and what it represents, but maybe the simpler solution is to use a small javascript in your page that prevents the user from posting the same data twice. I actually had the same issue running a site of mine, and a double POST is mostly

Parellel request from the same user in very short time

2011-09-24 Thread Martin Tiršel
Hello, I am using Apache with mod_wsgi and following setting: WSGIDaemonProcess dev.xyz.com processes=1 threads=5 user=xyz group=xyz display-name=dev.xyz.com I am observing some situations where a user sends the same request multiple times (double click?) where the time between these

small problem with django-filebrowser and tinymce integration

2011-09-24 Thread xpanta
Hi, I am trying to integrate django-tinymce with django-filebrowser for my django admin. Everything (almost) works fine. - manage.py test filebrowser, works ok - http://localhost:8000/admin/filebrowser/browse/ works, too however when I press the button on the windows popup of of tinymce

Re: DJango doesn't work with Oracle 11g on Windows 8

2011-09-24 Thread Benjamin Welton
Hey Alec, django.core.exceptions.ImproperlyConfigured: Error loading cx_Oracle module: DLL load failed: %1 is not a valid Win32 application. Do you have the visual c redistributable installed for 64bit and the Python for windows extensions for 64bit installed? Ben On 9/24/2011 3:17 AM, Alec

DJango doesn't work with Oracle 11g on Windows 8

2011-09-24 Thread Alec Taylor
Good afternoon, Unfortunately DJango doesn't work with Oracle 11g Express on Windows 8 x64. DJango error: http://pastebin.com/8tAzsjYh (summary: "No module named cx_Oracle") pip install cx_Oracle output: http://pastebin.com/6Y61PqSM easy_install cx_Oracle output: http://pastebin.com/rCsY63RS