ModelChoiceField's clean() uses default manager instead of query set

2007-08-06 Thread Nick
The clean() methods in both ModelChoiceField and ModelMultipleChoiceField use a block similar to the following in order to validate the selected choice: try: value = self.queryset.model._default_manager.get(pk=value) except self.queryset.model.DoesNotExist: raise ValidationError(ugettext(

Re: testing Django against many Pythons and databases

2007-08-06 Thread Malcolm Tredinnick
On Mon, 2007-08-06 at 22:10 -0500, Gary Wilson wrote: > I know there are various setups people have for doing this, like Jacob's > snippet: > > http://www.djangosnippets.org/snippets/106/ > > but I was wondering what other developers' thoughts would be on adding > something like this to Django p

Re: possible deficiency in newform BooleanField?

2007-08-06 Thread SmileyChris
On Aug 7, 2:28 pm, Gary Wilson <[EMAIL PROTECTED]> wrote: > I believe SmileyChris meant that a ticket should be opened about > updating the documentation. Correct > As mentioned in the comments of the ticket you mentioned above, there > are times when you do want to ensure the check box was che

testing Django against many Pythons and databases

2007-08-06 Thread Gary Wilson
I know there are various setups people have for doing this, like Jacob's snippet: http://www.djangosnippets.org/snippets/106/ but I was wondering what other developers' thoughts would be on adding something like this to Django proper. I'm just thinking that Django should be able to test itself

Re: clean_* methods should be passed the value

2007-08-06 Thread Gary Wilson
SmileyChris wrote: > I know this would be backwards incompatible, but why on earth do our > newform clean_[fieldname] methods need to get the value out of the > self.cleaned_data dict. It just seems so un-DRY. This irritates me too. I'm +1 for passing the value, as noted by my patch attached to

Re: possible deficiency in newform BooleanField?

2007-08-06 Thread Gary Wilson
Ash wrote: > What would be the point in opening a ticket when this clearly broken > behavior gets marked as 'wontfix'? > > http://code.djangoproject.com/ticket/4981 I believe SmileyChris meant that a ticket should be opened about updating the documentation. > The documents for Django newforms s

Re: clean_* methods should be passed the value

2007-08-06 Thread Nick
On Aug 7, 6:45 am, SmileyChris <[EMAIL PROTECTED]> wrote: > I know this would be backwards incompatible, but why on earth do our > newform clean_[fieldname] methods need to get the value out of the > self.cleaned_data dict. It just seems so un-DRY. > > If there is an edge case where you need to lo

Re: Simple improvement suggestion for django.contrib.syndication.feeds

2007-08-06 Thread Russell Keith-Magee
On 8/6/07, jorjun <[EMAIL PROTECTED]> wrote: > > I have never contributed a Django patch. I am a newbie with respect to > SVN and couldn't get SVN DIFF command to produce the required output. > Please excuse pasting code changes in here. Even if you can't generate an SVN diff, it would be better

clean_* methods should be passed the value

2007-08-06 Thread SmileyChris
I know this would be backwards incompatible, but why on earth do our newform clean_[fieldname] methods need to get the value out of the self.cleaned_data dict. It just seems so un-DRY. If there is an edge case where you need to look at the dict, you still could. But the normal case is that you ar

Solution to problems with newforms BooleanField

2007-08-06 Thread SmileyChris
The main problem people have with BooleanField is that it raises a ValidationError if its checkbox widget is left unchecked. here is a problem, but it's not with BooleanField - *it's with the CheckboxInput (widget)*. CheckboxInput should only be able to return a value of True or False. That's it.

Re: ANN: Alpha release of new MS SQL Server backend

2007-08-06 Thread mamcx
Thanks for the info. I test it and tommorrow in the next 2 days do another release... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developer

Re: How much test case must print runtest?

2007-08-06 Thread mamcx
Nope. I enable the verbosity to 2 and only the webdesing test are running... --~--~-~--~~~---~--~~ 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@googleg

About Changeset [5819]

2007-08-06 Thread David Danier
First: Nice, that a working FileField got merged! (see: http://code.djangoproject.com/changeset/5819) After browsing the source to update my own patches I found that FileField.save_form_data() joins the filename and self.upload_to (see http://code.djangoproject.com/browser/django/trunk/django/db/

Re: How much test case must print runtest?

2007-08-06 Thread Carlo C8E Miron
On 8/6/07, mamcx <[EMAIL PROTECTED]> wrote: > I use your config and get the same results :( Maybe you still have test.pyc in your folder? (c) -- Carlo C8E Miron PYC Troubles Solution Architect(tm) --~--~-~--~~~---~--~~ You received this message because you are su

Re: ANN: Alpha release of new MS SQL Server backend

2007-08-06 Thread pk11
hey, sorry, forgot one thing: in django/db/models/fields 222 # mssql can not handle more than two 99-s 223 return ['%s-01-01 00:00:00' % value, '%s-12-31 23:59:59.99' % value] On Aug 3, 6:34 pm, mamcx <[EMAIL PROTECTED]> wrote: > Excelent. Please send me your patch so I

Re: ANN: Alpha release of new MS SQL Server backend

2007-08-06 Thread pk11
mamcx, I sent you my mods. Jeremy, I tested the admin + pymssql backend again without my modification (i.e. changing object_id's type), and now seems to be working just fine. do not really know what was causing the issue before though. anyway, thanks for the information. Peter On Aug 4, 9:21

Re: How much test case must print runtest?

2007-08-06 Thread mamcx
I use your config and get the same results :( --~--~-~--~~~---~--~~ 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 unsubscribe from th

Re: How much test case must print runtest?

2007-08-06 Thread Ian Kelly
On 8/6/07, mamcx <[EMAIL PROTECTED]> wrote: > > Nope... > > I change the name and get the same numbers. > > The settings must have something special? what is the bare minimun? This is all that I'm using: DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'django_test.s3db' SITE_ID = 1 ROOT_URLCONF = ''

Re: How much test case must print runtest?

2007-08-06 Thread mamcx
Nope... I change the name and get the same numbers. The settings must have something special? what is the bare minimun? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this gr

Re: How much test case must print runtest?

2007-08-06 Thread Forest Bond
On Mon, Aug 06, 2007 at 10:34:32AM -0600, Ian Kelly wrote: > > On 8/6/07, mamcx <[EMAIL PROTECTED]> wrote: > > > > Ok, I do CD to the folder where test is, then run: > > > > runtests.py --settings test > > > > test.py is a settings file with the new backend and db config. You might have a name co

Re[4]: Case-insensitive URLS (was: usability issues)

2007-08-06 Thread Alex Nikolaenkov
Tom, Thank you for clarification. Now that makes a lot of sense for me. ~ Alex You wrote 6 ??? 2007 ?., 20:28:20: > On 8/6/07, Alex Nikolaenkov <[EMAIL PROTECTED]> wrote: >> > If a core dev closes a ticket with a "wontfix", you shouldn't re-open >> > the ticket unless you've made a compelli

Re: How much test case must print runtest?

2007-08-06 Thread Ian Kelly
On 8/6/07, mamcx <[EMAIL PROTECTED]> wrote: > > Ok, I do CD to the folder where test is, then run: > > runtests.py --settings test > > test.py is a settings file with the new backend and db config. > > I do a little debugging and I think find a bug. > > The test are executed on: > > failures = run

Re: possible deficiency in newform BooleanField?

2007-08-06 Thread Ash
What would be the point in opening a ticket when this clearly broken behavior gets marked as 'wontfix'? http://code.djangoproject.com/ticket/4981 The documents for Django newforms state that: BooleanField * Default widget: CheckboxInput * Empty value: None * Normalizes to: A Python

Re: Re[2]: Case-insensitive URLS (was: usability issues)

2007-08-06 Thread Tom Tobin
On 8/6/07, Alex Nikolaenkov <[EMAIL PROTECTED]> wrote: > > If a core dev closes a ticket with a "wontfix", you shouldn't re-open > > the ticket unless you've made a compelling case on django-dev and > > gotten the core devs to change their minds. "Wontfix" essentially > > means that a design deci

Re: How much test case must print runtest?

2007-08-06 Thread mamcx
Ok, I do CD to the folder where test is, then run: runtests.py --settings test test.py is a settings file with the new backend and db config. I do a little debugging and I think find a bug. The test are executed on: failures = run_tests(test_labels, verbosity=verbosity, extra_tests=extra_test

Re[2]: Case-insensitive URLS (was: usability issues)

2007-08-06 Thread Alex Nikolaenkov
> On 8/6/07, Alex Nikolaenkov <[EMAIL PROTECTED]> wrote: >> >> I never heard that tickets should not be reopened if you disagree. If >> the bug is still reproducible it should be reopened. If its >> resolution is changed to "won't fix", one should point why. And >> not just - "Oh, it is good enoug

Re[2]: Case-insensitive URLS (was: usability issues)

2007-08-06 Thread Alex Nikolaenkov
You wrote 6 ??? 2007 ?., 16:38:25: > On 8/6/07, Alex Nikolaenkov <[EMAIL PROTECTED]> wrote: >> BTW, Can we attach configurable plug-ins to the built-in webserver? >> (* I'm interested in possibility. Can code "case insensitive urls >> plug-in" by myself. *) > You're looking for "middleware":

ticket ping

2007-08-06 Thread Ian Kelly
Hi, could one of the core devs please take a look at ticket #4827? This is a severe Oracle-backend bug (syncdb failure) with a simple patch that's been around since the merge of the Unicode branch. It's been reported at least four times that I've seen, so I think that users must be encountering t

Re: Case-insensitive URLS (was: usability issues)

2007-08-06 Thread Tom Tobin
On 8/6/07, Alex Nikolaenkov <[EMAIL PROTECTED]> wrote: > > I never heard that tickets should not be reopened if you disagree. If > the bug is still reproducible it should be reopened. If its > resolution is changed to "won't fix", one should point why. And > not just - "Oh, it is good enough now".

Re: How to validate a model as a whole?

2007-08-06 Thread ludvig.ericson
Any suggestions for what to do in the meantime? :-\ --~--~-~--~~~---~--~~ 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 unsubscribe f

Simple improvement suggestion for django.contrib.syndication.feeds

2007-08-06 Thread jorjun
6c6,7 < from django.conf import settings --- > from django.conf import settings > from django.template import RequestContext 120c121 < title = title_tmp.render(Context({'obj': item, 'site': current_site})), --- > title = title_tmp.render(RequestContext(self.request,

Re: schema evolution (new and improved)

2007-08-06 Thread Derek Anderson
Russell Keith-Magee wrote: > Your approach is predicated on the assumption that migrating > v1->v2->v3 is equivalent to v1->v3. This is true if you only look at > renaming, deleting or adding the fields themselves. so i think i have a cross-over solution. :) what it boils down to is there are f

Re: test coverage [was: web typography support]

2007-08-06 Thread Jacob Kaplan-Moss
On 8/6/07, Emanuele Pucciarelli <[EMAIL PROTECTED]> wrote: > There's Ned Batchelder's coverage.py: http://nedbatchelder.com/code/ > modules/coverage.html . Haven't tried it myself, but I have to > suppose that it's Django-friendly. :) A while back I started experimenting with coverage using figle

Re: Case-insensitive URLS (was: usability issues)

2007-08-06 Thread Jacob Kaplan-Moss
On 8/6/07, Kai Kuehne <[EMAIL PROTECTED]> wrote: > Please just learn django. Thank you. Hey, that's out of line. Around here we treat everyone with respect; Alex deserves better. Next time you feel the urge to post something of this nature, take it to Digg. Only *you* can prevent flamewars! Jac

Re: test coverage [was: web typography support]

2007-08-06 Thread Brett Hoerner
On 8/6/07, Emanuele Pucciarelli <[EMAIL PROTECTED]> wrote: > There's Ned Batchelder's coverage.py: http://nedbatchelder.com/code/ > modules/coverage.html . Haven't tried it myself, but I have to > suppose that it's Django-friendly. :) http://siddhi.blogspot.com/2007/04/code-coverage-for-your-djan

Re: Case-insensitive URLS (was: usability issues)

2007-08-06 Thread Kai Kuehne
Hi, On 8/6/07, Alex Nikolaenkov <[EMAIL PROTECTED]> wrote: > > Right, so moving on to your real question: > >>Here is an example of case-insensitive urls. They rock: > >>http://www.askeri.ru/PUBLISH/ > >>http://www.askeri.ru/publish/ > > > They do indeed rock. Luckily, supporting them

Re: Case-insensitive URLS (was: usability issues)

2007-08-06 Thread Jacob Kaplan-Moss
On 8/6/07, Alex Nikolaenkov <[EMAIL PROTECTED]> wrote: > BTW, Can we attach configurable plug-ins to the built-in webserver? > (* I'm interested in possibility. Can code "case insensitive urls > plug-in" by myself. *) You're looking for "middleware": http://www.djangoproject.com/documentation/mid

test coverage [was: web typography support]

2007-08-06 Thread Emanuele Pucciarelli
Il giorno 06/ago/07, alle ore 08:10, Alex Nikolaenkov ha scritto: > IMO TDD is a very good practice. So unit-tests for applications to be > included into the standard django package are the must. Are there > tools for python showing "unit test coverage" for the module > (Something like Jester for

Custom Expires header for django.views.static.serve

2007-08-06 Thread Tonis Kevade
Hi. I thought I share some code with you. All began with my laziness to set up a Apache or Lighttp server to serve up my static files for django. So I used djangos own django.views.static.serve to serve my files. Only problem was that I was unable to set Expires header for files served that way,

Re: GSoC 2007 Status Update VI: Django REST interface

2007-08-06 Thread David Larlet
2007/8/5, Andreas Stuhlmüller <[EMAIL PROTECTED]>: > > I am currently reading "RESTful Web Services" by Leonard Richardson > and Sam Ruby. See [3] for a summary of the main points from the > chapter on best practices for REST-oriented architectures with short > notes on where the REST interface st

Re[2]: web typography support

2007-08-06 Thread Alex Nikolaenkov
Hi James! > You might want to have a look at this before starting your own project: > http://code.google.com/p/typogrify/ Thank you for your link. I saw. It implements only a small piece of typography. There are a lot more features to do, including * comprehensive documentation with examp

Re: GSoC 2007 Status Update IV: Django REST interface

2007-08-06 Thread David Larlet
2007/8/3, Andreas Stuhlmüller <[EMAIL PROTECTED]>: > > On 7/13/07, David Larlet <[EMAIL PROTECTED]> wrote: > > * About users, how can I handle django users' permissions? John > > Sutherland had already done some work on django-crudapi [1] and it > > could be interesting to allow this access contro

Re: web typography support

2007-08-06 Thread James Bennett
On 8/6/07, Alex Nikolaenkov <[EMAIL PROTECTED]> wrote: > Can you publish your plan concerning contributing applications? The first > thing I'll do in django & python will be typography support. You might want to have a look at this before starting your own project: http://code.google.com/p/typog