Re: Proposal: Signal connection via "my_app.MyModel"

2012-08-22 Thread Russell Keith-Magee
On Wed, Aug 22, 2012 at 1:17 PM, Yo-Yo Ma wrote: > Is there anyone else out there who doesn't like having to import models from > app X into app Y just so that app Y can connect post save signals to them? I can't say the need to import models to set up a signal has

Re: Proposal: Signal connection via "my_app.MyModel"

2012-08-22 Thread Andrew Ingram
I can see a use case for this, but would this not work? from django.db.models import get_model post_save.connect( my_signal_handler, sender=get_model('my_app', 'MyModel'), ) As long as the app cache has been initialised before you call get_model, this should work fine. - Andy On 22

Re: Python 3: should we apply unicode_literals everywhere?

2012-08-22 Thread VernonCole
That seems to me (in my dark status as a lurker here) to be a brilliant idea. It is already established practice to say something like: "version 1.n of django requires 2.m or later of Python". The practice then would change to: "version 1.n of django requires 2.m of Python or 3.3 or later". I

Re: Python 3: should we apply unicode_literals everywhere?

2012-08-22 Thread Mikhail Korobov
Python 3.2 is a default python in Ububtu 12.04 LTS so I think Python 3.2 support is pretty important. And what are the gains of having "u" prefixes all over the codebase? This makes the codebase less Python3-like. With PEP414-based code there must be explicit "b" and explicit "u" prefixes all

Re: GSoC Check-in: Security Enhancements

2012-08-22 Thread Rohan Jain
Hi, Thanks for the reply. On 10:50 +0100 / 21 Aug, Andrew Godwin wrote: > Thanks for your work during the GSOC, Rohan - don't worry about not > achieving everything, it looks like there's still some useful code there! > > Hopefully we can get some of the code merged, especially centralised >

Re: Python 3: should we apply unicode_literals everywhere?

2012-08-22 Thread Aymeric Augustin
> 2012/8/22 VernonCole : > > On Tuesday, August 21, 2012 4:03:57 PM UTC-6, DrMeers wrote: >> >> It's a shame we couldn't skip straight to Python 3.3 and take >> advantage of PEP414... > > That seems to me (in my dark status as a lurker here) to be a brilliant > idea. Well,

Single record models

2012-08-22 Thread Richard Dodd
I want to design a website where the user can edit sections such as their contact details, and I would like it to be integrated into the admin interface. A model would not be suitable since there would only be 1 record. Do you think the community would be interested in this functionality, and

Re: Customizable Serialization check-in

2012-08-22 Thread Piotr Grabowski
Hi, Google Sumer of Code is almost ended. I was working on customizable serialization. This project was a lot harder than I expected, and sadly in my opinion I failed to do it right. I want to apologize for that and especially for my poor communication with this group and my mentor. I want

Re: Single record models

2012-08-22 Thread Richard Dodd
Is this the solution I'm looking for https://github.com/sciyoshi/django-dbsettings? I'm looking for similar fields to the models, but 1 offs On Thursday, August 23, 2012 1:05:05 AM UTC+1, Richard Dodd wrote: > > I want to design a website where the user can edit sections such as their >

Why is CSRF cookie persistent?

2012-08-22 Thread Gruffudd Williams
The results of a recent penetration test brought up the issue of the use of persistent cookies, specifically the CSRF cookie which has an expiry date one year in the future. The rationale given was that since the cookie is stored on the hard drive then it is theoretically possible to get hold

Re: Why is CSRF cookie persistent?

2012-08-22 Thread Paul McMillan
Hi Gruffudd, If the cookie were set to expire at browser close, it would cause CSRF errors for users who closed a browser (or bookmarked a page with a form on it) and then loaded that page from a browser cache and submitted the form. I'm ambivalent about whether this use case is worth supporting

Re: Single record models

2012-08-22 Thread Joe Tennies
Please use the django-users mailing list. This is for the development of Django itself. Thanks, Joe On Wed, Aug 22, 2012 at 7:30 PM, Richard Dodd wrote: > Is this the solution I'm looking for > https://github.com/sciyoshi/django-dbsettings? I'm looking for similar >