Cross Site Request Forgery (csrf) via POST / JQuery

2011-02-22 Thread gorans
Hi I'm using Django's CSRFViewMiddleware and am making a POST request in a page (using JQuery) in the form of: $.post('{% url posted_to_wall %}', { network: 'FBK', action_type: 'feed',

Model Formsets.save(commit=False) behaviour

2009-05-09 Thread gorans
Hi all, I'm trying to use the .save(commit=False) method on a model formset in my view but for some strange reason, the django code executes the model's save method. My understanding of the docs is that when (commit=False) is passed - the formset will return a list of model instances but not com

Best practices for sending bulk (+4000) mail in Django / Python

2008-04-23 Thread gorans
Hi, I've been sending out email to a list of around 8000 people on a monthly basis using django and was wondering whether there is a way to optimise the process. Currently, I open a mail connection [ mail_connection = SMTPConnection(fail_silently=True) ] and then loop through each message callin

Track number of hits on object

2008-04-02 Thread gorans
Hi all, I'm still quite new to django coding and am trying to learn to work inline with Django's DRY and other principles. In this case I'm having trouble deciding what is the more Django way of counting the number of times an object has been open. I know that the code will be executed in the V

Re: Customizing the settings configuration

2007-07-24 Thread gorans
Thanks for the help. That's going to save me heaps and heaps of time. Thanks again. Goran On Jul 25, 10:01 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 7/24/07, gorans <[EMAIL PROTECTED]> wrote: > > > > > I though that there could be a

Customizing the settings configuration

2007-07-24 Thread gorans
Hi, I develop Django sites on my mac and then publish them to another web server. In between, they live in a happy SVN repository on my development server. Each time I make a change to the project's settings.py I have to then go over and modify the live file version (in respect to the database t

Admin History - Date not formatted

2007-03-31 Thread gorans
Hi, This is probably a quick fix but the history section in the Django Admin displays the date incorrectly: SatPMAUS Eastern Standard TimeE_130AUS Eastern Standard Time20_AUS Eastern Standard Time0MarE_March1177497646FalseFalse I am using Windows with timezone (GMT +10:00 Canberra, Melbourne, Sy

Re: Where art thou ImageField

2007-03-13 Thread gorans
Thanks, I found http://www.carcosa.net/jason/software/django/stockphoto/ pretty helpful! Goran On Mar 13, 11:48 am, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > You may want to check out the 'stockphoto' app. Even if you don't use > it directly, it might give you ideas. It seems to handle thumbnai

Re: Where art thou ImageField

2007-03-12 Thread gorans
ata validation should not be done in models but in the forms > that manipulate data. does anyone know if this is correct? > > konstantin > > On Mar 12, 9:56 am, "gorans" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I'm trying to access the valu

Where art thou ImageField

2007-03-12 Thread gorans
Hi, I'm trying to access the value of an image field which is uploaded in the django admin interface - prior to calling the save. I have a model called Photo with three attributes: large, medium and small. Each are ImageFields. I have overwritten the save( ) function in Photo so that I can chec