No exception when there's problems with CACHE_BACKEND?

2010-08-12 Thread julianb
Hi, I just discovered that my memcached deamon died and apparently Django does not throw exceptions when something is wrong with the cache backend. Is that correct and should it be that way? Not even with DEBUG=True there's any information if my cache is working or if I e.g. just made a typo in

Re: Django beta slower with some queries?

2009-04-28 Thread julianb
On Apr 27, 10:41 pm, Malcolm Tredinnick wrote: > > Reading the part "Performance considerations" got me in the right > > direction but didn't help me very well, because if you do it like > > that, it will still do a subselect. > > That's a documentation bug. There

Re: Django beta slower with some queries?

2009-04-27 Thread julianb
On Apr 24, 6:05 pm, Karen Tracey wrote: > I'd start by using a couple of Python shells (one using 1.0.2 and one using > 1.1 beta) and connection.queries to see if you can see the difference in SQL > generated for whatever model queries your view is using: > >

Django beta slower with some queries?

2009-04-24 Thread julianb
Hi, I have used Django 1.0.2 but moved to beta, because I badly needed some new features. I want to "report" that I found some queries to take considerably longer, while not having changed anything in the code at all. I talk about a rather simple query, but one which involves some joins with

Re: Comma instead of dot in FloatField

2009-04-17 Thread julianb
On Apr 17, 9:04 am, Knut Nesheim wrote: > Hi all, > > I have a model with several FloatFields. Based on this, ModelForm   > creates some form.FloatFields.These fields require the user to type   > '3.2' instead of '3,2', which is the custom here(Sweden). We need to   > allow

Re: blank=True on Char/TextFields

2009-04-07 Thread julianb
On Feb 12, 5:35 pm, tow wrote: > class TextData(models.Model): >      text = models.TextField(blank=True) > > obj = TextData() > obj.text = None > obj.save() > > gives me an IntegrityError. Why? I don't care that whether that's > saved as a Null or an zero-length

Re: How can I use more than 24 hours in TimeField?

2008-12-01 Thread julianb
On Dec 1, 11:03 am, "K*K" <[EMAIL PROTECTED]> wrote: > As you know time data type in mysql allow to be used more than 24 > hours, but when there is a more  than 24 hours record in the table > such as 72:00:00, and then query the table with Django ORM, it will > report 'ValueError hour must be in

Re: Django site speed - I think I have a problem with my config!

2008-10-03 Thread julianb
On Oct 3, 10:08 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Is there anything really obvious that I may be missing? Any debug > settings I may have forgotten to turn off? I've set > MaxRequestsPerChild to 10 so I don't think that it's that. > PythonDebug is off in httpd.conf. Did

Re: form get with special characters

2008-09-21 Thread julianb
On Sep 21, 4:01 pm, "Alessandro Ronchi" <[EMAIL PROTECTED]> wrote: > It seems now It works, becausehttp://www.animalisenzacasa.org/ricerca/?s=forlì > is converted to:http://www.animalisenzacasa.org/ricerca/?s=forl%C3%AC > > I don't know what's changed, because this morning the result was an >

Re: How to prevent URL HTML encoding?

2008-09-12 Thread julianb
A '+' doesn't have to be encoded, but it should be if it has no special meaning, maybe that's the problem here. http://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters Why does APPEND_SLASH even percent-encode? --~--~-~--~~~---~--~~ You

Re: how to cache form request in Django?

2008-09-12 Thread julianb
On Sep 12, 4:17 pm, Ross <[EMAIL PROTECTED]> wrote: > If you create restful URLs that your forms forward to, the restful > URLs could be cached. (I'm not sure if restful is the real term, but > that's what I've heard them called.) Instead of your form directing to > >

Re: How to prevent URL HTML encoding?

2008-09-12 Thread julianb
On Sep 12, 4:22 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote: > http://docs.djangoproject.com/en/dev/ref/templates/builtins/#safe > > http://docs.djangoproject.com/en/dev/topics/templates/#id2 HTML escaping doesn't make %2B out of '+'... --~--~-~--~~~---~--~~ You

Re: Field type for 13 digit positive integer?

2008-09-03 Thread julianb
On Sep 2, 10:00 pm, coan <[EMAIL PROTECTED]> wrote: > For now I was planning to store ISBN13 and 13 digit ean codes. > > In mysql a bigint field would hold these, but I see no corresponing > fieldtypes in django for bigints - > the positiveintegerfield sets itself up as an int(10) signed field >

Re: Django Image thumbnail and save

2008-08-31 Thread julianb
On Aug 31, 6:45 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Can someone please point me in the right direction I got problems after the refactoring, too: http://groups.google.com/group/django-users/browse_thread/thread/230a8601a4839bd9/b707f7fe40e03537#b707f7fe40e03537

Re: using File storage

2008-08-28 Thread julianb
On Aug 28, 8:53 pm, julianb <[EMAIL PROTECTED]> wrote: > I tried several things, I think Marty's solution was among them. It > did not throw errors, but the file I got was 0 bytes. I will try again > and check if I made a mistake or so... Okay, I solved the puzzle. The follow

Re: using File storage

2008-08-28 Thread julianb
On Aug 28, 8:44 pm, "Tim Kersten" <[EMAIL PROTECTED]> wrote: > This should fix the error you got: > > import StringIO > from django.core.files import File > f = StringIO.StringIO() > f.name, f.mode = 'data.xml', 'r' > f.write(data) > myfile = File(f) >

Re: using File storage

2008-08-28 Thread julianb
On Aug 28, 6:03 pm, "Tim Kersten" <[EMAIL PROTECTED]> wrote: > There's probably a better way than this though so you might want to > wait for other replies. > > import StringIO > from django.core.files import File > f = StringIO.StringIO() > f.write(data) > myfile = File(f) >

Re: Form validation

2008-08-25 Thread julianb
On Aug 23, 11:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > This seems to have done the trick. Thanks for your help. > > def index(request): >     if request.method == 'POST': >         form = pasteForm(request.POST) >         if form.is_valid(): >             name =

Re: Using CheckboxSelectMultiple with a many to many relationship.

2008-08-22 Thread julianb
On Aug 22, 4:32 pm, acreek <[EMAIL PROTECTED]> wrote: > I just have not figured out the correct way to pass along the coupons > that are a part of the Flyer model. Can anyone give me a hint on how > to go about this properly? Here's how I'd do it: http://dpaste.com/hold/73229/ Now you just have

Re: Save raw data to an ImageField?

2008-08-22 Thread julianb
On Aug 22, 2:54 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > If, however, you mean that the file is already a StringIO, rather than > a file, and you'd like to save it to a file, I hope to have a fix up > for that this weekend. It's possible right now, but it's not very > easy, much less

Re: Slash appended for URLs ending in .html?

2008-08-22 Thread julianb
On Aug 22, 12:55 pm, janedenone <[EMAIL PROTECTED]> wrote: > Which version of Django do you use? Using trunk, 8129 to be exactly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Save raw data to an ImageField?

2008-08-22 Thread julianb
On Aug 14, 1:31 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > You'll want to skip StringIO now, because Django provides its own > file-like object you can use directly. When you want to save the file, > you can open up a new File and just use that instead. > > from django.core.files.storage

Re: Field with RadioSelect widget instead of Select widget

2008-08-22 Thread julianb
On Aug 21, 7:30 pm, Bela Hausmann <[EMAIL PROTECTED]> wrote: > Hi! > > I'd like to use the RadioSelect widget for some of my model fields with > choices. But django always uses Select and if I change it manually in the form > class, than I have to specify the choices again and if it's optional or

Re: Slash appended for URLs ending in .html?

2008-08-22 Thread julianb
> It's not a bug. If you want URLs that end in .html you have to turn > APPEND_SLASH off. This can't be true. I have APPEND_SLASH set to default (=True) and it works with URLs ending in .htm, so there has to be something wrong with Jan's URL configuration.