Today I ran into an issue where using distinct() and values() on a
queryset where the model had default ordering would return apparently
non-distinct results. After searching, I found
http://code.djangoproject.com/ticket/9186
which indicates that this is now correct behaviour. It took me a long
Issue 4 is out with a correction to the arguments for DecimalField in
the Form Fields section.
Thanks to Doug Van Horn for pointing out the error.
Download it from http://www.mercurytide.co.uk/whitepapers/django-cheat-sheet/
Andrew
--~--~-~--~~~---~--~~
You receiv
We've updated the cheat sheet to correct two typos:
- The "default_if_none" filter is now correctly spelt (thanks to
Aaron C. de Bruyn for pointing it out).
- The "ForeignKey" model field is now correctly named (thanks to
Nikos Delibaltadakis for pointing it out).
Grab it from http://www.me
On Sep 21, 8:23 am, "Nikos Delibaltadakis" <[EMAIL PROTECTED]>
wrote:
> Shouldn't ForeignKeyField to be just ForeignKey?
> Am I missing something?
No, you're absolutely correct -- thanks for spotting the error! We'll
get a corrected version out ASAP.
Cheers,
Andrew.
--~--~-~--~~---
ere in an earlier draft, but there just wasn't room.
They're not too hard to remember, though, hopefully? Off the top of
my head: counter, counter0, revcounter, revcounter0, parentloop,
first, last.
You could write them all on a single post-it note and stick them to
y
On Apr 4, 1:16 pm, Simon Oberhammer <[EMAIL PROTECTED]>
wrote:
> Magus on IRC told me that multiple django projects with different
> timezones serverd by apache / mod_python could be a problem - ie one
> changing TZ in a thread that also servers the other project.
>
> So I set timezone-setting to
On Apr 18, 4:27 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
>
> The problem is that "import all apps" is not a simple operation and has
> lots of unexpected (at least until you get used to expecting the
> unexpected) side-effects. Nested imports are the main cause. :-)
>
> The problem is tha
On Apr 4, 12:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
>
> I cannot think of any reliable way to solve this. It's a reasonably hard
> problem to solve correctly, apparently. I say this because we currently
> are *not* solving it in django/db/models/loading.py when we try to
> initialise
I've got a situation where one of my django apps needs to perform some
initialisation that includes processing the models from all the
installed apps -- and it needs its own models to have been initialised
also. Because of this, I can't do my initialization when the app's
__init__ module is loade
Recently I've found myself repeating variables many times in
templates, much like this:
{% if company.contact.email %}
Email address
{{ company.contact.email }}
{% endifvalue %}
This repetition is annoying, as well as inefficient if company.contact
involves a ForeignKey lookup.
I've created
paulh wrote:
This thread seems to have drifted away from its original purpose. The
tutorial authors seemed to have an idea about preventing the reposting
of data by use of a suitable redirect. I stated that I had been unable
to achieve this effect and asked whether anyone else had been able to
a
Adam Endicott wrote:
>
> Do any of the core devs see this as a candidate for inclusion in
> contrib?
Speaking as the author of the piece -- I don't. This code isn't
developed enough to be particularly practical as-is: to be more useful
it should probably support both natural language and boolean
12 matches
Mail list logo