Re: #10436 status

2009-09-16 Thread Tom Evans
On Wed, 2009-09-16 at 04:09 -0700, Aljosa Mohorovic wrote: > could somebody check ticket #10436? > is there some reason why patch for ticket #10436 is not in trunk? > > Aljosa Mohorovic It was committed 6 months ago? http://code.djangoproject.com/changeset/10030 Check your sources are up to

Re: Translation problem in from django.utils.translation.trans_real : get_language_from_request()

2009-09-22 Thread Tom Evans
On Tue, 2009-09-22 at 06:15 -0700, Lewis Taylor wrote: > I'm not sure if this has been discussed before, my guess is yes, > however i can't find anything about it. > > I noticed that the get_language_from_request method in trans_real only > checks whether the django.mo file for a given locale is

request.get_host() fails when behind multiple proxies (bug #11877)

2009-09-28 Thread Tom Evans
Hi I was hoping someone could take a look at this bug at some point, and make a decision about the best course of action to take. http://code.djangoproject.com/ticket/11877 Cheers Tom --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: 1.2 Feature Suggestion

2009-10-23 Thread Tom Evans
On Fri, 2009-10-23 at 16:30 +0200, Jonas Obrist wrote: > Oh... Well than consider this a 1.X suggestion. I've tried Rosetta > however it just doesn't seem to work Also I don't really like to use > 3rd Party apps for what I'd consider core functionality. I mean django > boasts with having ex

Re: Status of branch soc2009/http-wsgi-improvements? (and ticket 2131)

2010-02-10 Thread Tom Evans
On Wed, Feb 10, 2010 at 3:09 PM, Jari Pennanen wrote: > Hi! > > I was wondering what is the status of branch branches/soc2009/http- > wsgi-improvements ( > http://github.com/django/django/tree/soc2009/http-wsgi-improvements > )? I'm personally interested one bug it fixes, mainly ticket #2131 > (

Re: Status of branch soc2009/http-wsgi-improvements? (and ticket 2131)

2010-02-11 Thread Tom Evans
On Wed, Feb 10, 2010 at 7:24 PM, Forest Bond wrote: > Hi, > > On Wed, Feb 10, 2010 at 11:09:29AM -0800, mrts wrote: >> You don't need that fix to use efficient file serving. >> >> Just use an empty response and set the X-Sendfile header manually if >> using >> Apache. If not, check your server doc

Re: #12801 : Allow empty non-nullable ForeignKey fields until save()

2010-02-12 Thread Tom Evans
I think the easiest way of understanding the behaviour is that specifying a field like this: owner = models.ForeignKey(Owner) specifies a contract. The contract says that when you access this attribute on an instance, it will only return an instance of an Owner object or raise an DoesNotExist

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: Cache, Session and Auth Middleware and Vary: Cookie

2010-03-03 Thread Tom Evans
On Wed, Mar 3, 2010 at 9:50 AM, Tamas Szabo wrote: > Hi, > > I've just enabled caching for a Django application and it works great, but > there is a small problem. > > As you know, Session middleware adds a Vary: Cookie header to the response > and it is smart enough to do that only if the session

Re: dbsettings, and user configurable app settings

2010-03-11 Thread Tom Evans
On Wed, Mar 10, 2010 at 6:31 PM, Matt Boersma wrote: > On Wed, Mar 10, 2010 at 7:51 AM, Brian Rosner wrote: >> >> On Mar 10, 2010, at 7:16 AM, Joan Miller wrote: >> >>> It's a disaster from the maintenance view point. If it were not so, >>> then people would not be proposing to refactor the setti

Re: Regarding httponly cookies

2010-03-17 Thread Tom Evans
On Wed, Mar 17, 2010 at 3:42 PM, Yuchen Zhou wrote: > Hi, > > I'm a security researcher at the University of Virginia I have been > looking into the use and adoption of http-only cookies. My advisor is > professor David Evans. > > We were surprised to discover that Django does not explicitly suppo

Re: High Level Discussion about the Future of Django

2010-04-16 Thread Tom Evans
On Fri, Apr 16, 2010 at 11:02 PM, orokusaki wrote: >... > I think I speak for a pretty broad user base when I say that folks who > use Django are bleeding edge developers who want cool stuff, and don't > mind paying a little extra to have it. It isn't like IBM and Microsoft > are using Django for

Re: Process discussion: reboot

2010-04-19 Thread Tom Evans
On Mon, Apr 19, 2010 at 3:54 PM, Peter Landry wrote: > On 4/19/10 10:19 AM, "Jacob Kaplan-Moss" wrote: > >> Hi folks -- >> >> I'd like to try to reboot the discussion that's been going on about >> Django's development process. >> >> I'm finding the current thread incredibly demoralizing: there's

Re: Cujo .... an experimental branch of django.

2010-04-21 Thread Tom Evans
On Wed, Apr 21, 2010 at 6:14 PM, Tom X. Tobin wrote: > That said, we don't want to degrade the signal-to-noise ratio here, so > we'll be working off of the mailing list Kevin mentioned. > Presumably, you will be discussing anything you plan to merge from django-experimental to django-trunk on her

Re: Cujo .... an experimental branch of django.

2010-04-21 Thread Tom Evans
On Wed, Apr 21, 2010 at 7:14 PM, Tom X. Tobin wrote: > On Wed, Apr 21, 2010 at 1:08 PM, Tom Evans wrote: >> On Wed, Apr 21, 2010 at 6:14 PM, Tom X. Tobin >> wrote: >>> That said, we don't want to degrade the signal-to-noise ratio here, so >>> we'

Re: How can transmit variable and values to Django template other then Context?

2010-04-23 Thread Tom Evans
On Fri, Apr 23, 2010 at 8:38 AM, JohnHenry wrote: > Hi, all >    As I know, Django Templates got all variables through views > function with Context dict; But I read some source, There is some > variables like {{SITE_ROOT}} {{MEDIA_URL}} {{MEDIA_SERIAL}} > {{request}}  {{ user }}  {{siteconfig}} ;

Re: EmailMessage mangles body text

2010-04-28 Thread Tom Evans
On Wed, Apr 28, 2010 at 6:00 PM, Rob Hudson wrote: > Wouldn't these e-mails end up on other servers that might save the > message in a Unix mailbox format?  And if so, wouldn't removing the > ">" from the "From" cause problems? > > -Rob No - not unless the local MTA cannot handle storing messages

Re: Silently replaced session_key

2010-05-05 Thread Tom Evans
On Wed, May 5, 2010 at 10:24 AM, George Sakkis wrote: > On May 4, 11:05 pm, Jacob Kaplan-Moss wrote: > >> On Tue, May 4, 2010 at 3:11 PM, George Sakkis >> wrote: >> > Is this a bug or a feature ? >> >> Take a look at the source (django/contrib/sessions/backends/db.py; >> line 16 - the load() fu

Re: Newbie

2010-05-05 Thread Tom Evans
On Wed, May 5, 2010 at 7:16 AM, sujith h wrote: > Hi, > > I am newbie to django. And I had read the first 8 chapters of django from > the django book 2.0 > (http://www.djangobook.com/en/2.0/chapter02/). I would like to do code > contribute to django. > I had gone through some of the tickets in the

Re: django template revision (for 1.4?)

2010-05-27 Thread Tom Evans
On Thu, May 27, 2010 at 12:20 PM, Luke Plant wrote: > On Thursday 27 May 2010 03:21:43 Charlie Nolan wrote: > >> I'm all for streamlining the template system, because I think it's >> one of the less-intuitive aspects of Django at the moment (I think >> PHP has us beat, and that's really sad) > > C

Re: django template revision (for 1.4?)

2010-05-27 Thread Tom Evans
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#passing-template-variables-to-the-tag > [3] http://groups.google.com/group/django-developers/browse_thread/thread/18bca037f10769e9/cfd908f97b44e324?lnk=gst#cfd908f97b44e324 > [4] http://code.djangoproject.com/changeset/11806 > > > On

Re: django template revision (for 1.4?)

2010-05-27 Thread Tom Evans
On Thu, May 27, 2010 at 4:36 PM, Tom X. Tobin wrote: > On Thu, May 27, 2010 at 7:36 AM, Tom Evans wrote: >> Most PHP templating languages allow you to do things that are by >> design not in django's templating, for example in Smarty, one can >> assign new variables

Re: Proposal: Schema migration/evolution backend

2010-05-28 Thread Tom Evans
Slight typo here, I think: On Fri, May 28, 2010 at 12:06 PM, Andrew Godwin wrote: >  - Inside an application, migrations are implicitly ordered by name (by > string sort, so "0001_initial" is before "0002_second", and "alpha" is > before "beta", but "11_foo" is not before "2_bar"). '11_foo' woul

Re: Proposal: modular django configuration

2010-06-04 Thread Tom Evans
On Fri, Jun 4, 2010 at 4:54 PM, burc...@gmail.com wrote: > Hi Russell, > > I strongly disagree with your and Adrian vision of whether conventions > are good or not. > But I won't comment that any further. There are your political > decisions, and I have no single bit of control on them. > I know t

Re: Proposal: modular django configuration

2010-06-05 Thread Tom Evans
On Sat, Jun 5, 2010 at 9:58 AM, burc...@gmail.com wrote: > On Sat, Jun 5, 2010 at 2:08 PM, Russell Keith-Magee > wrote: >> On Sat, Jun 5, 2010 at 2:53 PM, burc...@gmail.com wrote: >>> On Sat, Jun 5, 2010 at 9:43 AM, Russell Keith-Magee >>> wrote: On Fri, Jun 4, 2010 at 11:54 PM, burc...@gm

Re: Proposal: modular django configuration

2010-06-07 Thread Tom Evans
On Sat, Jun 5, 2010 at 11:22 AM, burc...@gmail.com wrote: > These are exactly my hate patterns. > The goal of django-configurator was to get rid of them in the projects I have. So? Problem solved, you can run your projects in precisely the manner you choose, using your app. Why then do you

Re: Proposal: modular django configuration

2010-06-07 Thread Tom Evans
On Mon, Jun 7, 2010 at 12:28 PM, burc...@gmail.com wrote: > You have special person for configuring a project. I wish; just different hats for different tasks. > You will still be happy. Only because this sort of auto configuration will not be going into django, that much has been made abundant

Re: Proposal: modular django configuration

2010-06-07 Thread Tom Evans
On Mon, Jun 7, 2010 at 5:38 PM, Chris wrote: > On Jun 7, 10:45 am, Alex Gaynor wrote: >> On Mon, Jun 7, 2010 at 1:15 AM, Chris wrote: >> >> try: >> >>   from settings_local import * >> >> except: >> >>   # It's ok to not have any local settings. >> >>   pass >> >> > This pattern is used by almos

Re: Session overload

2010-06-11 Thread Tom Evans
On Fri, Jun 11, 2010 at 11:41 AM, jjmurre wrote: > Hi, > > I am using long living session in the database backend. Because of > Robots I am getting a huge amount of sessions. I googled if there is > some kind of Session middleware that does user-agent blacklisting and > does not create new session

Re: Class based generic views in 1.3?

2010-06-17 Thread Tom Evans
On Thu, Jun 17, 2010 at 1:05 PM, Roald wrote: > On 17 jun, 12:16, Patryk Zawadzki wrote: >> On Thu, Jun 17, 2010 at 11:53 AM, Roald wrote: >> > On 16 jun, 15:45, Ben Firshman wrote: >> >> The request is passed round so methods look like views to decorators. >> >> Magically dropping it for deco

Re: Making WSGIHandler the only handler / mod_python support

2010-06-23 Thread Tom Evans
On Wed, Jun 23, 2010 at 12:22 AM, Gustavo Narea wrote: > Hello, > > I'm going to work on some patches to improve WSGI support, and I found > something that, if changed, could make my patches and django.core.handlers > simpler... As well as make it possible to use WSGI middleware with Django > unde

Re: Suggestion of exception Http301 add as new feature

2010-06-28 Thread Tom Evans
On Mon, Jun 28, 2010 at 5:13 PM, Michael Cetrulo wrote: > that's incorrect, we're talking about exceptions that go back as status > codes not internals for the application itself. > django.core.exceptions.PermissionDenied is caught by BaseHandler::get_response() and converts it into a HttpRespons

Re: LOGIN_URL, LOGOUT_URL, LOGIN_REDIRECT_URL and SCRIPT_NAME.

2010-07-09 Thread Tom Evans
On Thu, Jul 8, 2010 at 3:40 PM, Russell Keith-Magee wrote: > Personally, I see this as a case of explicit vs implicit. > > As currently defined, LOGIN_URL points to the login URL. Period. > > Under the proposed patch, the onus is on every possible script to > ensure that the script prefix has been

Re: Adding Support for PyMySQL (for Python 3)

2011-12-08 Thread Tom Evans
On Wed, Dec 7, 2011 at 8:38 PM, Ian Clelland wrote: > Hi, all --- > > This is a proposal to add support in Django for PyMySQL[1] as an optional > replacement for MySQLdb. > > … > > PyMySQL is a pure python implementation of PEP 249 for MySQL, and supports > Python 2.4 - 3.2, and MySQL 4.1 and high

Re: Python 3 port - all MySQL tests now pass on 2.6.7 and 3.2.2 with the same codebase

2011-12-09 Thread Tom Evans
On Fri, Dec 9, 2011 at 4:17 PM, Ian Clelland wrote: > Unscientifically, trunk without the Python 3 patches runs 1.5% faster w/ > SQLite, 0.6% faster w/ MySQL. (based on a sample size of 1 :) ) > I know you put the word 'unscientifically' in there, but you can draw no conclusions from doing one ru

Re: Python 3 port - all MySQL tests now pass on 2.6.7 and 3.2.2 with the same codebase

2011-12-12 Thread Tom Evans
On Fri, Dec 9, 2011 at 7:43 PM, Joe & Anne Tennies wrote: > The thing is, we aren't trying to "scientifically correct" statistics. What > we're aiming to say is, "This is not so wildly different as to be of any > concern." We aren't looking for minor difference, but orders of magnitude > differenc

Re: Proposal: Logout user when they change their password.

2012-01-10 Thread Tom Evans
On Tue, Jan 10, 2012 at 4:18 PM, Arnoud van Heuvelen wrote: > I see your point. However, if a malicious user would change the password, at > least the original user would be logged out and not be able to log in again. > Now, that user knows something is going on and can notify a server admin who >

Re: Don't assume that missing fields from POST data are equal to an empty string value.

2012-01-11 Thread Tom Evans
On Wed, Jan 11, 2012 at 3:29 PM, Daniel Sokolowski wrote: > +1 even though I agree with what Babatunde said I support this change as > anything that minimizes a 'gotchas' during development is very good. I > raether get an exception instead of spending half an hour debuging why my > data is not be

Re: Don't assume that missing fields from POST data are equal to an empty string value.

2012-01-11 Thread Tom Evans
On Wed, Jan 11, 2012 at 3:38 PM, Andre Terra wrote: > +1 on a loud exception being raised. > > "Errors should never pass silently. > Unless explicitly silenced." > > > Cheers, > AT > So, look at the example I (just) posted. The 'error' is that the field-restricted form and template mistakenly don

Python 2.5 and pickling response objects

2012-01-20 Thread Tom Evans
Hi all I was recently affected in production by a python bug: http://bugs.python.org/issue826897 (also http://bugs.python.org/issue964868 , which refers to the problem with Cookie) The class affected by this bug is python's Cookie.Morsel. With the bug, each time the object is pickled/unpickled,

Re: auth.User usernames

2012-02-16 Thread Tom Evans
On Wed, Feb 15, 2012 at 10:37 PM, Donald Stufft wrote: > I know this has been discussed before, but I wanted to bring it up again in > light of the oncoming Djnago 1.4 beta. > > Can we increase the length of the username field in auth.User? > I think that a max_length of 75 (to match the default E

Re: auth.User usernames

2012-02-20 Thread Tom Evans
On Sat, Feb 18, 2012 at 4:25 AM, Tai Lee wrote: > It's not that hard to just set up a OneToOneField back to User, and > use signals to automatically create a User when you create your own > User/Profile. Then you can still make use of 3rd party apps that rely > on contrib.auth or contrib.sessions,

Re: How to create a new command in django-admin.py

2012-02-23 Thread Tom Evans
On Thu, Feb 23, 2012 at 1:22 PM, Johan wrote: > Hi > > I know how to create a new command in manage.py, this link explains it > nicely : > https://docs.djangoproject.com/en/dev/howto/custom-management-commands/#command-objects > . But how do I create new command which would be available in django

Improving docs for User.is_authenticated()

2012-02-23 Thread Tom Evans
Hi all I don't like this function that much. It doesn't actually check whether users are authenticated - which is to say, they have presented credentials which we have accepted and authorized them to use to the site. Instead it always returns true. is_not_anonymous_user() may be a better name. Us

Re: Newline stripping in templates: the dnl way

2012-02-24 Thread Tom Evans
On Fri, Feb 24, 2012 at 2:10 PM, Tobia wrote: > Hi all, > regarding issue #2594 "Template system should handle whitespace > better" explaining the need for some kind of (optional) whitespace > stripping from the output of templates, I've been looking at the > proposed solutions and compared them t

Re: Revisiting multiline tags

2012-02-24 Thread Tom Evans
On Fri, Feb 24, 2012 at 3:12 PM, Alex Gaynor wrote: > Folks, you seem to have missed Russell's point.  Even if 100 people +1 this, > it's meaningless.  That's a tiny fraction of this mailing list's readership, > much less of the Django community at large.  Django is the way it is > because, first

Re: Error while importing URLconf 'permitprint.urls': day is out of range for month

2012-02-29 Thread Tom Evans
On Wed, Feb 29, 2012 at 3:10 PM, furby wrote: > A site I built is breaking due to the leap year day, Feb. 29th.  The > error can be seen here: > > www.permitprint.com > > Any help resolving this would be appreciated.  I can't track down the > exception past the traceback. Do not post questions ab

Re: authentication by email

2012-03-09 Thread Tom Evans
On Fri, Mar 9, 2012 at 8:13 AM, Florian Apolloner wrote: >> Should these things really take five years? What happened to pragmatic? > > > Yes, since no one needs it. Okay no one isn't true, but no one (for true > this time) who needed it stepped up and said "I'll implement it and see that > it end

Re: authentication by email

2012-03-09 Thread Tom Evans
On Fri, Mar 9, 2012 at 3:36 PM, Luke Plant wrote: > What you are really saying is this: being pragmatic means that we > prioritise *your* immediate need above the need to keep the code and the > docs maintainable, and above the need to maintain compatibility with > existing installations. > > Ther

Re: authentication by email

2012-03-09 Thread Tom Evans
On Fri, Mar 9, 2012 at 3:52 PM, Luke Plant wrote: > On 09/03/12 14:49, Tom Evans wrote: > >>> Yes, since no one needs it. Okay no one isn't true, but no one (for true >>> this time) who needed it stepped up and said "I'll implement it and see that >&

Re: authentication by email

2012-03-09 Thread Tom Evans
2012/3/9 Łukasz Rekucki : > On 9 March 2012 17:46, Tom Evans wrote: >> >> Lets look at one isolated aspect. The User email field in d.c.auth is >> too short. Emails can be up to 248 characters long, and d.c.auth only >> allows 75. > > The latest RFC[1] actually sp

Re: authentication by email

2012-03-16 Thread Tom Evans
On Thu, Mar 15, 2012 at 4:49 PM, Carl Meyer wrote: > Hi Daniel, > > On 03/15/2012 09:24 AM, Daniel Sokolowski wrote: >> Why can we not just increase the length limit on the username field?, >> Why can't we just throw a validation error if data entered is to long >> and the schema has not been upda

Re: auth.User refactor: reboot

2012-03-16 Thread Tom Evans
On Fri, Mar 16, 2012 at 4:53 PM, Jacob Kaplan-Moss wrote: > Hi folks -- > […] I'm not in favour of pluggable user models, as for me, they solve the wrong problem. A pluggable user model has to be set up by the project developer, whilst the attributes an app may need are specified solely by the ap

Re: auth.User refactor: reboot

2012-03-20 Thread Tom Evans
On Sat, Mar 17, 2012 at 5:59 AM, Russell Keith-Magee wrote: > Ok - I've been keeping quiet on this; partially due to the same tone issues > that you've described, but also because I don't have a huge amount of spare > time at the moment, and I don't want to be the person who makes a bunch of >

Re: auth.User refactor: reboot

2012-03-20 Thread Tom Evans
On Tue, Mar 20, 2012 at 1:37 PM, Russell Keith-Magee wrote: > > On 20/03/2012, at 8:38 PM, Tom Evans wrote: >> >>>  * It's completely backwards compatible. >>> >>> If you've got an existing app with normal ForeignKeys to auth.User, >>>

Re: auth.User refactor: reboot

2012-03-20 Thread Tom Evans
On Tue, Mar 20, 2012 at 5:17 PM, Alex Ogier wrote: >> Would something like the following alleviate that problem? >> >> class User(models.Model): >>    if settings.USE_LONG_USER_FIELDS: >>        username = models.CharField(max_length=255, unique=True, ...) >>    else: >>        username = models.C

Re: auth.User refactor: reboot

2012-03-20 Thread Tom Evans
On Tue, Mar 20, 2012 at 5:41 PM, Donald Stufft wrote: > What Alex said. If it was _just_ the username then you'd have a good > argument for > a setting like that. However there's username, email, some people want to > add > fields, some want to get rid of, or combine fields. Ideally any change wou

Re: auth.User refactor: reboot

2012-03-20 Thread Tom Evans
On Tue, Mar 20, 2012 at 6:02 PM, Donald Stufft wrote: > So you fix the problem for the people who agree that username should be > longer, and that email > should be longer, but not the people who feel that email should be longer > but username is fine? > > Those settings do not feel any cleaner to

Re: Tagging 1.4 django release in Subversion

2012-03-26 Thread Tom Evans
On Sun, Mar 25, 2012 at 12:02 PM, Florian Apolloner wrote: > Hi, > > it's not tagged yet on purpose. > > Cheers, > Florian > Out of interest, is there any documentation of the release process? I'm also intrigued how you have a release tarball before you have tagged the release! Cheers Tom --

Re: [GSoC 2012] Enhanced contrib.auth

2012-03-30 Thread Tom Evans
On Fri, Mar 30, 2012 at 10:39 AM, Stratos Moros wrote: > You can read the proposal nicely formatted here: > https://gist.github.com/8dd9fb27127b44d4e789 Hi Stratos It's a long proposal, so this is a brain dump of bits that I find interesting/worrisome. I'm sure you've followed the recent thread

Re: Proposal: upgrading the choices machinery for Django

2012-04-04 Thread Tom Evans
2012/4/3 Łukasz Langa : > A nice HTML rendering of this proposal is available at: > http://lukasz.langa.pl/2/upgrading-choices-machinery-django/ Disclaimer: all my code currently looks like 'Way 3'. In general, I like it. There are a few things I don't like in it: The class definition grates. Wh

Re: Proposal: upgrading the choices machinery for Django

2012-04-05 Thread Tom Evans
2012/4/4 Łukasz Langa : > Wiadomość napisana przez Tom Evans w dniu 4 kwi 2012, o godz. 18:40: > >> The class definition grates. When we say things like: >> >>  class Gender(Choices): >>    male = Choice("male") >> >> That says to me that Gende

Re: auth.user refactor: the profile aproach

2012-04-10 Thread Tom Evans
On Fri, Apr 6, 2012 at 7:31 PM, Alex Ogier wrote: > Tai, read https://gist.github.com/2289395 for a summary of many reasons why > I think profiles are a bad idea, and unifying multiple profiles is an even > worse idea. > > Best, > Alex Ogier Hi Alex Is https://gist.github.com/2289395 the complet

Re: auth.user refactor: the profile aproach

2012-04-10 Thread Tom Evans
On Tue, Apr 10, 2012 at 3:13 PM, Ian Lewis wrote: > Hi, > > I'm not getting why you *have* to add fields to the User model to store data > pertaining to the user. There is nothing in the proposal for pluggable user > models that says you can never have a seperate model with a foreign key to > the

Re: auth.user refactor: the profile aproach

2012-04-13 Thread Tom Evans
On Tue, Apr 10, 2012 at 6:04 PM, Alex Ogier wrote: > Hi Tom, > > The best rounded description with pros and cons is Solution 2a on > https://code.djangoproject.com/wiki/ContribAuthImprovements > > You are correct that I am primarily thinking of pluggable authentication > when I think of this new u

Allowing formsets to contribute kwargs to forms they create

2012-04-24 Thread Tom Evans
Hi all I raised a ticket about this new feature, with patch: https://code.djangoproject.com/ticket/18166 I'd quite like to quickly either complete this or dump the idea. Opinions? Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django developers" gr

Re: Allowing formsets to contribute kwargs to forms they create

2012-04-24 Thread Tom Evans
On Tue, Apr 24, 2012 at 3:23 PM, Andrew Ingram wrote: > I've had the need for this quite frequently, Whenever I'm using a > custom form class with modelformset_factory I almost always end up > having to define a custom formset class that does nothing except pass > an extra kwargs (usually user) to

Re: Will django escaping ever consider context of javascript and CSS?

2012-05-03 Thread Tom Evans
On Fri, Apr 27, 2012 at 11:58 PM, Voulnet wrote: > Hello provides great protection from XSS by escaping output to > webpages, but it only does it in HTML context. XSS can be executed > when user input is inserted into javascript or CSS, which have > different context and rules than HTML, so HTML c

Possible session key creation regression in 1.4

2012-05-16 Thread Tom Evans
Hi all One of our sites was recently upgraded to 1.4 and now some previously working code is failing. The code tries to access and utilize the session id from the user, but if it tries to do this on the request the session is created on, the session id is None. The equivalent session object in 1.

Re: Exception Middleware not run [was Re: Subclass handle_uncaught_exception]

2012-05-16 Thread Tom Evans
On Wed, May 16, 2012 at 12:32 PM, Rory Campbell-Lange wrote: > I'm obviously whistling in the breeze here, but I'd be very grateful for > some help. I've provided some more info below. > > I have a view raising a specific exception I would like to catch and > provide an HttpResponse based on this

Re: Possible session key creation regression in 1.4

2012-05-16 Thread Tom Evans
On Wed, May 16, 2012 at 4:38 PM, Aymeric Augustin wrote: > 2012/5/16 Tom Evans : >> So, is the session key being available part of the API, or is relying >> on the session key existing incorrect? > > Hi Tom, > > Accessing the session key before saving the session is in

Re: Exception Middleware not run [was Re: Subclass handle_uncaught_exception]

2012-05-17 Thread Tom Evans
On Thu, May 17, 2012 at 9:51 AM, rorycl wrote: > Hi Tom > > Thanks for your email. > > On May 16, 4:14 pm, Tom Evans wrote: >> On Wed, May 16, 2012 at 12:32 PM, Rory Campbell-Lange >> >> wrote: > >> > I have a view raising a specific except

Re: Possible session key creation regression in 1.4

2012-05-18 Thread Tom Evans
On Wed, May 16, 2012 at 4:38 PM, Aymeric Augustin wrote: > 2012/5/16 Tom Evans : >> So, is the session key being available part of the API, or is relying >> on the session key existing incorrect? > > Hi Tom, > > Accessing the session key before saving the session is

Re: Possible session key creation regression in 1.4

2012-05-18 Thread Tom Evans
On Fri, May 18, 2012 at 10:51 AM, Tom Evans wrote: > On Wed, May 16, 2012 at 4:38 PM, Aymeric Augustin > wrote: >> 2012/5/16 Tom Evans : >>> So, is the session key being available part of the API, or is relying >>> on the session key existing incorrect? >> &g

Re: Possible session key creation regression in 1.4

2012-05-18 Thread Tom Evans
On Fri, May 18, 2012 at 1:38 PM, Aymeric Augustin wrote: > Le 18 mai 2012 à 11:51, Tom Evans a écrit : > >> On Wed, May 16, 2012 at 4:38 PM, Aymeric Augustin >> wrote: >>> 2012/5/16 Tom Evans : >>>> So, is the session key being available part of the API

Re: URL dispatcher slow?

2012-10-11 Thread Tom Evans
On Thu, Oct 11, 2012 at 7:02 AM, Yo-Yo Ma wrote: > Why does every conversation about Django's performance met with "GTFO we > don't care"? (that was a rhetorical question :). I'd venture to guess that > most "It's fast enough for me!" responses are predicated on experiences that > can be likene

Re: URL dispatcher slow?

2012-10-11 Thread Tom Evans
On Wed, Oct 10, 2012 at 7:52 AM, Moonlight wrote: > Here is an article comparing various URL dispatchers: > > http://mindref.blogspot.com/2012/10/python-web-routing-benchmark.html > > What cause django URL dispatcher that much... slow? > Now that I've looked in detail at the test, it is because t

Re: URL dispatcher slow?

2012-10-12 Thread Tom Evans
On Thu, Oct 11, 2012 at 2:53 PM, Tom Evans wrote: > On Wed, Oct 10, 2012 at 7:52 AM, Moonlight wrote: >> Here is an article comparing various URL dispatchers: >> >> http://mindref.blogspot.com/2012/10/python-web-routing-benchmark.html >> >> What cause django

Re: URL dispatcher slow?

2012-10-12 Thread Tom Evans
On Thu, Oct 11, 2012 at 10:58 PM, Łukasz Rekucki wrote: > On 11 October 2012 10:20, Russell Keith-Magee wrote: >> >> And don't just say "Why are Django's URL resolvers slow?". Do some >> profiling, and come back with an analysis of where the time is being >> spent and/or wasted. > > FWIW, here's

Re: A.objects.getdefault

2012-10-15 Thread Tom Evans
On Mon, Oct 15, 2012 at 1:42 PM, Anssi Kääriäinen wrote: > On 10/15/2012 03:13 PM, Ole Laursen wrote: > > On Friday, October 12, 2012 3:35:53 PM UTC+2, Chris Wilson wrote: >> >> I'm strongly in favour of a simple, obvious way to do the common thing, >> which is to return None if the object doesn't

Re: Feature Request: Support for abstract models in ModelForm

2012-11-14 Thread Tom Evans
On Tue, Nov 13, 2012 at 7:04 PM, Rohit Banga wrote: > I have some abstract models and I have created several concrete > implementations of each of these models. The usecase is create multiple sets > of tables across each having the same set of fields. When I use abstract > models for modelforms it

Re: Django and South

2012-11-20 Thread Tom Evans
On Tue, Nov 20, 2012 at 4:29 AM, Лебедев Илья wrote: > I've realized that django has no migration tool in development and that > looks weird for me. Everybody use South, but django neither includes it in > contrib nor uses it in development. > What's the big deal? Can someone please explain. http

Re: Yet another __ne not equal discussion

2012-11-30 Thread Tom Evans
On Fri, Nov 30, 2012 at 1:29 PM, Marek Brzóska wrote: > Has the matter been completely put away? > > I would like to bring it up again. > > I have Articles and Categories. An Article belongs to Categories: > > class Category(model): > pass > class Article(model): > category = ManyToManyField(C

Re: Yet another __ne not equal discussion

2012-11-30 Thread Tom Evans
On Fri, Nov 30, 2012 at 2:51 PM, Marek Brzóska wrote: > > > > 2012/11/30 Tom Evans >> >> On Fri, Nov 30, 2012 at 1:29 PM, Marek Brzóska >> wrote: >> > Has the matter been completely put away? >> > >> > I would like to bring it up ag

Re: [ANNOUNCE] Security releases (Django 1.3.5, Django 1.4.3, Django 1.5 beta 2)

2012-12-11 Thread Tom Evans
On Mon, Dec 10, 2012 at 10:38 PM, James Bennett wrote: > Django 1.3.5, Django 1.4.3 and Django 1.5 beta 2 have just been issued > in response to security issues. > > Details are available here: > > https://www.djangoproject.com/weblog/2012/dec/10/security/ > Is the second part of the fix in any w

Re: Django 1.1 is not installable

2012-12-18 Thread Tom Evans
On Wed, Dec 12, 2012 at 3:56 PM, Michael Elsdörfer wrote: > $ pip install django==1.1 If you mean "The most recent point release in the 1.1 family", then that is "Django>1.1,<1.2"*. If you mean 1.1.1, then that is "Django==1.1.1" Cheers Tom * If you are using pypi, then "Django<1.2" will do th

Re: postgresql range types v2

2013-01-18 Thread Tom Evans
On Thu, Jan 17, 2013 at 10:08 PM, Russell Keith-Magee wrote: > The other thing I'd suggest is to look at others doing similar work. For > example, Zachary Voase has been working on extensions to Django's PostgreSQL > backend to support a whole lot of extra PostgreSQL features[1]. From the > look o

Documenting lazy() and memoize()

2013-03-11 Thread Tom Evans
Hi all Someone just asked on users@ "How do I reverse a URL inside settings.py". I gave a solution (eventually; got it wrong the first time!) using two functions from django.utils.functional, lazy() and memoize(). Neither of these two functions are documented. and so aren't part of the API - real

Re: Documenting lazy() and memoize()

2013-03-15 Thread Tom Evans
On Mon, Mar 11, 2013 at 2:50 PM, Tom Evans wrote: > Hi all > > Someone just asked on users@ "How do I reverse a URL inside > settings.py". I gave a solution (eventually; got it wrong the first > time!) using two functions from django.utils.functional, lazy() and > mem

Re: URL dispatcher fallthrough?

2013-03-19 Thread Tom Evans
On Mon, Mar 18, 2013 at 3:23 PM, julianb wrote: > Hi, > > imagine the following use case: > > You build an online store where you have sorted products into several > categories and maybe associated an occasion. Now you want to build URLs. So > the URL schema that all of the store's owners agree on

Re: Ticket 20147 - deprecate and replace request.META

2013-04-09 Thread Tom Evans
On Mon, Apr 8, 2013 at 9:02 PM, Luke Plant wrote: > Hi all, > > This is already the subject of a ticket, but I didn't get a response > yet. Basically, the idea is replace things like: > > request.META['HTTP_ACCEPT'] > > with > > request.HEADERS['Accept'] > > request.META should be deprecated a

Re: [GSoC 2013] Revamping validation functionality proposal

2013-04-26 Thread Tom Evans
On Fri, Apr 26, 2013 at 8:54 AM, Christopher Medrela wrote: > Thank you for your feedback. I really appreciate every comment because that > let me improve my proposal. > > 1. First of all, I noticed that the license of django-secure is copyright. > Google forces us to release code under one of app

Re: Perception of attitude in tickets

2013-05-13 Thread Tom Evans
On Mon, May 13, 2013 at 3:51 AM, Russell Keith-Magee wrote: > My apologies if I wasn't clear - that wasn't what I was saying at all. What > I meant is that we can't institute a process like "Every core developer must > spend 4 hours per week triaging tickets or they will lose their core > develope

Re: Perception of attitude in tickets

2013-05-13 Thread Tom Evans
On Mon, May 13, 2013 at 4:10 PM, Jacob Kaplan-Moss wrote: > Hi Tom -- > > It really sucks that when I say "if you have feedback please send it > over here", you hear "I'm not listening". > > I'm sorry, but I don't have the mental bandwidth to follow 20,000 > individual tickets. It's impossible. I

Re: Settings: lists or tuples?

2015-02-19 Thread Tom Evans
On Thu, Jan 22, 2015 at 12:32 PM, Andreas Kahnert wrote: > Hi again, > Well, I can acknoledge that your reasons for list (beginner friendly) are as > good as my reasons for tuples (seems to be more logical choice for things > that are static). To say it in other words, my idea was simply: Use tupl

Re: Testing email settings

2015-02-27 Thread Tom Evans
On Fri, Feb 27, 2015 at 9:01 AM, aRkadeFR wrote: > Hello, > > I've written couple of time similar command for my project too. > > But if I take a step back, these commands (for my projects) are > only here to test that my SMTP settings are well setup. Thus, > the test sending email is quite unnece

Re: A general way to batch SQL queries in Django

2015-02-27 Thread Tom Evans
On Fri, Feb 27, 2015 at 3:19 PM, aRkadeFR wrote: > What do you mean by a single roundtrip? He means asking the database server to consider multiple queries (concurrently?), and return data once all of them are available. In pseudo code: people, jobs, cities = DB.fetch_multi( Pers

Re: Two phase cleaning of models/forms

2015-04-02 Thread Tom Evans
On Wed, Mar 25, 2015 at 9:37 AM, Thomas Güttler wrote: > Up to now the validation/cleaning of a attribute can not access the > value of an other attribute. > > The work around is to override the clean() method of the form/model. > > A team mate and I talked about it, and we asked ourself, if > a t

Re: Pass exception to error handlers

2015-04-22 Thread Tom Evans
On Wed, Apr 22, 2015 at 3:05 PM, Tim Graham wrote: > I have some concerns from a security standpoint. For example, some exception > messages are definitely not meant to be displayed to end users and may leak > server implementation details. For example: This is saying you can't have a gun because

Re: An easier path to upgrade from one LTS release to another

2015-05-07 Thread Tom Evans
On Thu, May 7, 2015 at 9:04 AM, Abdullah Esmail wrote: > Hello, > I apologize if this has been discussed already. I searched the topics, but > didn't find anything. > First, I'd like to thank all of you for the truly amazing framework. I've > been using django since 1.0 and it made my life much mo

  1   2   3   >