On Jul 24, 8:54 pm, Alex Gaynor wrote:
> "Seen under this light, the additional 150ms latency resulting from non-
> persistent DB connection is huge - it implies almost 30% fewer
> customer orders. And it has nothing to do with traffic."
>
> I'd just like to take a moment
On Fri, Jul 24, 2009 at 7:55 PM, Glenn Maynard wrote:
> There are lots of requests for ways to build specific types of
> queries, too. You can't really commit a QuerySet method for one thing
> and then...
So, let's walk through this logically.
Suppose we start with a patch
On Fri, Jul 24, 2009 at 8:36 PM, Andy wrote:
> Seen under this light, the additional 150ms latency resulting from non-
> persistent DB connection is huge - it implies almost 30% fewer
> customer orders. And it has nothing to do with traffic.
By the way, I switched my
On Fri, Jul 24, 2009 at 8:17 PM, James Bennett wrote:
> While the specific thing you personally are asking for might not be
> that much, we can't really commit it to Django and then say "Hey, we
> only did this for Glenn and nobody else gets to ask for features
> building
On Fri, Jul 24, 2009 at 8:36 PM, Andy wrote:
>
> On Jul 24, 4:39 pm, James Bennett wrote:
>> Except this is what it turns into. So suppose a patch is added which
>> does nothing except keep the database connection open; well, that's
>> problematic
Is the Signals API public? There's
http://docs.djangoproject.com/en/dev/topics/signals/, which explains
connecting to signals (so Signal.connect is public), but the rest of
Signal, eg. Signal.disconnect, doesn't seem to be in there anywhere.
Google can't find the Signal.disconnect docstring
On Jul 23, 10:50 pm, Glenn Maynard wrote:
> In this case, that's a terrible-performance-by-default approach.
> (It's also not a default, but the only behavior, but I'll probably
> submit a patch to add a setting for this if I don't hit any major
> problems.)
Agreed.
Please
On Jul 24, 4:39 pm, James Bennett wrote:
> Except this is what it turns into. So suppose a patch is added which
> does nothing except keep the database connection open; well, that's
> problematic because it means a server process/thread that's not
> handling a request at
On Fri, Jul 24, 2009 at 7:03 PM, Glenn Maynard wrote:
> What I need is sensible, simple and faster, but since someone else
> might want to turn it into something complex and unnecessary, it
> shouldn't be done?
While the specific thing you personally are asking for might not be
On Fri, Jul 24, 2009 at 4:39 PM, James Bennett wrote:
> Except this is what it turns into. So suppose a patch is added which
> does nothing except keep the database connection open; well, that's
> problematic because it means a server process/thread that's not
> handling a
I used this syntax
.extra(where=['%s >= %s - %s'], params=['criteria1_metric1',
'criteria1_metric2', 'criteria1_value'])
however I got error.
On Jul 24, 4:16 pm, David wrote:
> Here comes a new problem. I do not know which columns' values to use;
> all I know is that they
Here comes a new problem. I do not know which columns' values to use;
all I know is that they are represented with variables. These
variables are
col_var_1, condition_operator, col_var_2, manipulation_operator,
constant_value
where:
col_var_1: col1, or col2, or col3, etc
condition_operator: >,
On Fri, Jul 24, 2009 at 5:12 PM, Margie wrote:
>
> Hi,
>
> I'm wondering if the icons in the admin app (for example, the
> addlink.gif icon) come from some standard icon (free) icon package
> where there are more goodies of the same sort? Anyone have any
> pointers for
Great. I go to pick up extra() to use.
Thanks Tim.
On Jul 24, 2:33 pm, Tim Chase wrote:
> > Such a transformation is fine. I found that my Django has no F().
> > Checking the Django doc I saw that this new feature is "New in Django
> > Development version".
>
> Such a transformation is fine. I found that my Django has no F().
> Checking the Django doc I saw that this new feature is "New in Django
> Development version".
>
> So I have to wait for the new version? Are there any other ways to
> create such a filter?
>> col1_value >= col2_value * 2
>>
Such a transformation is fine. I found that my Django has no F().
Checking the Django doc I saw that this new feature is "New in Django
Development version".
So I have to wait for the new version? Are there any other ways to
create such a filter?
Any ideas?
Thanks again.
On Jul 24, 2:01 pm,
Hi,
I'm wondering if the icons in the admin app (for example, the
addlink.gif icon) come from some standard icon (free) icon package
where there are more goodies of the same sort? Anyone have any
pointers for where those came from?
Margie
--~--~-~--~~~---~--~~
I'm following the instructions here:
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/
But when I do this kind of thing:
formset = AuthorFormSet(queryset=Author.objects.filter
(name__startswith='O'))
I always get an extra blank form at the end of my formset - regardless
of how I
It seems to me that you have to transform your fields lookup like that :
col1_value >= col2_value * 2
something like col1__gte=F('col2') * 2
Frédéric
2009/7/24 David :
>
> Hello,
>
> Here is a table "myTable" with columns of "col1", "col2", "col3", ...,
> "col5". The types
On Fri, Jul 24, 2009 at 1:31 AM, Glenn Maynard wrote:
> I see no need for a complex connection pooling service. You're making
> this sound much more complicated than it is, resulting in people
> needing to use configurations much more complicated than necessary.
Except this is
Stodge wrote:
> Say I want to inject a piece of data into every page view. For
> now, let's just say I want to inject the current time into
> each page view. I write a piece of middleware that will do it.
> But how? Do I modify the request? Or the view (process_view)?
I understand that this
Say I want to inject a piece of data into every page view. For now,
let's just say I want to inject the current time into each page view.
I write a piece of middleware that will do it. But how? Do I modify
the request? Or the view (process_view)?
Hello,
Here is a table "myTable" with columns of "col1", "col2", "col3", ...,
"col5". The types of these columns are all float. Now for two values
from any two columns of these columns, I may need to add, or subtract,
or multiply or divide these two values. With this result, I do a
condition
On Fri, Jul 24, 2009 at 6:04 PM, ashish wrote:
Well as your error message says , Template does not exist my first
guess would be that you did not Activate the admin site .. if that is
not so , you should have a look at the section , Customize the look
and feel of admin ... it
use clean method and use self.instance.fieldname to know previous value and
then compare with the new value.
On Fri, Jul 24, 2009 at 10:50 PM, Tim Chase
wrote:
>
> >> How can I tell which model fields have been modified (this is, the
> >> difference between the
Hi,
Python/Django newb here. I have a question regarding the best
approach to rendering 1-to-many relationships in a template.
I have 2 tables, Customers and Cars, where a Customer can have many
Cars, hence the 1-to-many relationship. I need to display all the
Customers with all their Cars,
On Fri, Jul 24, 2009 at 8:57 AM, Asinox wrote:
> how ill make a html text field with attr disabled?
See the ``attrs`` argument to widgets:
http://docs.djangoproject.com/en/dev/ref/forms/widgets/#customizing-widget-instances
Jacob
On Fri, Jul 24, 2009 at 8:23 AM, Rusty Greer wrote:
> from what i can tell, get_image_dimensions in
> django/core/files/images.py seems to open the files but never closes
> them. is this a bug?
Yes, it was #8817 (http://code.djangoproject.com/ticket/8817) which
was fixed a few
Just one more addition to the replies above: there's a number of
snippets[1], recipes and packages[2] which introduce purely
autogenerated safe (unique and sometimes also non-ascii-friendly)
slugs without using admin.
Autopopulated slugs, when used in URLs without exposing internal
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Matias declared:
> How can I tell which model fields have been modified (this is, the
> difference between the Model instance and the data originally retrieved
> from the database) from inside the model's save() method?
You can always retrieve the
Hi,
How can I tell which model fields have been modified (this is, the
difference between the Model instance and the data originally retrieved
from the database) from inside the model's save() method?
Any idea?
Thanks a lot!
--~--~-~--~~~---~--~~
You
hi, guys,
how ill make a html text field with attr disabled?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To
> Have you tried the save_formset of the ModelAdmin?
> http://docs.djangoproject.com/en/dev/ref/contrib/admin/
No, i am trying to create user view, not admin.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
On Thu, Jul 23, 2009 at 5:55 PM, Joshua Russo wrote:
> On Thu, Jul 23, 2009 at 9:31 PM, Rusty Greer wrote:
>>
>> how do i create a query on the size of an image?
>>
>> for example:
>> class Image(models.Model):
>>
>> image =
On Jul 24, 3:13 pm, cornjuliox wrote:
> File "C:\Blog2\..\Blog2\Engine2\models.py" in save
> 48. super(Entry).save()
>
> Exception Type: AttributeError at /admin_add/
> Exception Value: 'super' object has no attribute 'save'
>
> Am I not supposed to be using
I ran into some conceptual problems with lazy vs non-lazy too. Any global
context needs to be lazy. This includes everything declared outside of any
function or class context and the class instance variable declarations (tho
not the declarations made in __init__ or __new__ of a class)
On Fri, Jul
--
From: "Karen Tracey"
Sent: Friday, July 24, 2009 3:16 PM
To:
Subject: Re: Admin - related objects when using multiple foreign keys to a
parent model
> On Fri, Jul 24, 2009 at 9:02 AM,
On Thu, Jul 23, 2009 at 10:53 PM, Nail wrote:
>
> Hello, developers!
>
> Please help me with one problem. I spent 2 days attempting to solve
> it. And now i have some solution, but i don't like it.
>
> My application manages music tracks.
> There is models: Artist, Album,
Could someone lend a hand? Instead of using the built-in admin
interface, I'm trying to build an 'admin page' of my own using
ModelForms, but the problem is that the SlugField won't prepopulate
like it does with the default admin so I've resorted to overriding the
save() method and including a
On Fri, Jul 24, 2009 at 9:02 AM, Haestan wrote:
>
> Hi,
>
> let's assume the following simple model:
>
> class Child(models.Model):
>father = models.ForeignKey(Adult, related_name="father")
>mother = models.ForeignKey(Adult, related_name="mother")
>
> class
Hi,
let's assume the following simple model:
class Child(models.Model):
father = models.ForeignKey(Adult, related_name="father")
mother = models.ForeignKey(Adult, related_name="mother")
class Adult(models.Model):
name = models.CharField(max_length=255)
Now, if I try to delete an
Thank you Emily For pointing me to right direction.
On Jul 24, 11:41 am, Emily Rodgers
wrote:
> On Jul 23, 11:06 pm, urosh wrote:
>
>
>
> > Hi.
>
> > I want to create phone book. I want that this phone book list will be
> > ordered by
Hi,
I've got a really strange error on one of my sites. There is an
Organisation model which has a dozen of fields and 1,300 rows.
Saving organisation details in the admin usually works fine except for
one organisation. When I click 'Save', the page loads for ever and
then it fails with a 502
Hi folks,
I'm working throu the Django Tutorials and am on no. 3.
No matter where I put my 404.html and 500.html template files I am
always getting this traceback:
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\django\core\servers
\basehttp.py", line 278, in run
OK, thanks for suggestion - however it seems the problem was somewhere
else - I was using ugettext where ugettext_lazy was supposed to be
used (ex. in forms.py).
The documentation should be more clear that the choice between
ugettext and ugettext_lazy is quite important and may lead to strange
In my opinion, every version is good for learning. Just try it. And if
you encounter difficuties for upgrading to another one, you will learn a
lot from it.
XUN ZHOU 写道:
> hello, I am new beginner in django. I want to learn python with django
> and later I want to write my first application
On Fri, Jul 24, 2009 at 6:32 PM, Kenneth
Gonsalves wrote:
>
> On Friday 24 Jul 2009 2:59:29 pm XUN ZHOU wrote:
>> hello, I am new beginner in django. I want to learn python with django and
>> later I want to write my first application in google App engine.
>> there are so
On Friday 24 Jul 2009 2:59:29 pm XUN ZHOU wrote:
> hello, I am new beginner in django. I want to learn python with django and
> later I want to write my first application in google App engine.
> there are so many different version of django.
> which version should I beginn? thanks your help or
hello, I am new beginner in django. I want to learn python with django and
later I want to write my first application in google App engine.
there are so many different version of django.
which version should I beginn? thanks your help or advice
--
Xun Zhou
TU Berlin
On Jul 23, 11:06 pm, urosh wrote:
> Hi.
>
> I want to create phone book. I want that this phone book list will be
> ordered by number of dialing this number. I think of using two tables
> one with phone numbers and one for phone dialing statistics (how many
> times user
Hi,
I have a problem with Django - I'm trying to build a website which
will work on a couple of different domains and each domain should have
a different language/locale.
Example:
domain.com -> English
domain2.pl -> Polish
The SITE_ID should change accordingly when I visit the corresponding
2009/7/24 Russell Keith-Magee :
>
> On Thu, Jul 23, 2009 at 5:43 PM, Emily
> Rodgers wrote:
>>
>> Hi all,
>>
>> I am currently working on some web apps that use django for the back
>> end, and extjs for the front end (using JSON to pass
On Fri, Jul 24, 2009 at 10:46 AM, Benjamin Wohlwend wrote:
>
> On Jul 24, 10:37 am, Benjamin Wohlwend wrote:
>
>>
>> if all(f.is_valid() for f in (form1, form2, form3)):
>> # ok, save
>>
>
> Oops, forgot to mention that I had to implement my own
Hello everyone!
I was wondering what technique people use to return pretty pages with
410 status code (ResponseGone) since search engines keep coming back
for removed pages that return 404. I currently use something like
this, but maybe someone has come up with a nicer shortcut or
On Jul 24, 10:37 am, Benjamin Wohlwend wrote:
>
> if all(f.is_valid() for f in (form1, form2, form3)):
> # ok, save
>
Oops, forgot to mention that I had to implement my own version of all
(), which doesn't short cut:
def really_all(iter):
all_true = True
for
Hi,
On Jul 24, 8:41 am, Matthias Kestenholz
wrote:
> if request.method == 'POST':
> # initialize forms with request.POST and prefix
> if form1.is_valid() and form2.is_valid() and form3.is_valid():
> # save the data from the individual forms
>
Thank you for your help.
Now I don't have to restart the terminal again. I still have to interrupt
django though. But it's better than before. I whish Django would just
interrupt the session by itself.
Toutanc
On Thu, Jul 23, 2009 at 3:00 PM, Tom Evans wrote:
>
> On
On Jul 24, 5:46 am, Mike Dewhirst wrote:
> I'm new to Django and want to express a self-referencing design
> feature to link clients in the same table with each other. Django is
> currently objecting to this. Could you please point me to
> documentation which will let me
On Jul 24, 8:27 am, StevenC wrote:
> Hey,
>
> Im new to Django and have create an online application system.
>
> I need to know is it possible to customise the List Display and have a
> customn link next to EVERY entry which points to a nother URL with its
> ID within.
>
>
Hey,
Im new to Django and have create an online application system.
I need to know is it possible to customise the List Display and have a
customn link next to EVERY entry which points to a nother URL with its
ID within.
For example,
If i have a student application. Their ID being 1. I need a
60 matches
Mail list logo