Re: admin javacripts

2010-02-18 Thread George Karpenkov
On Feb 19, 1:39 am, Rob Hudson wrote: > I've battled many of these same issues when working on the debug > toolbar... it needs to work the same in any environment it gets loaded > into and, as such, has slightly different requirements put on it.  It > is seeming the admin is heading the same direc

Re: admin javacripts

2010-02-18 Thread George Karpenkov
+ it will make changing the jquery version much easier, since the person can just overwrite the base.html template On Feb 19, 3:39 pm, George Karpenkov wrote: > This is quite similar to the bug I've described > inhttp://code.djangoproject.com/ticket/12879. > > There is one thing that definitely

Re: Fixing middleware/view decorator handling of content iterators

2010-02-18 Thread Tai Lee
See also #7581, which has a patch that I have been using in my local Django branch for over a year without issue. My use case is that I need to generate large amounts of data in CSV format and stream the response to avoid timeouts. I wouldn't mind `HttpResponse` consuming `content` immediately if w

Re: admin javacripts

2010-02-18 Thread George Karpenkov
This is quite similar to the bug I've described in http://code.djangoproject.com/ticket/12879 . There is one thing that definitely needs to be done - Media definition needs to store javascripts as an ordered set to prevent duplicate inclusions rather then a list. I think adding jquery.js to the b

Re: How about adding a noop {% csrf_token %} tag to the Django 1.1 branch

2010-02-18 Thread SmileyChris
Bah! Yes, just like that. However, it would be nice to release a 1.1.2 containing this for those who use released versions as opposed to svn branches before 1.2 hits. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, s

Re: EmailField max_length of 75 characters should be 256 acccording to RFC 5321

2010-02-18 Thread SmileyChris
> Addressing the limitations of the builtin auth.User is something I > hope to look at in the 1.3 timeframe. In that case, would it be reasonable to have an open ticket for the specific request of being able to customize the length of the email field in the contrib.auth User object? I'm guessing

Re: How about adding a noop {% csrf_token %} tag to the Django 1.1 branch

2010-02-18 Thread Russell Keith-Magee
On Fri, Feb 19, 2010 at 8:34 AM, SmileyChris wrote: > I was thinking that it would help third-party apps to be able to work > across both 1.1 and 1.2 installations without workarounds if the 1.1 > branch had a csrf_token tag, just to stop templates choking with a > "Invalid block tag: 'csrf_token'

How about adding a noop {% csrf_token %} tag to the Django 1.1 branch

2010-02-18 Thread SmileyChris
I was thinking that it would help third-party apps to be able to work across both 1.1 and 1.2 installations without workarounds if the 1.1 branch had a csrf_token tag, just to stop templates choking with a "Invalid block tag: 'csrf_token'" message. Does this fit within the policy for supporting ol

Re: Moving all validation into the model layer.

2010-02-18 Thread orokusaki
@BrettH This is helpful but only gets me to where I'm currently at. I understand there are model validators available, and now I understand why they are the way they are, but what's next? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To p

Re: Moving all validation into the model layer.

2010-02-18 Thread BrettH
This answers your question http://djangoadvent.com/1.2/history-model-validation/ On Feb 19, 7:36 am, orokusaki wrote: > BTW, I am aware of the ability to create your own custom model field > class with a custom `validate()` method like my following example. I'm > also aware of using a model's cl

Re: Moving all validation into the model layer.

2010-02-18 Thread orokusaki
BTW, I am aware of the ability to create your own custom model field class with a custom `validate()` method like my following example. I'm also aware of using a model's clean() method to raise logical validation errors, like if their email is a gmail address and they they specify that they are a Y

Re: django + memcached: problem with limit of 1 mb

2010-02-18 Thread Jeremy Dunck
On Thu, Feb 18, 2010 at 2:21 PM, Forest Bond wrote: > Hi, > > On Thu, Feb 18, 2010 at 03:17:32PM -0500, Alex Gaynor wrote: >> On Thu, Feb 18, 2010 at 3:12 PM, Jeremy Dunck wrote: >> > On Thu, Feb 18, 2010 at 1:34 PM, ramu...@gmail.com >> > wrote: >> >> Does anyone know why django can't keep a d

Moving all validation into the model layer.

2010-02-18 Thread orokusaki
My idea is probably not unique and Django is already moving in this direction. I apologize if this is the case. I have thought for a year, pertaining to Django, about one thing: Why doesn't validation propagate from the lowest level? Why should this have to take place at a higher level? What happe

Re: django + memcached: problem with limit of 1 mb

2010-02-18 Thread Alex Gaynor
On Thu, Feb 18, 2010 at 3:21 PM, Forest Bond wrote: > Hi, > > On Thu, Feb 18, 2010 at 03:17:32PM -0500, Alex Gaynor wrote: >> On Thu, Feb 18, 2010 at 3:12 PM, Jeremy Dunck wrote: >> > On Thu, Feb 18, 2010 at 1:34 PM, ramu...@gmail.com >> > wrote: >> >> Does anyone know why django can't keep a d

Re: django + memcached: problem with limit of 1 mb

2010-02-18 Thread Forest Bond
Hi, On Thu, Feb 18, 2010 at 03:17:32PM -0500, Alex Gaynor wrote: > On Thu, Feb 18, 2010 at 3:12 PM, Jeremy Dunck wrote: > > On Thu, Feb 18, 2010 at 1:34 PM, ramu...@gmail.com > > wrote: > >> Does anyone know why django can't keep a data bigger, than 1 mb in > >> memcached ? > >> > >> This is no

Re: django + memcached: problem with limit of 1 mb

2010-02-18 Thread Alex Gaynor
On Thu, Feb 18, 2010 at 3:12 PM, Jeremy Dunck wrote: > On Thu, Feb 18, 2010 at 1:34 PM, ramu...@gmail.com wrote: >> Does anyone know why django can't keep a data bigger, than 1 mb in >> memcached ? >> >> This is no big deal to cut big data to 1mb pieces before setting and >> merge this pieces aft

Re: django + memcached: problem with limit of 1 mb

2010-02-18 Thread Jeremy Dunck
On Thu, Feb 18, 2010 at 1:34 PM, ramu...@gmail.com wrote: > Does anyone know why django can't keep a data bigger, than 1 mb in > memcached ? > > This is no big deal to cut big data to 1mb pieces before setting and > merge this pieces after getting from memcached. And this algorithm can > work tran

Re: django + memcached: problem with limit of 1 mb

2010-02-18 Thread Andi Albrecht
Items in memcached are limited to 1MB, see http://code.google.com/p/memcached/wiki/FAQ#Why_are_items_limited_to_1_megabyte_in_size? Andi On Thu, Feb 18, 2010 at 8:34 PM, ramu...@gmail.com wrote: > Does any

django + memcached: problem with limit of 1 mb

2010-02-18 Thread ramu...@gmail.com
Does anyone know why django can't keep a data bigger, than 1 mb in memcached ? This is no big deal to cut big data to 1mb pieces before setting and merge this pieces after getting from memcached. And this algorithm can work transparently for users. -- You received this message because you are su

Re: [RFC] Fixing middleware/view decorator handling of content iterators

2010-02-18 Thread Forest Bond
Hi, Thanks for your response, Russ. Let me put my use case out there to ground my responses a bit. I'm using Rackspace Cloud Files, a cloud storage service, to store large files (several hundred megabytes up to a few gigabytes in size). I need to serve these files to authenticated users via a v

Pickling of QuerySets filtered on ManyToMany broken?`

2010-02-18 Thread Schmilblick
Hello, I've encountered a problem while moving one of my sites from one server to another, upgrading Django in the process. When i try to cache (using memcache as a backend) a QuerySet filtered on a ManyToManyField i get this TypeError exception: "can't pickle function objects" Example code to d

Re: admin javacripts

2010-02-18 Thread Rob Hudson
I've battled many of these same issues when working on the debug toolbar... it needs to work the same in any environment it gets loaded into and, as such, has slightly different requirements put on it. It is seeming the admin is heading the same direction to some degree. While certain parts of the

Re: File to object

2010-02-18 Thread Karen Tracey
Please ask question related to using Django on django-users, not here. This list is for discussion of development of Django itself. Karen -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop.

File to object

2010-02-18 Thread Imre Guzmics
Hello I make a simple Photostore, application and I like to import the images from a directory. I like to upload files via FTP. So I like to ask your help about this. I like to a make something same, if it posible: class Testmodel(models.Model): ... pict = models.ImageField(u"pi

Re: [RFC] Fixing middleware/view decorator handling of content iterators

2010-02-18 Thread Tom Evans
On Thu, Feb 18, 2010 at 12:00 PM, Russell Keith-Magee wrote: ... > benefit of using an iterator in the first place. So -- I suppose the > bigger question that needs to be asked is what exactly is the use case > for an iterable response? I mean, I understand the general benefit of > using iterators

Re: [RFC] Fixing middleware/view decorator handling of content iterators

2010-02-18 Thread Russell Keith-Magee
On Tue, Feb 16, 2010 at 5:16 AM, Forest Bond wrote: > Hi, > > Django allows an iterator to be passed as response content when instantiating > an > HttpResponse.  However, doing so causes problems with the following classes > and > functions: > > UpdateCacheMiddleware: >  Caches the response obje

admin javacripts

2010-02-18 Thread Ales Zoulek
Hello, there a ticket about jQuery in admin that breaks any site-included jQueries and there's no easy/clean way to prevent it. http://code.djangoproject.com/ticket/12882 Let's see a bigger picture there. To my knowledge, admin has two ways how to include custom JS. One template based second p