Re: Building a library of SQL functions into Django

2014-06-18 Thread Chris Wilson
Hi Carl, On Wed, 18 Jun 2014, Carl Meyer wrote: I think database backends should have a hook to override the SQL implementation of any given Function. I don't think this needs to imply pushing the default implementation of all Functions down into the database backend (that just makes life unn

Re: Building a library of SQL functions into Django

2014-06-18 Thread Chris Wilson
Hi Carl, On Wed, 18 Jun 2014, Carl Meyer wrote: On 06/18/2014 02:59 PM, Aymeric Augustin wrote: 2014-06-18 19:18 GMT+02:00 Carl Meyer mailto:c...@oddbird.net>>: If you need a Function in your project (whether provided by Django or by a third-party library), and the Function doesn't natively s

Re: [GSOC] Shifting to Py.Test and Improving the Test Suite

2014-04-07 Thread Chris Wilson
Hi Andrew, On Sun, 6 Apr 2014, Chris Wilson wrote: On Sun, 6 Apr 2014, Andrew Pashkin wrote: * It makes it much harder to write custom assertions and get meaningful display on error. Can you give an examples for cases with messages/breakings and for custom assertions? I don't ha

Re: [GSOC] Shifting to Py.Test and Improving the Test Suite

2014-04-06 Thread Chris Wilson
Hi Andrew, On Sun, 6 Apr 2014, Andrew Pashkin wrote: * It makes it much harder to write custom assertions and get meaningful display on error. Can you give an examples for cases with messages/breakings and for custom assertions? I don't have an example of breakage to hand, I ripped out the

Re: [GSOC] Shifting to Py.Test and Improving the Test Suite

2014-04-06 Thread Chris Wilson
Hi Andrew, I'm not a Django core contributor but just a user and occasional patcher. I submit some comments on this proposal in the hope that they will be useful. On Sun, 6 Apr 2014, Andrew Pashkin wrote: Some Pytest advocacy: 1) Pytest has convenient tests collection options - you can just

Re: Saving forms without validation, and formsets

2014-03-19 Thread Chris Wilson
Hi all, As part of our test process we have code that automatically fills in forms with dummy values to make them valid. It fills in all required fields. This works well except for formsets. BaseModelFormSet.add_fields() adds a PK field to the form after it's created. It marks this field as n

Re: Saving forms without validation, and formsets

2014-03-19 Thread Chris Wilson
Hi Carl, On Tue, 18 Mar 2014, Carl Meyer wrote: On 03/18/2014 02:54 PM, Chris Wilson wrote: 1. GCBV and Vanilla Views do a great job for simple forms, but they leave out embedded formsets entirely. (For example our large form has repeating sections for employment history, education, etc.) It

Saving forms without validation, and formsets

2014-03-18 Thread Chris Wilson
Hi all, (Apologies if this belongs on django-users instead. To clarify, I'm interested in what appear to be potentially missing or useful features in Django, and whether it's worth implementing them and submitting pull requests, or creating separate reusable modules to implement them. I'm als

Re: should we include images in Django documentation?

2014-02-22 Thread Chris Wilson
Hi all, On Sat, 22 Feb 2014, Aymeric Augustin wrote: There's already a few images and I can't see any reason against adding more where appropriate. There's just one small hurdle. Last time I checked, the intersection of "editors producing good-looking diagrams" and "open-source diagram edit

Re: [GSOC] Improving the Test-Suite

2014-02-15 Thread Chris Wilson
Hi all, On Sat, 15 Feb 2014, Russell Keith-Magee wrote: One of the improvements I see is classification of test cases. Classifying them into categories (read multiple-categories), would make it easier for users/developers/maintainers to run them. Basis of classification,etc is what I am still

Re: #19182 backport request

2014-02-14 Thread Chris Wilson
Hi Tim, On Fri, 14 Feb 2014, Tim Graham wrote: I sympathize with your frustration. On the other hand as we have over 500 bugs in Trac, and I'm not sure starting to accept documentation requests for them is the best use of our resources. I'm not sure the feature is really completely broken eno

Re: #19182 backport request

2014-02-14 Thread Chris Wilson
Hi all, On Fri, 14 Feb 2014, Florian Apolloner wrote: as Tim noted on the ticket, we are not going to backport this as per our policy. In that case will you accept patches to remove description of the broken feature from the documentation for 1.4, 1.5 and 1.6? Cheers, Chris. -- Aptivate | ht

#19182 backport request

2014-02-14 Thread Chris Wilson
Hi all, I just ran into bug #19182 : ModelAdmin filtering didn't work when list_filter includes a ('fieldname', ClassName) tuple, but throws a SuspiciousOperation exception instead. The ChangeList would display fine, but as soon as you tried to use

Re: Django doesn't log much at high verbosity levels

2014-02-04 Thread Chris Wilson
Hi Russell, On Tue, 4 Feb 2014, Russell Keith-Magee wrote: A definite "Maybe". :-) For my money, this is probably something that is handled better by the web server. Apache, for example, logs one line per request, and can be configured to dump full GET and POST contents if you need that info

Django doesn't log much at high verbosity levels

2014-02-03 Thread Chris Wilson
Hi all, I'd expect that Django would log something like: * At INFO level, at least one line per request (similar to runserver output) * At DEBUG level, enough information to recreate the request However, it doesn't appear to: * There are only two logger.debug statements, both logging databas

Re: Django ORM support for NoSql databases

2013-12-17 Thread Chris Wilson
Hi all, On Tue, 17 Dec 2013, Tom Evans wrote: On Tue, Dec 17, 2013 at 3:35 PM, parisrocks wrote: Waiting for official Django ORM support for NoSql databases. MongoDB (and the vast majority of NoSQL databases) are not relational databases, they are document oriented databases, they store do

Re: Deprecation a little harsh?

2013-08-12 Thread Chris Wilson
Hi all, On Mon, 12 Aug 2013, Jacob Kaplan-Moss wrote: If you'd like to help push us closer to where *you* think the right place balance is, the best thing to do is to watch our development process and speak up in the moment. These sorts of general, post-facto observations don't give us a ton

Re: Custom Chainable QuerySets (#20625)

2013-07-22 Thread Chris Wilson
Hi Aymeric, On Mon, 22 Jul 2013, Aymeric Augustin wrote: The idea of `QuerySet .as_manager()` sounded sane to me at first—especially in the light of the failure of various other attempts—but it creates a circular dependency between `Manager` and `QuerySet`. Creating the `Manager` class now re

Re: Composite fields -- (ir)regular status report #3

2013-07-22 Thread Chris Wilson
On Mon, 22 Jul 2013, Michal Petrucha wrote: I have some awesome news today. At long last I managed to finally get the refactor of ForeignKey to pass the entire test suite. That is awesome news! Well done Michal! I am really looking forward to having this feature available in Django. Cheers,

Ticket #7220: Last_login in django.contrib.auth should have null=True

2013-06-01 Thread Chris Wilson
Hi all, Regarding ticket #7220 , this is bugging me at the moment. I share a database with a non-django app, and need to insert test data, and having to set last_login to something is annoying. I understand @SmileyChris' point that there are no mig

Re: test discovery

2013-05-18 Thread Chris Wilson
Hi Carl, On Sat, 18 May 2013, Carl Meyer wrote: I don't think this should be fixed in the test runner itself; in general, file-path test labels _should_ be interpreted as relative to wherever you are running the tests from. But it should be fixed in the test_runner.test_discover_runner.Disc

Re: test discovery

2013-05-18 Thread Chris Wilson
Hi all, Another odd behaviour of the new test runner. This runs the tests, but fails to add the test app to INSTALLED_APPS, so they all fail because their tables are not created: PYTHONPATH=.. python -Wall runtests.py --selenium --verbosity 2 \ --settings=tests.travis_configs.test_pos

Re: test discovery

2013-05-18 Thread Chris Wilson
On Sat, 18 May 2013, Chris Wilson wrote: I think Travis is unhappy about something in this commit. Any ideas? == ERROR: test_file_path (test_runner.test_discover_runner.DiscoverRunnerTest

Re: test discovery

2013-05-18 Thread Chris Wilson
Hi all, On Fri, 10 May 2013, Carl Meyer wrote: I merged this patch tonight. Thanks to everyone who contributed! Now let's see how the CI servers feel about it... I think Travis is unhappy about something in this commit. Any ideas? =

Re: Travis support (again)

2013-05-18 Thread Chris Wilson
Hi all, On Thu, 7 Mar 2013, Jacob Kaplan-Moss wrote: On Mon, Feb 25, 2013 at 4:48 PM, Florian Apolloner wrote: So all in all I think we could enable travis, I agree, +1 from me. One issue standing in the way: Travis will try to build any branch without a .travis.yml file as though it was

Re: Perception of attitude in tickets

2013-05-13 Thread Chris Wilson
On Mon, 13 May 2013, Kirby, Chaim [BSD] - PED wrote: WONTFIX has a long history in software development. It also does (correctly) state intentionality that 'onholdindefinite' lacks. The intention of WONTFIX is "yes, this is possibly valid, but in the state this ticket is written it is being cl

Re: Perception of attitude in tickets

2013-05-13 Thread Chris Wilson
Hi Luke, On Mon, 13 May 2013, Luke Sneeringer wrote: On May 13, 2013, at 10:06 AM, AK wrote: WONTFIX does sound rude to me, as well. Perhaps 'onholdindefinite' can be used instead, the effective meaning is the same, just the term itself is more polite. It seems that nobody looking at it woul

Re: Perception of attitude in tickets

2013-05-13 Thread Chris Wilson
Hi all, On Mon, 13 May 2013, Russell Keith-Magee wrote: This isn't political equivocating. Its a genuine call to the community to tell us how we can make things better. If I may make a suggestion to be considered by the community: The status WONTFIX sounds awfully rude to me. It's like sayin

Re: reconsider re-opening ticket 901

2013-05-13 Thread Chris Wilson
Hi all, On Sun, 12 May 2013, Shai Berger wrote: those should probably be updated (on remote objects!) too, or else some serious inconsistencies may be created (when the _id field changes, that is). aa= A.objects.get(...) bb= aa.b (some other operation, changing aa.b_id in the database) aa.re

Re: URL dispatcher fallthrough?

2013-03-18 Thread Chris Wilson
Hi Julian, On Mon, 18 Mar 2013, julianb wrote: 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 is: // // /

Re: Switch to database-level autocommit

2013-03-05 Thread Chris Wilson
Hi Lennart, On Tue, 5 Mar 2013, Lennart Regebro wrote: I do agree that 99.9% of the sites committing on the end of the request is the right thing to do, and do think that this should be the default, although I realize that debate is already lost. In a perfect academic world where there are n

Re: save() method could return the object

2012-10-12 Thread Chris Wilson
On Fri, 12 Oct 2012, Marijonas Petrauskas wrote: There already exists create method that does exactly what you need:obj = SomeModel.objects.create(name='foo', age=42) OK, thanks, that appears to be completely undocumented. Cheers, Chris. -- Aptivate | http://www.aptivate.org | Phone: +44 122

Re: A.objects.getdefault

2012-10-12 Thread Chris Wilson
Hi all, On Thu, 11 Oct 2012, Daniel Moisset wrote: obj, = SomeModel.objects.filter(foo='bar') or [None] Daniel's solution is elegant, but far from clear or clean. 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 exist, ins

save() method could return the object

2012-10-12 Thread Chris Wilson
Hi all, If the save() method returned the object itself, then we could chain it like this: old_status = Status(last_contact=None).save() Instead of having to do this: old_status = Status(last_contact=None) old_status.save() It's a trivial one-line change to the Model

Re: Proposal: use SQLAlchemy Core for query generation

2012-07-03 Thread Chris Wilson
Hi Reinout, On Tue, 3 Jul 2012, Reinout van Rees wrote: On 30-06-12 16:22, Luke Plant wrote: Also, in Django to date we've eschewed external dependencies. That has been partly due to the poor and confusing state of Python packaging, which is hopefully improving. [snip] Our current recommende

Re: I think adding a "first" method to the QuerySet be useful.

2012-07-03 Thread Chris Wilson
Hi all, On Tue, 3 Jul 2012, Łukasz Rekucki wrote: On 3 July 2012 06:27, Maxime Haineault wrote: One of the common pitfall I come across way to often with novices is something like this: def getFirstUser(): return User.objects.all()[0] It looks innocuous and often wont raise any e

Re: Test runner with search

2012-06-18 Thread Chris Wilson
Hi all, On Mon, 18 Jun 2012, Anssi Kääriäinen wrote: > On 16 kesä, 09:29, Russell Keith-Magee > > > > Well, sure -- easier is better -- but is this actually going to be > > easier? Are you saying that you've never written two test classes with > > the same test name? I don't think I have, but I

Re: Test runner with search

2012-06-14 Thread Chris Wilson
Hi Andrew, On Thu, 14 Jun 2012, Andrew Godwin wrote: > +1 from me as well - the test runner you linked to looks reasonably > sane, only a few small things that I'm questioning (like why types is > imported inside the for loop). I prefer to keep the imports as close to the code that uses them a

Test runner with search

2012-06-14 Thread Chris Wilson
Hi all, I've made some improvements (in my view) to the DjangoTestSuiteRunner. I got tired of having to remember my test class names and of typing so much: ./manage.py test binder.BinderTest.test_can_create_users This new version searches for tests with the given name in all INSTALLED_APPS,

Re: Allow changing form field properties after form creation

2012-06-08 Thread Chris Wilson
Hi Simon, On Fri, 6 Apr 2012, Simon Meers wrote: On 6 April 2012 07:26, Beres Botond wrote: Isn't it this what you are trying to do? class DocumentForm(ModelForm):        def __init__(self, *args, **kwargs):                super(MyForm, self).__init__(*args, **kwargs)                self.fie

Re: Allow changing form field properties after form creation

2012-04-05 Thread Chris Wilson
Hi Brian, On Thu, 5 Apr 2012, Brian Neal wrote: On Thursday, April 5, 2012 6:49:20 AM UTC-5, Chris Wilson wrote: class DocumentForm(ModelForm):      title = models.Document._meta.get_field('title').formfield(required=False) You can already replace and tweak the f

Re: Allow changing form field properties after form creation

2012-04-05 Thread Chris Wilson
Hi Nate, On Thu, 5 Apr 2012, Nate Bragg wrote: They don't "have" to be replaced in a subclass in the way you showed. Perhaps it isn't perfectly DRY, but whats so bad about naming the field explicitly? The fact that we're building reusable components and we want people to be able to subclass

Allow changing form field properties after form creation

2012-04-05 Thread Chris Wilson
Hi all, I've added this as a ticket but I wanted to make sure that the core and forms developers have a chance to see and interact with it, so I'm posting it here too. You can find the ticket at: Currently, if I want to tweak the properties of so

metrics: Django case study

2012-03-24 Thread Gary Wilson Jr.
For those interested, I've made available a couple reports from a class assignment where we analyzed the Django codebase, bug tracker, and wiki. The motivation of these reports was to answer questions related to code size, modularity, complexity, unit test coverage, and component quality. Instead

Re: auth.User refactor: reboot

2012-03-23 Thread Gary Wilson Jr.
On Wed, Mar 21, 2012 at 12:48 AM, Russell Keith-Magee wrote: > > On 21/03/2012, at 12:23 PM, Clay McClure wrote: > >> On Saturday, March 17, 2012 8:52:01 PM UTC-4, Russell Keith-Magee wrote: >> >> The only way I can see around this problem is to come up with a way for >> ForeignKey(User) to trans

Re: Why recommend to include project name in settings?

2012-02-10 Thread Chris Wilson
Hi Carl, On Fri, 10 Feb 2012, Carl Meyer wrote: Is there any reason not to drop the project name part of DJANGO_SETTINGS_MODULE and ROOT_URLCONF, to reduce the risk of confusion, pollution, double imports and bad practice app coding in Django? If you follow that quoted thread to the end, yo

Why recommend to include project name in settings?

2012-02-10 Thread Chris Wilson
Hi all, I'd like to inquire about the design decision to recommend users to include the project name in DJANGO_SETTINGS_MODULE and ROOT_URLCONF, for example: When using django-admin.py, you can either set the environment variable once, or explicitly pass in the settings module each time you

Adding fields to admin forms

2012-02-09 Thread Chris Wilson
Hi all, I want to be able to add extra fields, that I control, to the admin forms. For example, a read-only list of documents authored by the user, which is ManyToMany, so an InlineAdmin doesn't work. The admin module docs don't really say whether this is possible or not. They have much more

Feature request: read-only admin view

2012-01-27 Thread Chris Wilson
Hi all, I really like how the admin interface does a lot of the work for me in developing a site with basic CRUD functions, and a few free bonuses like pagination and list filtering. I agree with all the comments on #820 requesting this feature (as wel

ModelForm._post_clean could simply call Model.full_clean

2012-01-27 Thread Chris Wilson
Hi all, I proposed this in a comment on #16423 , and then found that it had come up before: https://code.djangoproject.com/ticket/13100 https://code.djangoproject.com/ticket/13121 and was rejected thus: I think model-validation is just no

Re: #7198 - Better error message when app is missing models.py

2011-09-11 Thread Gary Wilson Jr.
On Fri, Sep 9, 2011 at 4:35 PM, Justin Lilly wrote: > Not sure why this particular ticket is marked as DDN, as it seems like > a no-brainer. The patch provides a more clear error message when a > user is attempting to load an app which doesn't have a models.py. > > https://code.djangoproject.com/t

ANN: Sprint in Austin, TX this Saturday, Jan. 22

2011-01-18 Thread Gary Wilson Jr.
See the wiki page for more details and to sign up: http://code.djangoproject.com/wiki/Sprint2011JanAustin Gary -- 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 Design Czar

2010-02-08 Thread Wilson
Design As the input outgrows the wiki page, or as individual proposals become actionable, we'll adapt from there. On Feb 8, 12:57 pm, Idan Gazit wrote: > Hey Wilson, I'm sure I'm not the only one who is delighted that you > have some cycles to spare for Django. :) > > As this

Re: Django Design Czar

2010-02-07 Thread Wilson
y commit bit and existing relationships can help get things off the ground, I'm happy to give it a shot and do what I can. Cheers, Wilson -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-dev

safe characters used in iri_to_uri (#12445)

2009-12-26 Thread Gary Wilson Jr.
http://code.djangoproject.com/ticket/12445 RFC 3986 [1] defines the following as "reserved" and "unreserved" characters: reserved= gen-delims / sub-delims gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" unrese

Re: Summer of Code: mentors wanted

2009-03-20 Thread Gary Wilson Jr.
On Thu, Mar 19, 2009 at 5:41 PM, Jacob Kaplan-Moss wrote: > If you'd like to mentor a Summer of Code project, you can apply through > Google's web app right now. Please also add your name here: > http://code.djangoproject.com/wiki/SummerOfCode2009 FYI, django mentor signup is here: http://socgh

Re: #3182 -- model instance update() method and QuerySet update_or_create() method

2009-03-15 Thread Gary Wilson Jr.
On Sun, Mar 15, 2009 at 4:40 PM, Malcolm Tredinnick wrote: > On Sun, 2009-03-15 at 12:12 -0500, Gary Wilson Jr. wrote: >> Another option would be to allow Model.update() to take the >> force_update and force_insert parameters that save() does and just >> pass these throu

#3182 -- model instance update() method and QuerySet update_or_create() method

2009-03-15 Thread Gary Wilson Jr.
I've just attached an updated patch: http://code.djangoproject.com/attachment/ticket/3182/3182.2.diff Before I committed this I wanted to ask the list their thoughts of Model.update() doing a save(force_update=True). Currently the patch is just calling save(), which allows one to call update()

Re: Call for review: #689 - REMOTE_USER authentication

2009-03-14 Thread Gary Wilson Jr.
On Fri, Mar 13, 2009 at 9:48 PM, Malcolm Tredinnick wrote: > I'd go for something shorter: > >        Performs any cleaning on the "username" prior to using it to >        create the user object. Returns the cleaned username. > >        By default, returns the username unchanged. > > I've also ad

Call for review: #689 - REMOTE_USER authentication

2009-03-11 Thread Gary Wilson Jr.
Just posted an updated patch: http://code.djangoproject.com/attachment/ticket/689/689.4.diff Gary --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to djan

Re: Option to disable messages in auth context processor

2009-02-08 Thread Gary Wilson Jr.
On Thu, Feb 5, 2009 at 9:07 AM, Jacob Kaplan-Moss wrote: > On Thu, Feb 5, 2009 at 9:01 AM, Vinicius Mendes wrote: >> So I decided to write a new messages app and it works very well, the only >> problem is the django.core.context_processors.auth. > > Yeah, this processor has a bunch of bugs in it

Re: Dropping Python 2.3 compatibility for Django 1.1

2008-11-26 Thread Gary Wilson Jr.
On Wed, Nov 26, 2008 at 7:23 AM, varikin <[EMAIL PROTECTED]> wrote: > On Nov 25, 7:16 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: >> However, even saying Django 1.1 is the last 2.3-compatible version and >> we drop it afterwards gives us a reasonable 3.0 support timeline, since >> our time

Re: Proposal: Minor admin CSS refactoring

2008-11-15 Thread Wilson
Just wanted to update to say the bulk of this is now done (Steps 1, 2 and 3). One note: the file structure is largely the same, but I did remove the hidden import rules in each file that made it confusing as to which styles were being included where. Each stylesheet is now explicitly linked to fr

Proposal: Minor admin CSS refactoring

2008-10-16 Thread Wilson
I've been poking around the contrib.admin CSS recently after a long hiatus. I'm amazed at how well they've held up all this time, but obviously after three years I've changed my mind about some of the bright ideas I had when I wrote the first version. Obviously, with newforms admin it's a lot eas

Re: Last call for 1.0 alpha

2008-07-21 Thread Gary Wilson Jr.
Jacob Kaplan-Moss wrote: > [If you happen to be at OSCON I'll be working on 1.0 alpha on the > lower floor over by the Starbucks if you wanna come over and help > out.] I'm not at OSCON, but I can take care of #7864 (docs renaming), as I've got a patch already in the works. Gary --~--~

Re: rev 7920 fresh checkout fails tests?

2008-07-14 Thread Matt Wilson
On Jul 13, 11:50 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > Looking at the failures you are getting, it looks like you might not > have a completely clean checkout. At least some of the failures appear > to be due to the recently added python 2.3 compatibility > implementation of sorte

rev 7920 fresh checkout fails tests?

2008-07-13 Thread Matt Wilson
I'm trying to figure out if I'm running the tests incorrectly, or if there are really are failed tests in the revision. There's no point in working on a patch if I'm just doing something wrong, so I'd really appreciate it if somebody can look over how I'm running these tests. I ran the runtests

Re: Reminder: "Must-have" feature freeze in two weeks

2008-07-12 Thread Gary Wilson Jr.
Jacob Kaplan-Moss wrote: > For my part, I plan to work on #2 (oldforms -> newforms in generic > views) late this week. Brian's patch is pretty much perfect, so it's > just a matter of a code review and a check in. Jacob, FYI I just posted an updated patch for #3639 [1] that factored out some dup

tickets and use of the 1.0 milestones

2008-07-03 Thread Gary Wilson Jr.
I would like to remind those out there setting milestones on tickets to follow the following guidelines that Jacob put forth: * Must-have feature bugs go in the "1.0 alpha" milestone. These basically should be all nfa-blocker tickets. Bugs in the must-have features are not to be part of thi

Re: Spam detection

2008-07-01 Thread Gary Wilson Jr.
Jacob Kaplan-Moss wrote: > Help me out here: how can I make it more obvious? Wow, you've certainly made it more obvious :) I pity the fool that misses it now. Gary --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Paginator vs. QuerySetPaginator

2008-07-01 Thread Gary Wilson Jr.
Jeremy Dunck wrote: > I just ran into the same issue several people before me have: > Paginator is a bit dangerous when handed a queryset, and > QuerySetPaginator should be used instead. > > This ticket exists, but no core dev has contributed to discussion yet. > http://code.djangoproject.com/tic

Re: DDN: Contrib apps testing their own views (#7521)

2008-06-25 Thread Gary Wilson Jr.
Russell Keith-Magee wrote: > On Wed, Jun 25, 2008 at 1:17 AM, Marc Fargas <[EMAIL PROTECTED]> wrote: >> I can think of two options right now: >>* manage.py test should not run django.contrib.* tests, those are >> supposed to have been run in runtests.py and working fine (that's the >> poin

Re: URL Resolvers: a little refactoring goes a long way

2008-06-25 Thread Gary Wilson Jr.
Ken Arnold wrote: > I wanted to get any feedback on this change before submitting a > ticket, but if people think it's a good idea, I can clean up the patch > and make a ticket. Anything that gets REST projects and nfa off the ad-hoc dispatchers sounds like a good idea to me. Along with a ticke

Re: newforms generic views

2008-06-22 Thread Gary Wilson Jr.
Jacob Kaplan-Moss wrote: > On Mon, Jun 16, 2008 at 3:51 PM, Gary Wilson Jr. <[EMAIL PROTECTED]> wrote: >> a. I am thinking that we should instead keep the ``model`` argument, >> but make it optional. Then, we ensure that one of ``model`` or >> ``form_class`` is given

Re: Experimental Git repository available

2008-06-19 Thread Gary Wilson Jr.
Marc Fargas wrote: > El jue, 19-06-2008 a las 14:03 -0700, Michael Elsdörfer escribió: >> FWIW (I'm currently playing around with all three of them), bazaar >> appears to support pushing into svn as well. > > Yes, with bzr-svn. Be advised, though, that currently bzr-svn will dump out a ton of sv

newforms generic views

2008-06-16 Thread Gary Wilson Jr.
I was taking a look at the latest patch [1] for #3639 (many thanks to Brian Rosner for the hard work), and trying to decide how backwards compatible we want to be. (I should also mention that while there has been some work done towards class-based generic views in #6735 [3], I believe that #3639

Re: get_{next,previous}_by_someDateField()

2008-06-11 Thread Gary Wilson Jr.
Marc Fargas wrote: > m = TestModel() > m.get_previous_by_date() > > Will fail with an exception which says "Cannot use None as a query", > maybe that error could be a bit more self-explicative, like "Cannot > query next/previous items without being saved". Agreed, please create a ticket for this

Re: extra() and values()

2008-06-10 Thread Gary Wilson Jr.
Nicolas E. Lara G. wrote: > I was wondering if there was some sort of design decision on this or > was just not implemented (yet). I would say it just hasn't been implemented yet. > Adding the fields to appear in the dictionary seams like an easy fix > that > I might do while working on aggregat

Re: Rethinking silent failures in templates

2008-06-10 Thread Gary Wilson Jr.
Jacob Kaplan-Moss wrote: > On Sat, May 17, 2008 at 11:30 PM, James Bennett <[EMAIL PROTECTED]> wrote: >> The impression I get is that a lot of people rely on silent *variable* >> failure, but very few rely on silent *tag* failure. In fact, most >> real-world custom template tags I've seen are wire

Re: Partial Models Discussion

2008-05-23 Thread Gary Wilson Jr.
David Cramer wrote: > IMO show() and hide() are extremely ugly. And I think .values() is becoming > ugly with the addition of values_tuple or whatever it's called. I don't see > a real good reason to clutter the namespace even more than it already is. > I'd rather have .values(type=dict) or someth

Re: Want to have unit tests in multiple files

2008-05-23 Thread Gary Wilson Jr.
Alex Koshelev wrote: > No. Not `tests.py`, but `tests` module - that can be a package of many > other modules/files In case you haven't figured this out already, it can be done by importing your unit test classes from the test/*.py modules in tests/__init__.py Gary --~--~-~--~~---

Re: Partial Models Discussion

2008-05-23 Thread Gary Wilson Jr.
David Cramer wrote: > I'd like to present my concept for partial models, which would be an > attempt to replace the use of .values() returning a dictionary > (although .values() still has uses if you dont actually want an > instance). Keep in mind, the way I'm presenting this would keep #17 > work

Re: Bug (very mild) in PostgreSQL version _check_

2008-05-23 Thread Gary Wilson Jr.
Haroldo Stenger wrote: > I think I've found a bug in Django and a solution :-) Please file a ticket [1] (after searching first [2]) for this issue if you haven't already so that it's not forgotten. [1] http://code.djangoproject.com/simpleticket [2] http://code.djangoproject.com/query Thanks, G

Re: Generative values() Does not Work

2008-04-02 Thread Gary Wilson Jr.
Russell Keith-Magee wrote: > > On 31/03/2008, at 2:33 AM, mtrier wrote: > >> Before opening a ticket I thought I would check what the expected >> behavior is for generative values(). This is the behavior I'm seeing >> on Queryset Refactor branch and to me it seems like it is not the >> correct

Re: Pick a value from list variable in templates

2008-03-08 Thread Gary Wilson Jr.
Yuri Baburov wrote: > I don't like the point of view that "everyone has his own library", > because it's too childish. It isn't a solution at all, it's just a > despair after attempts to find a good enough solution. > You did a great thing inventing simple and useful ORM, good template > language,

Re: Class based generic views

2008-03-08 Thread Gary Wilson Jr.
Joseph Kocherhans wrote: > I just uploaded a patch [1] for class based generic views that use > ModelForm internally. Personally, I think this makes the generic views > a lot more flexible, and gives us a great argument against > adding-yet-another-config-argument-to-generic-views (even though I >

Re: Feature Request: small extension to mod python authentication handler

2008-01-27 Thread Gary Wilson Jr.
[EMAIL PROTECTED] wrote: > Hi, > > I'd like to use django for authentication in apache, and it would be > nice to have group based access. > Therefore i did a little patch to django/contrib/auth/handlers/ > mod_python.py > > group = options.get('DjangoRequireGroup', None) > ... > if group: >

anyone against me checking in #5422 - raw parameter for pre/post_save signals

2008-01-17 Thread Gary Wilson Jr.
It's needed for the same reasons that the Model.save() method needs it. When loading fixtures, you sometimes don't want to touch the incoming data. For example, if I have a simple function connected to a pre_save signal that updates a timestamp: def update_timestamp(instance, **kwargs):

Re: middleware exception catching for core handlers

2008-01-06 Thread Gary Wilson Jr.
Karen Tracey wrote: > Can't answer as to why it is the way it is, but Gary did open a defect to > track the issue, and it has a patch: > > http://code.djangoproject.com/ticket/6094 > > Someone else a couple of weeks ago opened another couple of defects covering > the same issue, and when pointed

Re: lazy (in utils.functional) is broken

2007-12-16 Thread Gary Wilson Jr.
SmileyChris wrote: > I've been working on a new version of the session messages ticket and > was looking at making the "messages" context variable lazy - it seems > silly how it currently wipes messages, even if you didn't check for > them. What ticket number is this btw? --~--~-~--~

Re: ticket 3511 backwards incompatible

2007-12-11 Thread Gary Wilson
Peter Baumgartner wrote: > http://code.djangoproject.com/ticket/3511 broke some code I had that > caught AssertionError in the past. Seems like it should be listed on > http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges done. Thanks, Gary --~--~-~--~~~--

Re: Fixing app_label

2007-12-09 Thread Gary Wilson
Vinay Sajip wrote: > On Dec 7, 6:35 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: >> On Dec 7, 2007 12:56 PM, Vinay Sajip <[EMAIL PROTECTED]> wrote: >> >>> this be allowed/disallowed/checked for? As for standard template >>> loading, there's no reason that the standard template loading >>> (app_lo

#6094 - core handlers do not catch middleware exceptions

2007-12-04 Thread Gary Wilson
I've attached a patch that does the following: * Added a `handle_response` method to `BaseHandler` to factor out duplicated code in `ModPythonHandler`, `WSGIHandler`, and `ClientHandler`. * Replaced `resolver` temporary variable with a `resolver` method to ease refactoring of `get_response` met

Re: DB API - the limiting syntax, is it magic?

2007-12-04 Thread Gary Wilson
Adrian Holovaty wrote: > On Dec 4, 2007 12:57 AM, Gary Wilson <[EMAIL PROTECTED]> wrote: >> But what would the situation be with a new limit() method... >> >> objects = MyModel.objects.filter(site=1) >> first_one = objects.limit(1) >> do_something_special(

Re: filtering a QuerySet after a slice

2007-12-04 Thread Gary Wilson
Luke Plant wrote: > On Tuesday 04 December 2007 07:25:31 Gary Wilson wrote: > >> Sort of my point. Since filter() and [:] both return QuerySets why >> should they be any different: >> >> UTPerson.objects.all().filter(name__startswith='a')[:10] > &g

Re: Invalid forms and cleaned_data

2007-12-03 Thread Gary Wilson
Malcolm Tredinnick wrote: > Anybody have strong objections to ticket #5524: not completely nuking > form.cleaned_data is a form instance has any non-zero validation errors? No objections here, seems like the Right Thing to do. My data was cleaned, keep it that way. Gary --~--~-~--~

Re: filtering a QuerySet after a slice

2007-12-03 Thread Gary Wilson
Derek Anderson wrote: > even if it was possible, i don't think it's what you would really want. > logically, this would return an indefinite number of records, > somewhere between 0 and 10, depending on what's in your table, not the > first 10 records of people who's name starts w/ an 'a'.

evaluate() method for QuerySet

2007-12-03 Thread Gary Wilson
It is recommended to evaluate a QuerySet by calling list() on it. Problem is, now you have a list and not a QuerySet. Just thinking it might be nice to have an evaluate() method that would return a QuerySet object with the result cache filled. Now, if only I could think of a use case ;) Gary

filtering a QuerySet after a slice

2007-12-03 Thread Gary Wilson
Is there any reason why the following is disallowed: >>> UTPerson.objects.all()[:10].filter(name__startswith='a') Traceback (most recent call last): ... AssertionError: Cannot filter a query once a slice has been taken. I would think that it should be possible as long as the QuerySet hasn't been

Re: DB API - the limiting syntax, is it magic?

2007-12-03 Thread Gary Wilson
Adrian Holovaty wrote: > On Dec 2, 2007 11:50 PM, James Bennett <[EMAIL PROTECTED]> wrote: >> I guess I'm curious as to what's difficult or error-prone about it; >> I've never run into a problem where slicing was the cuplrit, and it >> feels like a more intuitive and Pythonic syntax than the "limi

  1   2   3   4   >