[GSoC] Dynamic, rule-based ModelForms

2014-03-05 Thread Paolo Coffetti
Hi Django devs, I want to share an idea with you and get some feedback in order to know if it makes sense, if it could solve a common problem and maybe evolve into an official GSoC proposal. Some years ago I was working on a printing on demand website using Django 1.2 and some model forms. Our

Re: Proposal: update_fields shortcut

2014-03-05 Thread Paulo Poiati
Thanks for your feedback Russel. I understand and agree with your points, every solution has a drawback. I just think that the Zen of Python “There should be one-- and preferably only one --obvious way to do it.” shouldn’t be taken so seriously. What I mean is, isn’t QuerySet#get just a shor

Re: Proposal: update_fields shortcut

2014-03-05 Thread Russell Keith-Magee
On Wed, Mar 5, 2014 at 10:05 PM, Paulo Poiati wrote: > Hello everyone, > > While developing standard web applications one thing I frequently do is > updating just one field of a model instance and save it after that. The > best way to do that today (if you want to avoid the update in all the > fie

Re: [GSOC] Introduction and task proposal

2014-03-05 Thread Russell Keith-Magee
Hi Daniel, On Wed, Mar 5, 2014 at 11:48 PM, Daniel Pyrathon wrote: > Hi, > > My name is Daniel Pyrathon. I am currently a third year BSc student in > Computer Science at the University of Plymouth. > > I love programming and I have always been active in the Open Source > community (especially Py

Callable LazyObject?

2014-03-05 Thread Jeremy Dunck
I recently had a need for a LazyObject which was callable. The __call__ meta method isn't forwarded to _wrapped, so it's an error to call, even if the underlying _wrapped does support it. In my case, was trying to do the following: User = SimpleLazyObject(lambda: get_user_model()) User()... I

Re: 1.6 reverse() escapes unreserved chars in path components

2014-03-05 Thread Erik van Zijst
On Wednesday, 5 March 2014 14:04:51 UTC-8, Erik van Zijst wrote: > > I'll follow up with a pull request, unless there are string feelings, or > unwanted consequences of that approach. > https://github.com/django/django/pull/2401 Cheers, Erik >> The relevant django-developers discussion is her

Re: Testing parameters in database settings

2014-03-05 Thread Shai Berger
Hi Josh, Thanks for your comments. The missing parameters are kinda a separate issue, with mush narrower audience. Yes, I'd like to have them in 1.7 too, and I doubt I'll have time to fix it myself -- so, PRs welcome. Cheers, Shai. On Wednesday 05 March 2014 14:07:02 Josh Smeaton wrot

Re: Testing parameters in database settings

2014-03-05 Thread Josh Smeaton
Mentioned on the PR already, but writing some thoughts here too. I like the change. Moving test settings into their own sub-dict makes a lot of sense. Missing are settings for creating the datafile and datafile size for Oracle though. I'm unsure if a separate patch should be submitted for those

Re: 1.6 reverse() escapes unreserved chars in path components

2014-03-05 Thread Erik van Zijst
On Sunday, 2 March 2014 05:58:37 UTC-8, Sam Lai wrote: > > It seems like the fix makes it easier for 90% of the uses, but > explicitly blocks the other 10% (i.e. uses involving the use of > 'reserved' characters as permitted by the RFC). > Yes. I'm bringing this up because it breaks certain OAu

Re: Django 1.7: modelformset_factory() vs formset_factory()

2014-03-05 Thread Anders Steinlein
On Sun, Mar 2, 2014 at 8:27 PM, Tim Graham wrote: > Yes, see https://code.djangoproject.com/ticket/17642. If you can bring > the patch up to date in the next day or two, I'll try to help review and > commit it. > A day after "the next day or two" :) but I just supplied an updated patch. If you c

Re: Testing parameters in database settings

2014-03-05 Thread Shai Berger
Hi, I've put up https://github.com/django/django/pull/2400 for review. It makes the changes discussed -- test settings go into a 'TEST' dictionary in the database settings, with a deprecation warning for old settings. While at it, I added (in a separate commit) a renaming of two Oracle-specific

Re: Proposal: update_fields shortcut

2014-03-05 Thread Paulo Poiati
The solution three is also a really nice feature Tom, but it’s a different think, IMO. The update() is a QuerySet method and it does not call the save() method or trigger any of the signals. This is very important, specially for third party packages support. The django-model-utils for example…

[GSOC] Introduction and task proposal

2014-03-05 Thread Daniel Pyrathon
Hi, My name is Daniel Pyrathon. I am currently a third year BSc student in Computer Science at the University of Plymouth. I love programming and I have always been active in the Open Source community (especially Python). In the past years I have written lots of Python, Javascript, Ruby, Ja

Re: Proposal: update_fields shortcut

2014-03-05 Thread Tom Evans
On Wed, Mar 5, 2014 at 2:05 PM, Paulo Poiati wrote: > Hello everyone, > > While developing standard web applications one thing I frequently do is > updating just one field of a model instance and save it after that. The best > way to do that today (if you want to avoid the update in all the fields

Proposal: update_fields shortcut

2014-03-05 Thread Paulo Poiati
Hello everyone, While developing standard web applications one thing I frequently do is updating just one field of a model instance and save it after that. The best way to do that today (if you want to avoid the update in all the fields) is with the code bellow. product.name = 'Name change

Re: Revisiting multiline tags

2014-03-05 Thread Daniel Ellis
+1 - I've had the same issue with sorl thumbnail. On Wed, Mar 5, 2014 at 7:07 AM, Adam Serafini wrote: > +1 for multiline template tags > > Regarding: "we want to discourage putting business logic in the template" > > Long template tags can happen even if they are logic-less, and they would > r

Re: Revisiting multiline tags

2014-03-05 Thread Adam Serafini
+1 for multiline template tags Regarding: "we want to discourage putting business logic in the template" Long template tags can happen even if they are logic-less, and they would read much nicer over several lines. For example: {% cloudinary main_image.image width=300 height=300 class="img-thum