Re: get_FIELD_filename() in pluggable FileField backends

2007-09-08 Thread Marty Alchin
I submitted a new patch, which moves the backend code into django.core.filestorage and tweaks a few minor things. Most importantly, this new patch includes documentation in the form of a new document, files.txt, and some minor updates to model-api.txt and db-api.txt. The documentation probably is

Refactoring command options

2007-09-08 Thread Todd O'Bryan
I think my refactoring of django.core.management to let each command register its own options is complete. (Can anybody think of a good way to test everything, other than running stuff by hand, which I've been doing?) I did hit a couple of issues: 1. The args for loaddata had 'fixture, fixture,

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-08 Thread Marty Alchin
On 9/8/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > I'd say something like django.core.filesystems would be a good idea > (though I'd call it django.core.filestorage and paint the bikeshed > yellow.) I have pretty much zero preference on what it's called or where it goes, so yellow sounds f

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-08 Thread Jacob Kaplan-Moss
On 9/8/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > Doing some more thinking on the subject, it might make sense to move > the backends outside the django.db.models area, since they're really > not specific to that. Maybe something like django.core.filesystems? > Since, in theory, they could poss

Re: Proposal: Change ModelAdmin 'fields' to 'fieldsets'

2007-09-08 Thread Jacob Kaplan-Moss
On 9/8/07, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > Any serious opposition? Not at all -- this sounds perfectly sensible, and a good improvement. Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

ANN: newforms-admin syntax change for inlines

2007-09-08 Thread Joseph Kocherhans
If you use the newforms-admin branch and the edit inline functionality, you want to read this. I'm planning on breaking the current syntax for defining inlines in the very near future, but I figured I'd warn people and ask for comments first. Currently it's something like this: class MyModel

proposal: helper functions for validation

2007-09-08 Thread Amit Upadhyay
Python unittest TestCase objects have a lot of helper functions like assert_(), failUnless(), assertEqual(), assertNotEqual() and so on[1]. If we had a similar set of helper functions, possibly with more pythonic names, newform validation functions could be written a little more succinctly. de

Re: [Fwd: Memory leaks]

2007-09-08 Thread Honza Král
can you replicate this with DEBUG=False in your settings? without DEBUG turned on, no queries will be saved. I very much doubt that all these sites built on Django are either leaking memory or not using large quantities of objects like this one here. On 9/8/07, Tomas Kopecek <[EMAIL PROTECTED]> w

Proposal: Change ModelAdmin 'fields' to 'fieldsets'

2007-09-08 Thread Joseph Kocherhans
I'd like to change the 'fields' attribute on ModelAdmin to 'fieldsets', and use 'fields' for a tuple of field names rather than a list of (fieldset_name, options) tuples. Only one of those two options should be specified. In addition, the fieldsets_add and fieldsets_change methods would return a l

[Fwd: Memory leaks]

2007-09-08 Thread Tomas Kopecek
Hello, imagine following code snippets: --- class Simple(models.Model): data = models.CharField(maxlength = 1000) for id in Simple.objects.all(): Simple.objects.get(pk = id) --- For cycle should create instance of Simple and allocate corresponding memory. Immediately after that all memo

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-08 Thread Marty Alchin
On 9/7/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > I hope the source makes enough sense to give you guys a decent idea of > how I'm approaching this. I'm not happy with the organization of it, > but I'm not sure how best to organize everything. It seems like it'd > be better to break the file st

Re: Django, Components, and Interfaces

2007-09-08 Thread Marty Alchin
On 9/8/07, Joshua 'jag' Ginsberg <[EMAIL PROTECTED]> wrote: > So at my work we developed an app to provide object-level permissions. > Ideally, we could ask a User object if it has permission on a certain object > via a method in that User object, but absent hacking the User object, that's > not g

Re: Django, Components, and Interfaces

2007-09-08 Thread Vsevolod Solovyov
On 9/8/07, Joshua 'jag' Ginsberg <[EMAIL PROTECTED]> wrote: > So at my work we developed an app to provide object-level permissions. > Ideally, we could ask a User object if it has permission on a certain object > via a method in that User object, but absent hacking the User object, that's > not

Re: Django, Components, and Interfaces

2007-09-08 Thread Joshua 'jag' Ginsberg
Thank you all for taking the time to write your thoughts -- they've been very helpful! I hope you'll forgive me for trying to write a response to them collectively touching on the excellent points they raised. For the record, I'm not a Java developer. I spend most of my time writing in Python by c