On Fri, Nov 8, 2013 at 1:44 AM, Robin St.Clair wrote:
> The last time I checked the use of IN, all the records from the database in
> the query were brought back to the workstation, rather than being processed
> on the backend and only the results returned to the workstation.
Django ORM's __in o
On Tue, Nov 12, 2013 at 8:57 AM, m1chael wrote:
> People have always recommended to me that storing images directly in a
> database is a bad idea.
it IS a bad idea, but that doesn't mean it shouldn't be possible.
there are several Storage subclasses that do that, and it's not hard
to do another
On Thu, Nov 14, 2013 at 3:12 AM, Anton Pirker wrote:
> The optimal solution would be that I can give a number of auth_users to a
> script, and it will extract all data neccessary to have a complete set of
> data for the given users.
>
> A plus would be, if the email addresses of the users would be
On Fri, Nov 15, 2013 at 12:08 PM, Jorge Cardoso Leitão
wrote:
> I believe that is not possible with Django views. Views are made for
> request-response, i.e. the client sends a request, the view returns a
> response, and that's it, end of connection.
i think the WSGI standard does support it, by
On Sat, Nov 16, 2013 at 7:40 AM, Thorsten Sanders
wrote:
> realms=[1]
> data = AuctionData.objects.filter(itemid__exact=itemid,realm__in=realms)
> data2 = AuctionData.objects.raw('SELECT * FROM auctiondata_auctiondata WHERE
> itemid_id=%s AND realm_id in %s ',[itemid,realms])
not sure if it's re
On Thu, Apr 14, 2011 at 3:20 PM, Mike Ramirez wrote:
> A good programmer with experience, should have a few libraries around from
> other projects that add the polish and need minor tweaking.
to get the basic post+comments+voting yes, a few days seems enough (if
you already have Django, markdown
On Fri, Apr 15, 2011 at 9:25 AM, Jirka Vejrazka
wrote:
> I use exactly the same setup. Look up the "django-odbc" package.
> This will be quite easy to use and setup, but there are some
> unresolved bugs in that package related to multi-db support. Most of
> them have patches attached to their tic
On Fri, Apr 15, 2011 at 8:54 PM, Pedro Kroger wrote:
> result = self.client.post('/dashboard/')
>
> But I don't know how to test if the result is the dashboard or the
> login page. Could you guys point me in the right direction?
from the docs
(http://docs.djangoproject.com/en/1.3/topics/testing/
On Thu, Apr 21, 2011 at 5:20 PM, octopusgrabbus
wrote:
> It seems to return a CsInvHold object reference.
you still don't show why you think that's happening. what tests have
you done? what do you mean by "it seems to"?
--
Javier
--
You received this message because you are subscribed to th
On Wed, Apr 27, 2011 at 10:48 AM, Oliver Andrich
wrote:
> So, I was looking into possible solutions. As you can't download anything
> via ajax directly, you have to trick the browser into caching it and then
> "download" the cached version.
can't you create an invisible iframe and do the download
On Fri, Apr 29, 2011 at 12:17 PM, Jeff Blaine wrote:
> "primary_key=True implies null=False and unique=True. Only one primary key
> is allowed on an object."
> So that unique=True part is inaccurate? Or is that, again, another thing
> that will fail only at validation?
did you test pass more tha
Hi All,
for the first time, i'm using multiple databases. specifically, i
have 'my' data in a MySQL db (set as 'default') but also need to get
some extra info from a proprietary system with it's own Oracle DB, for
this i got a user/password with read/only privileges (only SELECT and
friends). Of
On Fri, Apr 29, 2011 at 1:16 PM, Shawn Milochik wrote:
> This doesn't help if the same host is being used, but you can get around
> this by creating a second settings file and using it during your tests.
thanks, i forgot that option.
i'm using that to override the engine of the oracle database,
On Sun, May 1, 2011 at 11:53 PM, Matias Hernandez Arellano
wrote:
> i only use this to test
> def upload_image(request):
> if request.method == 'POST':
> return "request.FILES['image']"
> return "NO imagen subida"
is this your view function? if so, it should return a response
object
On Wed, May 4, 2011 at 11:42 AM, pankaj sharma
wrote:
> in template..
>
> {% for college in list %}
> {{college.city}}
> {% endfor %}
>
> in views.py
>
> def list(request):
> college_list=College.objects.all()
> return render_to_response(
> 'coll
On Fri, May 6, 2011 at 2:53 PM, AJ wrote:
> I am impressed at the maturity of folks around here. Keep up the good work
> folks. :)
unfortunately, it's still impossible to help the original poster...
let's hope he follows Shawn's advice and then come back with better
context for his needs.
--
J
On Sat, May 7, 2011 at 1:41 AM, GKR wrote:
> still i was not able to get what Shawn replied "How to ask an actual
> question so maybe someone can answer it."
>
> please get me in a lil bit descriptive way.
first we would need some context to know where you're standing.
- What do you know? Have y
On Sat, May 7, 2011 at 11:21 AM, Juan Hernandez wrote:
> django-extensions does something similar
second that
typically i start developing an app by drafting the models. i keep a
window with the output of django-extensions updated automatically
every time i save. makes it so easy to keep the b
On Fri, May 13, 2011 at 9:47 AM, Boštjan Mejak wrote:
> P.S.: What does OT stand for?
off-topic
--
Javier
--
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 unsubscribe from
On Fri, May 13, 2011 at 11:45 AM, Thomas Weholt wrote:
> even sell it as
> part of a larger piece of software
i don't think GPL allows it.
--
Javier
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
On Fri, May 13, 2011 at 12:13 PM, Thomas Weholt wrote:
> And the point you're making about the non-legal isssues are just as
> important for me as I want to "use" the community to make my own
> software better. Hmmm ... as one of those copylefters it's somewhat of
> a bitter pill to swallow not to
On Wed, May 18, 2011 at 1:10 PM, John Wheeler wrote:
> Maybe I'm just not in with serving things off S3 or whatever you assume most
> people will do
not necesarily S3; but you definitely need a frontend webserver, which
is much better for static files than Django
--
Javier
--
You received thi
On Fri, May 20, 2011 at 4:54 AM, BobX wrote:
> Platforms I've got available are Linux or Windows.
Kate does it. and hence, _every_ KDE application
--
Javier
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email t
On Fri, May 20, 2011 at 7:55 AM, Michael Giarlo
wrote:
> I suspect we would go with #3
definitely #3. it's called multi-tenancy, and it's a mess to add to
an existing application, much better to design from the start.
for the most part, it means most of your tables will need a 'tenant'
foreign
On Tue, May 31, 2011 at 9:20 AM, snfctech wrote:
> I was hoping there was a little less java/ more django way to do this
i haven't seen any Java around Dojo toolkit
--
Javier
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
On Fri, Jun 3, 2011 at 1:12 PM, AJ wrote:
> To change the question or ask a new one too: what name do you suggest as a
> good, reliable yet economical hosting provider - Both for personal static
> website hosting and little Django web projects?
small VPSs tend to be the best answer if you don't m
On Sat, Jun 4, 2011 at 12:29 AM, AJ wrote:
> My application does require emailing users and members of the website. This
> is mostly system mail and users will not email amongst themselves.
on webapp servers i usually install ssmtp. it's not for handling
user's email, nor for receiving messages.
I have never seen that usage of Meta. where is it documented?
--
Javier
--
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 unsubscribe from this group, send email to
django-
On Mon, Jun 13, 2011 at 7:05 PM, creecode wrote:
> I started out with straight shell scripts and have switched over to
> management commands.
same here. i feel dumb every time i have to maintain those old
scripts, things are much easier with management commands.
if you don't want your users to
On Fri, Jun 24, 2011 at 3:52 PM, sony wrote:
> I need to call this file and the output given by it has to be inserted
> into a database table which I have already created using the models.py
> file.
when do you want this to be called? on response by a web request? at
a certain hour every day?
On Mon, Jun 27, 2011 at 4:50 AM, Anton Pirker wrote:
> But when i run my django app under gunicorn and i call the function with the
> @async decorator nothing happens at all...
are you running the queue consumer daemon?
--
Javier
--
You received this message because you are subscribed to the
On Tue, Jun 28, 2011 at 2:53 AM, Anton Pirker wrote:
> Ah! There is a queue consumer daemon! ;) Thank's for this hint!
just checked and the @async decorator doesn't use the queue/consumer
facility also included. sorry for the wrong hint.
what @async does is adding to a python-standard Queue ob
On Sat, Jul 2, 2011 at 8:07 AM, Matthew Gardner wrote:
> a = A.objects.get(pk=some_id)
> b_set = a.b_set.select_related().all() # recommended in the Django
> documentation for some queries
> And b_set comes up empty, for some reason that I can't explain.
a.b_set isn't a QuerySet; it's a Related
On Wed, Jul 6, 2011 at 11:05 AM, Graeck wrote:
> some "if you app needs to do A, then Django is better" type
> stuff?
what about this one: "if you app needs to work on the server, then
Django is better"
--
Javier
--
You received this message because you are subscribed to the Google Groups
"D
On Wed, Jul 6, 2011 at 5:55 PM, Andre Terra wrote:
> Maybe it's just a matter of endorsing SO more adamantly. When compared
> to the other solution, none is as flexible and complete.
newbie questions is one thing, collaboration is another, group
communications is another one.
for the first one,
On Fri, Jul 8, 2011 at 9:18 AM, Cal Leeming [Simplicity Media Ltd]
wrote:
> In the above scenario, ulimit would apply that limit to everything
> within that forked supervisord instance, correct?
>
> Therefore, if nginx-wrapper calls ulimit at almost the exact same
> point as other-wrapper, there c
Hi,
I'm having a very weird problem, hope somebody can shed some light.
some time ago, I developed an internal app at my officeIt using Django
1.1 (final), and it has been running with very few issues, on a small
virtual machine.
Now i have to do some non-trivial changes, so i set up a Virtualen
Ok, error fixed.
the issue was documented on ticket #12720, it was a change on Python's
SimpleCookie implementation between 2.6.2 and 2.6.4 that broke the way
the test client creates requests.
updating to 1.1.4 (instead of naïvely asking for 1.1) restored sanity
into the world.
and i learned a f
On Thu, Jul 14, 2011 at 12:06 PM, Hummingbird wrote:
> All right Tom.
> Let me look into admin.
> Then perhaps I would require the help from list.
I (like everybody else here) don't want to sound rude; but i don't
think you'll get anywhere with this approach.
Django is a big framework, just read
On Fri, Jul 15, 2011 at 6:41 AM, samuele.mattiuzzo wrote:
> Nope, what i wanted to achieve is just to have django forms spawn my
> custom html instead of the default one.
note that you can simply not use the form rendering, simply use your
HTML (in a template, or even on a static page) and you ca
On Thu, Jul 14, 2011 at 5:22 PM, Derick Felsman
wrote:
> Hi,
>
> I'm brand new to django and have been having trouble setting it up
> with apache and mod_wsgi on my new mac with xcode 4 installed. All
> the resources i've been able to find are either outdated or don't work
> with an xcode 4 insta
On Fri, Jul 15, 2011 at 3:40 PM, Andre Terra wrote:
> Do you have a strong reason for running windows on your host?
> Developing/deploying django on linux is about a billion times easier.
could be wrong; but i think the hard part is not because of the OS,
but because of IIS, which doesn't support
On Mon, Jul 18, 2011 at 9:56 AM, Cal Leeming [Simplicity Media Ltd]
wrote:
> It stores the IP address in integer form, meaning the lookups on large
> tables are much faster:
are they?hashtables shouldn't be too sensitive to key size, as
long as the string size stays bounded... like on IP addr
On Mon, Jul 18, 2011 at 10:13 AM, Javier Guerra Giraldez
wrote:
> On Mon, Jul 18, 2011 at 9:56 AM, Cal Leeming [Simplicity Media Ltd]
> wrote:
>> It stores the IP address in integer form, meaning the lookups on large
>> tables are much faster:
>
> are they? has
On Mon, Jul 18, 2011 at 4:55 PM, Phil wrote:
> I did run "./manage.py runfcgi
> method=threaded host=my ip address port=80"
don't use port 80 for FastCGI. chances are that it's already used
--
Javier
--
You received this message because you are subscribed to the Google Groups
"Django users"
On Wed, Jul 20, 2011 at 1:42 PM, Phil wrote:
> if I can get a standard HTML to display on port 80 with lighttpd does
> that still mean I have to use a different port for fcgi?
absolutely.
the port used between the webserver and webapp must _not_ be the same
where the browsers connect to the webs
On Wed, Jul 20, 2011 at 2:02 PM, Phil wrote:
> "host" => "my ip address",
sometimes flup (and other fastcgi launchers) bind only to the
127.0.0.1 IP. if you want to put the webserver and webapp on
different machines, be sure to bind to all IPs (typically setting "0"
as IP on the launc
On Thu, Jul 21, 2011 at 10:27 AM, bruno desthuilliers
wrote:
> I maintain, from experience, that custom commands are the simplest,
> safest and most flexible solution.
same here
--
Javier
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
On Sat, Jul 23, 2011 at 3:03 PM, bruno desthuilliers
wrote:
> I don't understand what you mean by "serverside apps" here - I mean,
> Django IS for serverside applications, not client side (which would
> require javascript).
There are other kinds of servers and clients besides web, you know.
Also
On Mon, Jul 25, 2011 at 2:03 PM, webcomm wrote:
> I want to override the save method in one of my models. How do I know
> if I'm calling save on a newly created item or on one that is already
> in the database? How to make that distinction in my save method?
if it has an id, it's not new
--
J
On Mon, Jul 25, 2011 at 2:50 PM, webcomm wrote:
> try:
> self.id
> except NameError:
> # run this code if it is a new item
> else:
> # run this code if this is a previously saved item
works, but it's nicer to use "if hasattr(obj,field): "
> More generally, what do you think of this state
On Tue, Jul 26, 2011 at 4:09 AM, fjanon wrote:
> - do I need to update the database schema and how do I get the
> appropriate SQL change/patch from Django?
> - is the unique constraint supposed to work when updating an instance
> as well as creating a new one?
unique_together creates a constraint
On Tue, Jul 26, 2011 at 9:23 AM, Andre Terra wrote:
> You can take a look at using something like nginx for serving small static
> files, which can otherwise keep Apache busy and therefore delay its response
> for more important tasks.
>
> At the risk of flaming, I should note that I have never he
On Tue, Jul 26, 2011 at 11:33 AM, Dimitry Zolotaryov wrote:
> Knowing this, any advice on the original question would be greatly
> appreciated.
I haven't done any deployment on windows; but i do know some helpful facts:
- microsoft invests a lot of money in making sure that high-profile
OSS proj
On Mon, Aug 1, 2011 at 2:51 PM, Chris Seberino wrote:
> Thanks. I'll look into that. Is there no way to have a view hand off
> a page to Apache?
> If there was, I could have a view that was password protected and only
> when I was in the view would I allow the apache page to be served.
that's e
On Thu, Aug 4, 2011 at 2:14 PM, nixlists wrote:
> I need to rewrite the view so that for each object I need to make a
> simple calculation based on the data in the fields of that object
you can simply add a method to your model class:
class Claim(models.Model):
contract = models.ForeignKey(Co
On Thu, Aug 4, 2011 at 2:19 PM, diafygi wrote:
> Is there a built in way to get:
>>>Model.objects.all().something_pk_values()
> {1 : {'vin':189554}, 2 : {'vin':189555}}
built in to Python:
dict ((o.pk, o) for o in Model.objecs.all())
--
Javier
--
You received this message because you are
On Thu, Aug 4, 2011 at 3:26 PM, nixlists wrote:
> for claim in cset:
> rebate = claim.quantity * price * rebate_pct #price and rebate_pct
> are in other models
> claim.rebate = rebate
you're modifying the 'claim' objects cached by the queryset. as soon
as the queryset loads another part of
On Thu, Aug 4, 2011 at 3:53 PM, nixlists wrote:
> What's the correct way to write the view then? Any work-arounds?
- collect the modified objects to a list, don't rely on the queryset
to store them
or
- add a method to the model, as i mentioned originally.
--
Javier
--
You received this mes
"great circle" doesn't mean what you think...
http://en.wikipedia.org/wiki/Great_circle
--
Javier
--
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 unsubscribe from this g
On Fri, Dec 17, 2010 at 5:57 AM, Michel Thadeu Sabchuk
wrote:
> What do you suggest me? Is django too expensive to serve this datetime
> or may I use another scripting language directly from nginx, Maybe PHP
> or Perl?
PHP/Perl are at least on the same order of magnitude as Python/Django.
If you
On Fri, Dec 17, 2010 at 1:20 PM, Jonas H. wrote:
> Blog.objects.filter(post__tags__name="foo",
> post__tags__name="bar")
untested:
Blog.objects.filter(post__tags__name="foo").filter(post__tags__name="bar")
--
Javier
--
You received this message because you are subscrib
On Sat, Dec 18, 2010 at 11:06 AM, Mingming Wang wrote:
> From the tutorial of Django, there is the following code in here
> Who knows the mechanism behind a redirect or a direct response? Refer the
> comments below. Thanks a lot!
HttpResponseRedirect returns a 301 or 302 response code to the
brow
On Sat, Dec 18, 2010 at 3:16 PM, JMVmedia.es wrote:
> In the urls.py of one application i decided to use this idea.
>
>
> import os
> APP_DIR = os.path.dirname(os.path.abspath(__file__))
> APP_NAME = os.basemane(APP_PATH)
>
> I'm not sure about the performance implications of using this os
> i
2.1) use the sum() aggregation with the queryset, making the DB do the
work. pass to the template in an extra variable
--
Javier
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.co
in the view:
persons = Person.objects.all().order_by('group')
in the template:
{% for p in persons %}
{% ifchanged p.group %}
{{p.group}}:
{%endifchanged%}
{{p.name}}
{% endfor %}
--
Javier
--
You received this message because you are subscribed to the Google Groups
"Django users
On Wed, Dec 22, 2010 at 2:55 AM, Andy wrote:
> MySQL with MyISAM tables doesn't support Foreign Key.
to be precise, it's supported but ignored. so, Django generates it,
and if you're using InnoDB tables, it will work as intended; if it's
MyISAM, it won't make a difference.
--
Javier
--
You r
On Fri, Dec 24, 2010 at 12:36 AM, muzhig wrote:
>
> how to select all entries of blogs in category?
Entry.objects.filter(blog__category = category)
--
Javier
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email t
On Sun, Dec 26, 2010 at 1:40 AM, Andy wrote:
> Planning ahead, if the website gets popular, how do I scale it out so
> that the images (both original and thumbnails) will be stored in and
> served from multiple servers? Maybe a cluster? Is there any open
> source software that would help me in thi
On Fri, Jan 7, 2011 at 10:09 AM, Mo Mughrabi wrote:
> If am reinventing the wheel and if there is such thing that has been
> developed already, any one can suggest, I would be more than happy to go
> through it.
yes, there are a few ones around there. (as i found after realizing
that what i had
On Fri, Jan 7, 2011 at 11:57 AM, Mo Mughrabi wrote:
> Any ideas of alternative solutions?
sure, a quick googling gives at least:
https://github.com/maaku/django-workflow
http://pypi.python.org/pypi/django-workflows
the last one at least seems quite active. I haven't made up my mind
yet on whic
On Mon, Jan 10, 2011 at 10:56 AM, evstevemd wrote:
> In PHP I just put my project as subdirectory of /var/www/
> and then access them via http://localhost/
> How do I do with Django?
Django is not a page-based template system like PHP. it's a
long-running application that answers web requests.
On Mon, Jan 10, 2011 at 5:02 PM, Ovnicraft wrote:
>> I just look at the source itself for this.
>
> or use pydoc
right.
i think what Simon means (but still can't articulate) is the
difference between explanations (which are great in the Django docs)
and references (which aren't so good).
but th
On Mon, Jan 10, 2011 at 6:51 PM, Russell Keith-Magee
wrote:
> I am yet to meet an online forum interface that doesn't make me want
> to gouge my own eyes out. For my money, email is a vastly preferable
> interface in almost every respect.
wholeheartedly agree. (and i'm sure not to be the only on
On Tue, Jan 11, 2011 at 2:37 AM, Kenneth Gonsalves
wrote:
> On Mon, 2011-01-10 at 11:12 -0500, Javier Guerra Giraldez wrote:
>> Django is not a page-based template system like PHP. it's a
>> long-running application that answers web requests.
>
> I do not think it is
On Tue, Jan 11, 2011 at 9:00 PM, Kenneth Gonsalves
wrote:
> I do not think it does - django is not a webserver or server like zope
> for example. So what does 'stays up' mean?
it is. depending on how you deploy, it's a FastCGI server, or a WSGI server.
in any case, the process is started once,
On Tue, Jan 18, 2011 at 8:43 AM, Cal Leeming [Simplicity Media Ltd]
wrote:
> Personally, I would have liked to have seen some of these features merged
> into the Django core, rather than forked into a separate project, but that's
> just me.
AFAICT, it's not a fork, it's a set of apps that you use
On Wed, Jan 19, 2011 at 5:33 PM, Afke wrote:
> "You just need to
> put your python scripts under cgi-bin folders and run them"
sounds like they allow one-shot python scripts but not long-running
python apps (like Django)
i think there's some hacky way to make it work; but performance would
be te
On Thu, Jan 20, 2011 at 4:26 PM, Andrew Marder
wrote:
> Problem is there doesn't seem
> to be an environment variable in Django that will tell me whether my
> code is being tested.
that defeats the purpose of testing, doesn't it?
even more in your case, since you want to hide the 'too experiment
On Fri, Jan 21, 2011 at 2:11 PM, brian.mus...@ff.com
wrote:
> why
> does it have to be so modular and abstract?
because it's a good thing?
of course, there are several 'shortcuts' for common ways to tie
modules together. maybe there could be a couple more
--
Javier
--
You received this
On Mon, Jan 24, 2011 at 1:43 PM, Kimberly Harvey wrote:
> I am using the Django inside the Linux-Debian on my windows 7 machine.
do you run your browser in Windows or Linux?
if it's on windows, then accessing the dev-server on the Linux virtual
machine is just like going to any other machine; yo
On Tue, Jan 25, 2011 at 10:36 AM, Ben Dembroski wrote:
> When I run syncdb, the
> only result is 'no fixtures found.'
in Django-speak 'fixtures' are external files with data to be inserted
in the database, could be in XML, JSON or YAML. do you use them?
maybe you should copy those too from your
On Tue, Feb 1, 2011 at 5:41 AM, gintare wrote:
> What is better performance of the Django, Sqlite3.
> Have 20.000 entrances in the table with 1000 columns
> or 2.000.000 entrances in the table with 10 columns
I would hate to work with a 1000 column table. and row-oriented
databases (like all tra
On Thu, Feb 3, 2011 at 7:50 PM, Tony wrote:
> Is there any viable,
> simple way to use the jquery grid plugin with django fairly quickly?
I made my own, which i find very usable and intend to eventually
share; but there's still no documentation, and very few examples.
if you can wait a week or t
On Fri, Feb 11, 2011 at 11:18 AM, Santiago Caracol
wrote:
> There is no point in storing the regex strings in a pickle field. I
> already have the regex strings in ordinary django fields. What I want
> to store is *compiled* regular expressions in order to be able to use
> them without having to c
On Wed, Mar 2, 2011 at 4:21 PM, Tim Sawyer wrote:
> However, my web page now gets Harry Størksen instead.
looks like part of your stack is still interpreting utf-8 data as latin1
check that
1: the field
2: the table
3: the database
4: the client connection
5: the webapp
6: the template
7: the h
On Thu, Mar 17, 2011 at 7:53 AM, maciekjbl wrote:
> My problem is in the intranet this site
> won't see the world :)
why is this a problem? you can use the same setup.
the main difference (at least for my own intranet-only apps) is that
usually you don't get as many users, nor exposive growth.
On Thu, Mar 17, 2011 at 3:04 PM, maciekjbl wrote:
> Ok ... so my main problem is that it's my first Django, Apache, Nginx
> instalation ever.
I'd say keep it simple. specially on an intranet-only setup where
you're unlikely to need the absolute maximum performance.
the two-server advice is usef
On Fri, Mar 18, 2011 at 10:02 AM, Christophe wrote:
> Btw, I tend to disagree when you write "never use relative URLs", for
> the reason I stated above (relocating a webapp), on the other hand I
> totally agree with "never manually create a URL"!
if you let Django manage the URLs, it won't have
On Tue, Mar 22, 2011 at 9:49 PM, Brian Neal wrote:
> I studied the SQL that Django generated and it seemed fine to me.
> That's why I wonder if it is a MySQL issue since the EXPLAIN said it
> had a possible key (PRIMARY) but then ended up not using it (bottom
> one):
that's because it saw so few
On Tue, Mar 22, 2011 at 10:06 PM, Brian Neal wrote:
> I see. There are in fact only 15 forums. But why does it take 40
> seconds? I can get much better results if I do a select on each forum
> individually and combine them together in Python code. So in this case
> 15 selects is far better than 1.
On Tue, Mar 22, 2011 at 10:42 PM, Brian Neal wrote:
> This is what I came up with to reduce the long times I was
> seeing (but it still is slow). This is probably going to get ugly in
> email, maybe I should have dpasted it:
ugliness is assumed in SQL :-)
is there an index on Post.creation_date
On Wed, Mar 23, 2011 at 7:51 AM, Brian Neal wrote:
> Any other thoughts? Thanks.
>
are the EXPLAINs from these exact SQL queries? i don't see why it
cares about the forum_forum table, which isn't mentioned on the
queries.
other than that, i don't see why it would be so slow
--
Javier
--
You
On Wed, Mar 23, 2011 at 10:45 AM, Brian Neal wrote:
> Sorry, my bad. I've been tweaking things in vain. Here are the correct
> EXPLAINS.
>
> http://dpaste.com/524865/
ok, now it's obvious.
the second query (the one with topic__forum__in=forums, right?) is
scanning the whole topic table (12Krows)
On Wed, Mar 23, 2011 at 11:51 AM, Christophe Pettus wrote:
> Looking at the SQL, it looks like the way MySQL executes the IN is to read in
> and sort all of the Topic records, then probing for the matching ones once
> they're sorted.
it only does a linear when the number of IN entries is a sig
On Wed, Mar 23, 2011 at 12:56 PM, Javier Guerra Giraldez
wrote:
> in this case the problem arises because of the big mismatch between
> the forums_forum table (just 15 records) and the forums_topic table
> (12k records) that, and the need to sort by a field on another
> (b
On Wed, Mar 23, 2011 at 1:35 PM, Brian Neal wrote:
> So you are suggesting I need to shrink the number of topics or
> possibly link the posts directly to the forum?
right. since you only want the 30 latest posts, scanning 12k topics
is absurd. i guess just ordering by (topic.update_date DESC,
p
On Wed, Mar 23, 2011 at 8:49 PM, Brian Neal wrote:
> items = Post.objects(filter=forum__topic__in=forums).order_by('-
> topic__update_date', '-update_date').select_related(# as before)[:30]
>
> But this had the same result as before. I checked the resulting SQL,
> and it looked right, so I did an
On Fri, Mar 25, 2011 at 10:40 AM, Brian Bouterse wrote:
> Alarm bells usually go off for me when I am required to purchase a license
> for code I have written. Maybe I'm just an open source kinda guy, but if
> I'm going to write code, I should be free to run it without paying a license
> fee. Fl
On Mon, Mar 28, 2011 at 7:52 AM, Fabian Büchler
wrote:
>
> Events have an EventOnlineManager with a "to_expire" method which should
> select all Events with status=online and EventDates associated which date <
> today.
>
>> class EventOnlineManager(models.Manager):
>>
>> def get_query_set(se
301 - 400 of 496 matches
Mail list logo