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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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 =
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
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
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
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 =
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
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
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,
> 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
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
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
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".
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
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 =
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
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
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. :)
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
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":
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
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
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
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
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
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:
ME:
>> * What do you think about including Web Typography support as a
>>built-in django feature?
Jacob:
> I think it's a great idea. We currently don't have a process by which
> apps are added to contrib, and that's the only thing holding us back.
> I'm working on proposing such a
Twas brillig at 09:49:49 06.08.2007 UTC+04 when Alex Nikolaenkov did gyre and
gimble:
AN> BTW, Can we attach configurable plug-ins to the built-in webserver? (* I'm
AN> interested in possibility. Can code "case insensitive urls plug-in" by
AN> myself. *)
I already pointed out that Django
44 matches
Mail list logo