Re: HTTP Response returning 204

2007-03-12 Thread shevken
So i need to set USE_ETAGS=True in settings.py And then return response.status_code=204 Hmm..i'll try it tomorrow at work. On Mar 12, 6:27 pm, "Horst Gutmann" <[EMAIL PROTECTED]> wrote: > 2007/3/12, shevken <[EMAIL PROTECTED]>: > > > > > A

HTTP Response returning 204

2007-03-12 Thread shevken
Anyway to return response code 204 from a view? So that the request page do not get refreshed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users

Re: Using HttpResponseNotModified

2007-03-11 Thread shevken
Ignore. On Mar 12, 12:39 pm, "shevken" <[EMAIL PROTECTED]> wrote: > Hi Guys, > > I do not want a certain view to refresh my html page. > > so I got this method, > > def silent_update(): ># Do secret s

Using HttpResponseNotModified

2007-03-11 Thread shevken
Hi Guys, I do not want a certain view to refresh my html page. so I got this method, def silent_update(): # Do secret stuff return HttpResponseNotModified() --- But i got this error: Traceback (most recent call last): File "C:\Python24\

How to define non-persisted attributes in Model

2007-03-10 Thread shevken
class Message(models.Model): description = models.CharField(maxlength=200) author = models.ForeignKey(User) temp = models.CharField(maxlength=100) When i syncdb, i do not want the column temp to be created. Is there any arguments i can pass to enable this? Eg. temp = models.CharFie

FileField/ImageUpload saves upload-to path as \...\...\ instead of /.../.../ in database

2007-03-10 Thread shevken
Hi All, Is there a way to change the default path of the image to use backslash (/../) instead of the forward slash? I declared the following in my model img = models.ImageUpload(upload_to='upload/img/') but in the database the column's value is saved as upload\img \django.jpg When i display

Re: json serialization without certain fields and with extra information?

2007-03-10 Thread shevken
Hey guys, How do you de-serialize the object back at the ajax response. class Cart(models.Model): ... def get_total_quantity(): return quantity; self.response = self.xmlhttp.responseText; // parse the response into a JSON object var json_data = self.response.parseJSON(); alert(jso