On Sunday, September 14, 2014 6:35:43 AM UTC+2, Alex French wrote:
>
> I'm using Django 1.7 and I noticed something odd in my postgres query
> logs. Almost every query has a "LIMIT 21" clause, including queries of the
> type "Thing.objects.get(pk=#)", which could only ever return one row. This
>
I realize that's how it's supposed to work, but this happens regardless of
whether or not results are printed. If you use postgres with the tutorial
project and look at the query log, you can see the limit clause applied to
primary key lookups.
--
You received this message because you are subs
Okay, after looking through the source code and documentation it seems that
django uses the limit for primary key lookups as a cautionary measure and
also to support the MultipleObjectsReturned exception in case something
goes wrong.
--
You received this message because you are subscribed to t
So why 21, precisely?
On 14 September 2014 16:45, Alex French wrote:
> Okay, after looking through the source code and documentation it seems
> that django uses the limit for primary key lookups as a cautionary measure
> and also to support the MultipleObjectsReturned exception in case something
On Sun, Sep 14, 2014 at 12:48 PM, Ben Collier wrote:
> So why 21, precisely?
>
I can't find the exact changeset in which it was introduced, but I do
remember why :)
There was an incident involving a large Django installation at World
Online, where we were attempting to isolate a bug in our code
On 2014-09-14 13:23, James Bennett wrote:
> This was something that could bite any user of Django with large
> enough QuerySets, so the behavior was changed in upstream Django to
> only show 20 objects.
[snip]
> This means that repr() on a QuerySet will never instantiate huge
> numbers of objects,
Thanks for the info. I am beginning to see the power of these
substitutions.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegro
hi brother, how are you?
I think this can help you.
https://github.com/texastribune/django-object-actions/issues/12
2014-09-13 22:08 GMT+01:00 Eric Tanter :
> Hi,
>
> Is it possible to specify that a FileField, when viewed in the admin,
> opens its target url in a new tab?
>
> Thanks!
>
>
>
> -
Hi everybody!
I have my old project in Django 1.6, and works fine in development... when
DEBUG=True.. but when I update to 1.7, stop to serving static files.
Here is my files:
url: https://gist.github.com/fellipeh/06746184ee0878f70bc2
template: https://gist.github.com/fellipeh/798b32661d4f9fe37
This is the nature of the HTTP protocol and RESTful architectural style.
Understand that a URI is just an address for a resource - it is not an
action or command. The HTTP verbs are the actual commands. So which HTTP
verb you send determines what action you want to occur on that resource.
This mean
What are you using to serve static files? You normally setup your server
e.g. Nginx to take care of this.
Here's an example of Nginx setup file which serves static files from
/webapps/hello_django/static/:
server {
listen 80;
server_name example.com;
client_max_body_size 4G;
11 matches
Mail list logo