Re: Logging facility for Django

2007-04-22 Thread Jeremy Dunck
On 4/22/07, Fraser Nevett <[EMAIL PROTECTED]> wrote: ... > I'm sure I'm not alone in using simple print statements to trace/log Huzzah, you've knocked something off my to-do list. :) I've read the doc but not yet the code. My immediate feedback is that it'd be nice to have a convention of logg

Attn Malcolm: unicode serialization

2007-05-04 Thread Jeremy Dunck
Malcolm, I noticed that Django's current serialization doesn't deal with unicode well. When using MySQLdb with utf8 as the encoding, charfields return unicode objects. base.get_string_field breaks because it calls str() on the field, forcing python to use sys.getdefaultencoding(). As a res

Caching querysets

2007-05-14 Thread Jeremy Dunck
I'd like to propose an addition to the low-level caching API that fills the queryset _result_cache if the value being set (or contained in a sequence or dictionary being set) is a queryset. Consider that before magic-removal, the ORM returned actual lists, so that something like this was producti

Re: Caching querysets

2007-05-15 Thread Jeremy Dunck
On 5/14/07, Gary Wilson <[EMAIL PROTECTED]> wrote: > > Jeremy Dunck wrote: > > Do people think it's worth doing? > > Have you seen the (accepted) object-level caching summer of code project? I hadn't. I think that's lovely functionality and a pretty

Re: Caching querysets

2007-05-15 Thread Jeremy Dunck
On 5/14/07, Ben Ford <[EMAIL PROTECTED]> wrote: > How about caching the return of qs.iterator()? Would that work? > Ben I'm afraid not; that returns a generator which relies on an active cursor with the database; the behavior of trying to iterate that at an arbitrarily later time would depend on

Field.contribute_to_class and contrib fields

2007-05-15 Thread Jeremy Dunck
In the gis work, we'd like to contribute a fair bit of additional functionality to GIS fields and models with GIS fields. So far, field contributions seem to be largely done by adding attributes to the model, such as FileField's get_%s_url. I think this approach may just be legacy from the old c

Re: Trac component for GIS branch?

2007-05-17 Thread Jeremy Dunck
Done. :) On 5/17/07, Robert Coup <[EMAIL PROTECTED]> wrote: > > Hi powerful-ones, > > Any chance of getting a Trac component created for the > django.contrib.gis stuff? > > Cheers > > Rob :) > > > > --~--~-~--~~~---~--~~ You received this message because you are s

Re: MSSQL, and "Incorrect syntax near 'DEFERRABLE'"

2007-05-18 Thread Jeremy Dunck
On 5/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > Any ideas? SQL Server is not really supported. Support is desired by many, but no one has committed to establishing and maintaining support. Example threads: http://groups.google.com/group/django-developers/search?q=sql+server&start

Re: MSSQL, and "Incorrect syntax near 'DEFERRABLE'"

2007-05-18 Thread Jeremy Dunck
On 5/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Sad... I'm wondering if anyone has it working in a somewhat stable > state- I'm running SQL 2005 if that helps at all... Those threads have reports of various levels of success. And yes, running 2005 does help since one of the nagging

Re: Django Wiki

2005-08-02 Thread Jeremy Dunck
On 8/2/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > Also, this means we need some "gardeners" who help us keep the > spammers at bay; obviously anyone can do it, but if someone(s) wants > to volunteer to spend some energy keeping the wiki pretty and clean > I'd much appreciate it. Since it

Re: Transaction syntax

2005-08-09 Thread Jeremy Dunck
On 8/9/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > How does this look? Any pitfalls we're neglecting to see? > I'm a big fan of transaction transparency. I prefer my domain code not having to know it's in a transaction. I specifically wrote a TransactionalConnection class for .Net to addr

Re: Transaction syntax

2005-08-10 Thread Jeremy Dunck
On 8/10/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > Now, I'm not sure I can coherently articulate an example where this > would be useful, but I know I've seen code in the past that required > this feature. I actually don't know of any DBs that allow concurrent transactions on the same con

Trac exception

2005-08-16 Thread Jeremy Dunck
I was trying to view this: http://code.djangoproject.com/ticket/4 when I got this: " Oops... Trac detected an internal error: database is locked Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/trac/core.py", line 531, in cgi_start real_cgi_start() File "/usr/li

Re: Trac exception

2005-08-16 Thread Jeremy Dunck
Seems to have been momentary... but you probably still want to know about it. :) On 8/16/05, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > I was trying to view this: > http://code.djangoproject.com/ticket/4 > > when I got this: > " > Oops... > > Trac detected

Re: Ticket #122 - Rationale for changing, or not changing, model syntax

2005-08-19 Thread Jeremy Dunck
On 8/19/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > integrate with the admin interface. What I mean is this: given a > model with a standard integer primary key, the admin URL is something > like ``/app/module/14/``. It's also simple if the object has a non- > integer key; something like

Trac-svn integration seems broken

2005-08-25 Thread Jeremy Dunck
Just in the last few minutes, it seems that Trac is no longer talking to svn. For example, this page doesn't show any timeline info: http://code.djangoproject.com/timeline/ Whereas a few minutes ago, it showed the changeset for ticket 122.

Re: Trac-svn integration seems broken

2005-08-25 Thread Jeremy Dunck
OK, it's back. Must've been the broken sql connection Adrian explained earlier.. just no error message this time. On 8/25/05, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > Just in the last few minutes, it seems that Trac is no longer talking to svn. > > For example, t

Re: Trac-svn integration seems broken

2005-08-25 Thread Jeremy Dunck
On 8/25/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 8/25/05, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > OK, it's back. Must've been the broken sql connection Adrian > > explained earlier.. just no error message this time. > > Jacob

Re: Django "add-ins": blog, discussion board, wiki, etc.

2005-09-02 Thread Jeremy Dunck
On 9/1/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > The man to talk to is Wilson Miner, [EMAIL PROTECTED], who's also the > guy who designed Django's admin and djangoproject.com. I assume source is included, and modification rights are granted?

Re: Idea: "fake" model fields

2005-09-16 Thread Jeremy Dunck
On 9/16/05, Simon Willison <[EMAIL PROTECTED]> wrote: > tagfield = meta.FakeCharField() > def load_tagfield(self): > # Returns the contents of the field when it is displayed > def save_tagfield(self, value): ... Instead of Fake*, I suggest Deferred, or Mapped*, or Extended*.

Re: Added MS SQL Server DB support: Testers wanted!

2005-10-14 Thread Jeremy Dunck
On 10/14/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > * Run the Django unit tests with SQL Server as the backend. Just run > tests/runtests.py ... > The more eyes we get on this one, the sooner we can make sure it's > solid. Thanks for any help! I have Sql Server at work, and can test this e

Re: Added MS SQL Server DB support: Testers wanted!

2005-10-15 Thread Jeremy Dunck
On 10/15/05, Luke Plant <[EMAIL PROTECTED]> wrote: > > Queries with LIMIT and/or OFFSET probably won't work, because SQL > > Server appears to use "SELECT TOP" instead of LIMIT/OFFSET. Elegant > > solutions to this problem are welcome. :) > > From what I know from one of the more experienced MS SQ

Re: MS SQL date vs. datetime problem

2005-10-22 Thread Jeremy Dunck
On 10/22/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > What you need to do is make sure the driver typecasts datetime > database fields to Python datetime.date objects, and date database > fields to Python datetime.date objects. Some database drivers do this > automatically, but others provide

Ticket 683

2005-10-22 Thread Jeremy Dunck
I've added a half-patch to ticket 683. I don't understand all the magick going down in meta and models, but I hope the bit I did was useful.

Ping on ticket 683

2005-10-25 Thread Jeremy Dunck
http://code.djangoproject.com/ticket/683 This seems like a kinda-significant bug when dealing with many columns where field.db_column <> field.name. Basically, foreign keys don't work. If it's not seen as a priority, OK, but I wanted to make sure it hadn't merely slipped under the radar.

Re: FYI: Oracle has free edition now

2005-11-01 Thread Jeremy Dunck
On 11/1/05, Ian Holsman <[EMAIL PROTECTED]> wrote: > > I guess I'm a bit ho-hum about it. > > why? > > 4G limit > single process > no replication > 32 bit only > and a expensive upgrade path I think this was a direct response to MySql 5.0 supporting views/procs etc. And MS has had MSDE for a whi

Re: Small report from Django/Rails meetup

2005-11-08 Thread Jeremy Dunck
On 11/8/05, Pedro Furtado <[EMAIL PROTECTED]> wrote: > Don`t you agree this is an imprescindible > update? I dunno what imprescindible means. :)

Re: Small report from Django/Rails meetup

2005-11-08 Thread Jeremy Dunck
On 11/8/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > * Screencasts so fucking exciting you'll cry. I'll stock up on gatorade.

Re: Small report from Django/Rails meetup

2005-11-09 Thread Jeremy Dunck
On 11/9/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 11/9/05, hugo <[EMAIL PROTECTED]> wrote: > > I would say: release a 0.9 version now (or in the near future) and give > > a clear roadmap (that's what the trac feature is for ;-) ) of what will > > go into 1.0 before release. That way pe

Re: Django and "AJAX" (was: Re: Small report from Django/Rails meetup)

2005-11-14 Thread Jeremy Dunck
On 11/14/05, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > Nah, it would take all fun from bashing. :-) What kind of code do want to > see for negative statements? > Failing tests.

Re: Django Ajax (WAS: Re: Small report from Django/Rails meetup)

2005-11-14 Thread Jeremy Dunck
On 11/14/05, Maniac <[EMAIL PROTECTED]> wrote: > But I think this whole approach is wrong and should not be supported. > There are certain reasons behind separating server and client part and > wishing to break this barrier smells like a bad design to me. If Django > will make such things easy the

Re: Django Ajax (WAS: Re: Small report from Django/Rails meetup)

2005-11-16 Thread Jeremy Dunck
On 11/15/05, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > Now I am confused. AJAX stands for Asynchronous JavaScript And XML. But > "AJAX effects" == visual effects? You have to publish your own dictionary, There's a disconnect between the code monkeys and the designers. Remote scripting's bee

Re: A fix for all that futzing around with paths

2005-11-18 Thread Jeremy Dunck
On 11/18/05, Simon Willison <[EMAIL PROTECTED]> wrote: > > On 18 Nov 2005, at 18:26, David Ascher wrote: > > > It's very possible that the use case it supports (repeatedly > > switching b/w projects when invoking django-admin.py) isn't > > frequent enough to warrant the increased complexity. > > I

Re: Removing the magic

2005-12-06 Thread Jeremy Dunck
On 12/6/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > Thoughts? > > http://code.djangoproject.com/wiki/RemovingTheMagic > > Please comment here rather than on the wiki. As (my) knee-jerk reaction, don't take Aaronsw's criticism so much to heart. :) He's got some points, but his is just one

Re: Decoupling core Django handler from database

2005-12-15 Thread Jeremy Dunck
On 12/15/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > Currently, the core handlers (modpython.py and wsgi.py in > django/core/handlers/) wrap the main request handling in a > try/finally, where the "finally" part closes the database connection. > Obviously, this couples the handler to a data

Re: Dojo Licensing

2005-12-28 Thread Jeremy Dunck
On 12/28/05, Tom Tobin <[EMAIL PROTECTED]> wrote: > IANAL, but it is my understanding that one can > only relicense code if the new license's terms are a superset of the > old license's terms. IANAL either, but my understanding, after reading AFL and BSD and GPL is that AFL is basically BSD with

Re: magic-removal: "Change subclassing syntax"

2006-01-25 Thread Jeremy Dunck
On 1/25/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 1/25/06, Jason Davies <[EMAIL PROTECTED]> wrote: > > I think that's the best we've got. Is it worth creating a wiki page? > > Yeah, let's collect the design decisions and code examples on a wiki page. This makes me think the world nee

Re: magic-removal: "Change subclassing syntax"

2006-01-26 Thread Jeremy Dunck
On 1/25/06, Max Battcher <[EMAIL PROTECTED]> wrote: > I've seen a home-brew Zope-based one. It would be real quick to build > one as a django app... In fact its own my personal project todo list. > How soon do you want it? :-) Mine, too, but you may get to it first. As Soon As Our Copious Fre

Typo on magic-removal sql migration script?

2006-01-27 Thread Jeremy Dunck
I haven't been following the magic removal branch closely, but here: http://code.djangoproject.com/wiki/RemovingTheMagic There is a migration script for mysql. This line looks wrong: ALTER TABLE auth_groups_permissions RENAME TO auth_group_permissions; Rename to the same name? Perhaps: ALTER TA

Django sprint agenda?

2006-02-03 Thread Jeremy Dunck
What's on the board for the pycon sprint? Auth back ends? Components? More DBs supported? I'm not going to be familiar with all of django's code, so having some place to focus on would be good...

Django Reinhardt video

2006-02-16 Thread Jeremy Dunck
http://www.boingboing.net/2006/02/16/django_reinhardt_vid.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To uns

Re: Django sprint at PyCon

2006-02-27 Thread Jeremy Dunck
On 2/27/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: ... > On other Open Source projects I've worked on, there has been a way to > indicate in the bug tracking system that a patch was attached to a > report. Either by adding [patch] to the title or setting a "patch" > keyword or something sim

Re: add(), remove(), and clear() on ManyRelatedObjectsDescriptor for ForeignKeys

2006-02-27 Thread Jeremy Dunck
On 2/27/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On 2/27/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > > > This sounds great to me. Go for it! > > Ok - I've just committed these changes (r2409). I added a ticket for this: http://code.djangoproject.com/ticket/1407 and am adding

Re: Schema evolution

2006-02-28 Thread Jeremy Dunck
On 2/28/06, Christopher Lenz <[EMAIL PROTECTED]> wrote: > Actually, PySQLite 2.x does an implicit commit after any DDL > statement. I don't think this is enforced at the SQLite level, but > supposedly the PySQLite author had reasons to do this in the bindings. Do you know what the reasons were, o

Re: What if instead of calling them "projects" we called them "sites"?

2006-03-02 Thread Jeremy Dunck
On 3/2/06, Sean Perry <[EMAIL PROTECTED]> wrote: > I am definitely -2 on this. Malcolm does a good job of starting the ball > rolling as to why. The range is -1..+1 ;-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Tutorial updates for magic removal

2006-03-03 Thread Jeremy Dunck
http://code.djangoproject.com/ticket/1464 I finished tutorial01.txt update, but didn't get to the others. Very sorry. If not completed when I get back in town (3/15) I'll pick up where I left off. Cheers, Jeremy --~--~-~--~~~---~--~~ You received this mes

Re: Offering help with MSSQL backend

2006-03-21 Thread Jeremy Dunck
On 3/21/06, Matt Good <[EMAIL PROTECTED]> wrote: > Jeremy, thanks for uploading my patch. I though you'd be interested to > know that I recently contacted the pymssql authors and they've agreed to > relicense it under the LGPL instead of the GPL, so it should be usable > in Django. Keep an eye o

Improving test data experience

2011-11-30 Thread Jeremy Dunck
Hi all, I've got a codebase with a fair bit of fixtures and have been experiencing some pain around it. One of the pains is migrating the format of fixtures when a schema change occurs. I posted a thread to south-users to discuss the idea of adding a feature to aid applying migrations to fixt

Re: Improving test data experience

2011-11-30 Thread Jeremy Dunck
On Wed, Nov 30, 2011 at 11:30 PM, Aymeric Augustin wrote: ... > In my current job we're using https://github.com/rbarrois/factory_boy, we've > dropped all but the most trivial fixtures (sites, languages, an admin user), > and we haven't looked back. Nifty, thanks. -- You received this message

Re: Improving test data experience

2011-11-30 Thread Jeremy Dunck
On Wed, Nov 30, 2011 at 2:26 PM, Adrian Holovaty wrote: > Just to be clear, how would you get the "diff" of what's changed? > Would it automatically change the fixture files after you close the > shell session? Or would that be up to you? Yes, I was thinking of catching SystemExit, KeyboardI

Sprint in San Francisco

2011-12-02 Thread Jeremy Dunck
Hey all, With the 1.4 release coming up, I thought it'd be a good time to schedule a sprint to get in any ponies or help shake out bugs. I'm in San Francisco these days, which I hear is an OK place to try to host a sprint. Given the holidays coming up shortly, I was planning for just after th

Re: Sprint in San Francisco

2011-12-03 Thread Jeremy Dunck
On Sat, Dec 3, 2011 at 7:59 PM, Russell Keith-Magee wrote: > On Saturday, December 3, 2011, Jeremy Dunck wrote: >> Hey all, >>  With the 1.4 release coming up, I thought it'd be a good time to >> schedule a sprint to get in any ponies or help shake out bugs. > >

Re: Sprint in San Francisco

2011-12-03 Thread Jeremy Dunck
On Sat, Dec 3, 2011 at 1:27 PM, Brodie Rao wrote: > Bitbucket/Atlassian would love to host a sprint. We're about to move > from the Mission to our own office building in SoMa in a couple of > weeks. We'll have plenty of space for anyone who wants to attend. Thanks for the offer, Brodie. I'll wri

Re: Python 3 port - all tests now pass on 2.5.4, 2.6.2, 2.7.2 and 3.2.2 with the same codebase

2011-12-04 Thread Jeremy Dunck
On Sun, Dec 4, 2011 at 5:10 PM, Vinay Sajip wrote: > > On Dec 5, 12:57 am, Anssi Kääriäinen wrote: > >> There is one easy thing you can do for testing, set fsync to off in >> postgresql.conf. The file is probably at /etc/postgresql/9.1/main/ >> postgresql.conf. Then restart the server and tests s

Re: Python 3 port - all tests now pass on 2.5.4, 2.6.2, 2.7.2 and 3.2.2 with the same codebase

2011-12-05 Thread Jeremy Dunck
On Mon, Dec 5, 2011 at 7:28 AM, Carl Meyer wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 12/05/2011 08:10 AM, Vinay Sajip wrote: >> Not too bad for a first complete pass. Over two and a half hours to >> run, and that' s running from /dev/shm (IIUC effectively RAMdisk) and >> with

Multi-TZ should be in release notes

2011-12-25 Thread Jeremy Dunck
I think Multi-TZ should get soms love in the release notes. https://code.djangoproject.com/changeset/17106 https://docs.djangoproject.com/en/dev/releases/1.4-alpha-1/ Was it an oversight? -- You received this message because you are subscribed to the Google Groups "Django developers" group. T

Re: Multi-TZ should be in release notes

2011-12-26 Thread Jeremy Dunck
I suppose I should read the whole doc and not just ctrl-F before reporting omissions. :) On Dec 25, 2011, at 10:03 PM, Karen Tracey wrote: > On Mon, Dec 26, 2011 at 12:58 AM, Jeremy Dunck wrote: > I think Multi-TZ should get soms love in the release notes. >

Re: SOPA bill question

2011-12-26 Thread Jeremy Dunck
On Mon, Dec 26, 2011 at 4:33 PM, Etienne Robillard wrote: > What thus you Django developers all think of this proposed law and how could > this may affect open source communities such as Django and Python > to develop novel apps specifically for creating user-generated content? This feels off-top

Re: DoS using POST via hash algorithm collision

2011-12-29 Thread Jeremy Dunck
On Thu, Dec 29, 2011 at 8:19 AM, Christophe Pettus wrote: ... > It's an interesting result, but I'm not sure how much to be worried about it > in the field.  A SlowLoris or similar attack would seem to be far more > effective and less implementation-dependent. Slow Loris can be avoided by putti

Re: DoS using POST via hash algorithm collision

2011-12-29 Thread Jeremy Dunck
On Thu, Dec 29, 2011 at 12:10 PM, Paul McMillan wrote: ... >> That seems like a simpler workaround than arch upgrade or replacing >> dict implementation. > > This problem has nothing to do with slowloris. > > Replacing dict implementation prevents an attacker from producing keys > which are intent

Re: Django sprint

2012-01-02 Thread Jeremy Dunck
Hi Ryan, Actually, I'm still looking to firm up plans. I should have sent info earlier - I'm sorry about that. I'm now hoping to run the sprint Jan 21-22. It may be at Bitbucket's office, or it may not. I'll follow up with more specifics on this tomorrow if at all possible. On Mon, Jan 2,

Re: Sprint in San Francisco

2012-01-02 Thread Jeremy Dunck
Hello all, My apologies for the silence on the sprint plans - holidays and all that. I'm back to looking for space for the sprint - Bitbucket has only recently moved into their new space and are still settling in. Thanks to them for the initial offer. In light of that, I'd like to push the

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

2012-01-08 Thread Jeremy Dunck
On Sun, Jan 8, 2012 at 2:57 PM, Arnoud van Heuvelen wrote: ... > 3) Save the password hash (or part of it) in the session and compare > it against our data. If the hash is not the same, the user needs to be > logged out. This wouldn't change the database, but the downside is > that this causes ove

Re: Caching back-refernces on one-to-one fields

2012-01-18 Thread Jeremy Dunck
On Wed, Jan 18, 2012 at 11:07 AM, Shai Berger wrote: > Do you see a reason why I should not post a ticket? +1 -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsu

First-run experience w/ psycopg2 and django 1.3.x

2012-01-18 Thread Jeremy Dunck
There's a known problem w/ latest pg (2.4.2) and we decided not to backport the fix to 1.3.x because there's a workaround. https://code.djangoproject.com/ticket/16250 All well and good, but someone coming to Django w/ postgres will have a bad first-run experience because the docs don't mention th

Re: Caching back-refernces on one-to-one fields

2012-01-19 Thread Jeremy Dunck
On Thu, Jan 19, 2012 at 5:14 PM, Adrian Holovaty wrote: > On Wed, Jan 18, 2012 at 1:07 PM, Shai Berger wrote: >> I have a small improvement to suggest for one-to-one fields: Make them cache >> back-references on related objects. That is, assume > > Yes! Good improvement. And we should do the same

Testing multidb without inconsistency

2012-02-24 Thread Jeremy Dunck
I have a master and a replica. In test, the TEST_MIRROR on the replica points to master. I make writes to master, then read from replica, then assert some numbers. def test_stuff(self): Foo.objects.using('master').create() number_received = do_expensive_computations() # Down in some

Re: Testing multidb without inconsistency

2012-02-25 Thread Jeremy Dunck
On Sat, Feb 25, 2012 at 2:13 AM, Anssi Kääriäinen wrote: > On Feb 25, 9:24 am, Jeremy Dunck wrote: >> I have a master and a replica.  In test, the TEST_MIRROR on the >> replica points to master.  I make writes to master, then read from >> replica, then assert some numbers.

Re: Mobile Login????

2012-02-27 Thread Jeremy Dunck
You've mailed the django-developers list which is for development *of Django itself*. The proper mailing list about *using* Django is django-users. Please send this message to django-users unless you're proposing a change to Django. http://groups.google.com/group/django-users On Mon, Feb 27,

Re: Pretty Django model instaces updating

2012-03-01 Thread Jeremy Dunck
On Thu, Mar 1, 2012 at 9:28 PM, Carl Meyer wrote: > The "only_fields" kwarg suggestion comes from ticket 4102, and it is > primarily intended as a performance optimization for large models by > only sending the values of certain fields to the database at all, > something that your proposed co

Re: Looking for some insight into a tiny piece of the django codebase

2012-03-19 Thread Jeremy Dunck
On Mon, Mar 19, 2012 at 11:17 PM, Tim Diggins wrote: > Hi - > > I'm wondering what the lines at the end of django/db/models/ > deletion.py do: > >        for model, instances in self.data.iteritems(): >            for instance in instances: >                setattr(instance, model._meta.pk.attname

Re: #18094: signals, model inheritance, and proxy models

2012-04-12 Thread Jeremy Dunck
On Thu, Apr 12, 2012 at 9:31 AM, Carl Meyer wrote: > Hi all, > > There's a discussion ongoing on ticket #18094 > (https://code.djangoproject.com/ticket/18094) that has enough potential > back-compat implications that it seems worth getting feedback here. Small note, I'll try to respond to the who

Re: django db library doesn't handle quoted table/field names

2012-04-12 Thread Jeremy Dunck
On Thu, Apr 12, 2012 at 3:06 PM, Craig Lucas wrote: > i have developed a database for a client that uses camel casing in the > database. we are now trying to get a models.py file to mimic the > database structure and i have run into a few bugs with regards to > using quoted table names. > > The fi

Re: Application init inconsistent

2012-05-08 Thread Jeremy Dunck
On Tue, May 8, 2012 at 9:33 AM, Alex Ogier wrote: > My guess is that Django is doing some normalization on the name you are > importing. It does this to prevent double imports, for example importing > 'projectname.appname' and 'appname' which would otherwise be considered > separate modules even i

Announcement: twice-monthly Django sprints in San Francisco

2012-05-22 Thread Jeremy Dunck
My company, Votizen, now has an office in San Francisco, just a block from the 4th St Caltrain station. We have room to host sprints - easily 25 people, though we can grow if there is demand. We have a professional kitchen, great coffee gear, and maybe a kegerator soon. There are many great place

Non-default managers in related field lookups

2012-05-31 Thread Jeremy Dunck
It feels to me that each place that ._default_manager is mentioned here is a misfeature: https://github.com/django/django/blob/2cd516002d43cdc09741618f0a0db047ee6d78fd/django/db/models/fields/related.py As an example, we (Votizen) currently have some default managers which show subsets of all obje

Re: Non-default managers in related field lookups

2012-06-01 Thread Jeremy Dunck
On Fri, Jun 1, 2012 at 2:26 AM, Russell Keith-Magee wrote: > On Fri, Jun 1, 2012 at 8:53 AM, Jeremy Dunck wrote: ... >> Candidate.context('site') would return a manager depending on the >> requested context. >> (or perhaps Candidate.obje

Re: #18094: signals, model inheritance, and proxy models

2012-06-04 Thread Jeremy Dunck
On Fri, Apr 20, 2012 at 9:01 AM, Anssi Kääriäinen wrote: > On Apr 12, 10:27 pm, Anssi Kääriäinen wrote: >> > So perhaps we do need the signal inheritance behavior to be opt-in when >> > connecting the signal handler. I think I'd like to see a deprecation >> > path so that eventually the inheritan

San Francisco sprint info

2012-06-04 Thread Jeremy Dunck
We (Votizen) hosted a 1-day sprint yesterday from 10a to 6p. I had capped attendance at 30 just for logistical reasons - there's room for more but I wanted to gauge interest. 24 people signed up, and I'd guess that about 20 people total were there for at least part of the day. I think we peaked

Re: Announcement: twice-monthly Django sprints in San Francisco

2012-06-11 Thread Jeremy Dunck
I've just opened signup for our 2nd sprint - Saturday, June 16th, from 10a to 6p: http://sfdjangosprint2.eventbrite.com/ Please sign up if you plan to attend -- it's free of course. On Tue, May 22, 2012 at 2:30 PM, Jeremy Dunck wrote: > My company, Votizen, now has an office in

Re: XSS and string interpolation

2012-06-28 Thread Jeremy Dunck
On Jun 28, 2012, at 6:57 AM, Luke Plant wrote: > Hi all, > > 2) Any better name than 'html_fragment'? > I like the general approach, but I miss the security-minded namse of "escape" and "mark safe". Maybe "safe_html_fragment" or "make_safe_html_fragment"? Getting annoyingly long, I know.

pre_init/post_init vs. performance

2012-07-13 Thread Jeremy Dunck
I was poking around in our (Votizen's) use of signals and thinking about making some tooling so that signal usage was a bit more transparent. In doing so, I noticed that GenericForeignKey hooks the model pre_init signal. It does that because GFK needs a chance to munge kwargs from the GFK field n

Re: pre_init/post_init vs. performance

2012-07-15 Thread Jeremy Dunck
On Sun, Jul 15, 2012 at 9:51 AM, Andy McCurdy wrote: > > On Jul 14, 2012, at 6:37 PM, Russell Keith-Magee wrote: > >> >> My only concern is: >> >>> We could store which fields have these hooks upon ModelBase.__new__ >>> construction and so skip most fields and overhead in __init__. >> >> I'm not s

Upcoming sprint to update Django's tutorial

2012-07-16 Thread Jeremy Dunck
On August 4, PyLadies SF will collaborate with Django sprinters in San Francisco to improve the Django tutorial. I expect around 30 people will attend, including Alex Gaynor and Karen Rustad ( http://pyvideo.org/video/713/improving-documentation-with-beginners-mind-o ). We'll run a prep session

Re: Upcoming sprint to update Django's tutorial

2012-07-17 Thread Jeremy Dunck
. I could go either way - my preferred approach isn't right in all cases, and it might seem a distraction to the absolute beginner or a person who has their own opinions. On Mon, Jul 16, 2012 at 11:15 PM, Aymeric Augustin wrote: > 2012/7/16 Jeremy Dunck : >> On August 4, Py

Re: Django git guidelines

2012-07-18 Thread Jeremy Dunck
I noticed this hasn't made it to master yet. Could it? I'm running sprints and there's a bit of confusion on how to contribute to git. Cheers, Jeremy On Thu, Jun 7, 2012 at 9:53 AM, Aymeric Augustin wrote: > On 6 juin 2012, at 21:09, Anssi Kääriäinen wrote: >> I am sure there is still a lot

Re: Git questions

2012-07-18 Thread Jeremy Dunck
On Fri, Jun 8, 2012 at 7:57 AM, Anssi Kääriäinen wrote: > On 8 kesä, 17:28, Luke Plant wrote: >> First, thanks so much to Aymeric and Anssi and others for the >> contribution guidelines, they're very helpful. >> >> I've got some questions that are due to my ignorance of git (I have >> managed to

Re: pre_init/post_init vs. performance

2012-07-18 Thread Jeremy Dunck
On Sun, Jul 15, 2012 at 11:07 AM, Jeremy Dunck wrote: > > That is indeed what I meant, but I think Anssi's probably right that > this belongs in contribute_to_class instead of a new adhoc thing in > ModelBase.__new__. > > I'll take a swing at making this change. >

More efficient m2m assignment SQL

2012-07-26 Thread Jeremy Dunck
I have 2 models: class District(Model): pass class Voter(Model): districts = ManyToManyField(District) Sometimes I want to reset the m2m list: voter.districts = other_districts I noticed that this uses ManyRelatedManager._clear_items, which, among other things, boils down to: voter.distr

Re: More efficient m2m assignment SQL

2012-07-27 Thread Jeremy Dunck
On Thu, Jul 26, 2012 at 11:26 PM, Anssi Kääriäinen wrote: > On 27 heinä, 08:15, Jeremy Dunck wrote: ... >> I would have expected something along the lines of : >> >> DELETE FROM `api_voter_districts` WHERE `voter_id` = 1 >> >> But instead it's 2 queries:

Re: pre_init/post_init vs. performance

2012-07-27 Thread Jeremy Dunck
Can I get a review of the branch? 25% performance improvement of Model.__init__ in stock django seems worth landing. :) On Wed, Jul 18, 2012 at 3:48 AM, Jeremy Dunck wrote: > On Sun, Jul 15, 2012 at 11:07 AM, Jeremy Dunck wrote: >> >> That is indeed what I meant, but I think A

Re: Upcoming sprint to update Django's tutorial

2012-08-04 Thread Jeremy Dunck
>> >> Obviously this page would need to be kept up to date - maybe even just >> "some people said these things about Django best practices, read these >> blogposts for information" would be fine - just some starting pointers. I >> know especially on Wi

Re: #16455 PostGIS 2.0 support

2012-08-09 Thread Jeremy Dunck
I'm fairly familiar with the django gis code, but I haven't been following postgis 2.0. Could you point me towards some discussion of the index changes from 1.5 to 2.0? On the face of it, I'm doubtful that they've removed a useful form of indexing with no replacement/alternative. It's hard for m

Re: #16455 PostGIS 2.0 support

2012-08-09 Thread Jeremy Dunck
On Thu, Aug 9, 2012 at 2:42 PM, Flavio Curella wrote: > From the benchmark, my understanding is that, on PostGIS 2.0: > > 1) for the 2D case, the best index is 'gist (columname)' > 2) for the 3D case, the best index is 'gist (columname > gist_geometry_ops_nd)' only when using specific 3D operators

Re: #16455 PostGIS 2.0 support

2012-08-10 Thread Jeremy Dunck
That sounds good to me, though I'm not a committer on the tree as far as I know. Anssi? On Fri, Aug 10, 2012 at 8:12 AM, Flavio Curella wrote: > Just to clarify, the plan is: > > 1) Merge in patch v8 (2d index for 2-dimensional fields, _nd index for 3D > and up) > 2) Open a new ticket for the

Testing multidb with TEST_MIRROR

2012-09-02 Thread Jeremy Dunck
I have been working on a master/slave router library [1] and have run into some trouble testing a client application of it. The issue is that TestCase (as designed) holds test db writes in a transaction, but the read slave connection (which is to the same DB under TEST_MIRROR) does not have visibi

Re: Testing multidb with TEST_MIRROR

2012-09-06 Thread Jeremy Dunck
On Thu, Sep 6, 2012 at 12:16 PM, Anssi Kääriäinen wrote: > On 3 syys, 07:40, Anssi Kääriäinen wrote: >> I would like to make the TransactionTestCase faster. Currently when >> running Django's test suite, for every test ran you will truncate >> around 1000 tables, then create around 4000 objects (

Results of testing votizen's py2.6/7 codebase against django master (319e1355190)

2012-09-18 Thread Jeremy Dunck
In response to the call to test py2.x on django's current master, I ran the test suite for Votizen. Our codebase is currently running with django 1.4.x. Our codebase is ~100kloc, ~32kloc of which is tests. We use abstract model inheritance a good bit, but no concrete inheritance. No i18n or mul

Re: Results of testing votizen's py2.6/7 codebase against django master (319e1355190)

2012-09-18 Thread Jeremy Dunck
On Tue, Sep 18, 2012 at 11:23 AM, Jeremy Dunck wrote: ... > And the last one, I hesitate to raise because it's likely to be > specific to my machine, but... our (django-nose-based) test runner > hangs after completing the suite but before tearing down. Using > dtruss I can se

A bit of Django history

2012-10-04 Thread Jeremy Dunck
I was searching around for a different old blog post and found this one: http://jacobian.org/writing/why-django/ It made me smile - we've come a ways since then. :) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, sen

<    1   2   3   4   5   6   >