sah writes:
> Though i remove those two line it did not change anything. It works
> the same as before, i get the search_form page and if i give some
> value for search, I get a 404 error page saying that the page is not
> available in the server.
>
Then check the /var/log/apache2/error.log file
Hi,
The issue is that apparently, for ORDER BY RANDOM, the database will foo
through and generate a random number for *every* row in a new column, then
do a sort by that be column.
Obviously that's an expensive operation and since that column is random,
it's a worst case sort.
For my code I was
I haven't used the feature, but there is no reason to think that having the db
backend do a random sort is any slower than you doing it yourself.
If your query can reduce the number of rows returned to a relatively small
number, any "order by" should have acceptable performance. If not, it will
Hi,
We have some code to return randomised Django model instances.
Initially, I was using random.randint(), and returning objects by index
between 0 < max_id.
This was based on the Django docs:
https://docs.djangoproject.com/en/dev/ref/models/querysets/#order-by
specifically, the part:
Note:
This is deeply concerning -- from my initial inspection of the code, it's
pretty clear that the NuoDB backend has been substantially copied from
Django's postgresql_psycopg2 backend.
The code in the Django postgresql_psycogpy2 backend, like all of Django, is
covered by Django's BSD license, which
On Wed, Aug 7, 2013 at 6:59 PM, Pepsodent Cola wrote:
> How come when I replace this:
> {% for choice2 in poll.altword_set.all %}
> to this:
> {% for choice2 in poll.altword_set.all().order_by('-votes') %}
> then I get this error:
>
> Exception Type: TemplateSyntaxError
> Exception Value:
Though i remove those two line it did not change anything. It works the
same as before, i get the search_form page and if i give some value for
search,
I get a 404 error page saying that the page is not available in the server.
On Wednesday, August 7, 2013 5:25:01 PM UTC-4, sah wrote:
>
> Hello
I wrote one line wrong at:
4.)
>>> *p.altword_set.all().order_by('-votes')*
[, ]
How do I write the correct syntax for ordering my list?
On Wednesday, August 7, 2013 11:59:38 PM UTC+2, Pepsodent Cola wrote:
>
> Hi,
> I have some database query ordering problems.
>
> 1.)
> On my webpage I see
Hi,
I have some database query ordering problems.
1.)
On my webpage I see this output:
* Option-1 = 18 votes
* Option-2 = 50 votes
2.)
*altword_list.html*
{% for choice2 in poll.altword_set.all %}
{{ choice2.rosword }} - {{ choice2.alt_ros_word }} - {{
choice2.alt_transl_word }} - {{ ch
I think that AddHandler stuff sounds like a ghost of mod_python days. I
don't use it in my mod_wsgi deployments.
See http://code.google.com/p/modwsgi/ for good information.
Bill
On Wed, Aug 7, 2013 at 5:25 PM, sah wrote:
> Hello , I am trying to deploy django using apache and mod_wsgi but no
Hello , I am trying to deploy django using apache and mod_wsgi but not able
to , can anyone help me on this :
httpd.conf
--
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias /mice /home/getMice/webproject/wsgi.wsgi
Order deny,allow
Allow from all
AddHandler ws
You can use django-mssql[0] as a backend, and then either use the ORM as
usual, write RAW queries with Django[1] or just use SQL directly[2].
Cheers,
AT
[0] http://django-mssql.readthedocs.org/en/latest/
[1] https://docs.djangoproject.com/en/dev/topics/db/sql/
[2]
https://docs.djangoproject.com/
On Tuesday, 29 January 2013 02:12:38 UTC-6, devver wrote:
>
> I created a form wizard of 6 steps,
> in step sixth, have filefield for uploading docfile1
>
> django docs is poor on this topic, google does not help.
>
>
> my code working ok, but how handle filefield.
>
> need example, thanks
>
>
>
Hi,
On Tue, 6 Aug 2013 20:19:01 -0700 (PDT) Muhammed TÜFEKYAPAN
wrote:
> def home(request):
> output = Excuse.objects.order_by('?')[:1]
[:1] selects all elements from the beginning up to the first and
returns that list. true, its a list with only one member, but still a
list.
You want [0] t
I have a django app that connects to a MySQL server in the usual way.
I've noe been asked to add some new functionality that requires that I
pull data from a MS SQL server database running on a Windows box. I
don't want to use the django ORM with the db, just access it directly
with some sql in my
Copyright (c) 2012, NuoDB, Inc.
All rights reserved.
You might want to update the license to reflect that most of the code is
actually a copy & paste from Django's postgresql_psycopg2 backend, which
was obvious because whoever worked on the backend forgot to remove all of
the "postgresql" com
Thanks Richard. I'll double-check and try again.
On Wed, Aug 7, 2013 at 10:39 AM, Richard E. Cooke wrote:
> Works fine for me. Must be a path issue.
>
>
>
>
> On Wednesday, August 7, 2013 9:41:37 AM UTC-4, Derrick Jackson wrote:
>
>> Hmm...
>>
>> When I attempt to run django-admin.py clearsess
Hi,
currently i'm using pinax for my project and therefor
pinax-theme-bootstrap. I wrote some apps and want to integrate them into my
template. Right now, i copied the file site_base.html into my projects
template directory and added the menu links i needed to the {% block nav %}
in this file.
Works fine for me. Must be a path issue.
On Wednesday, August 7, 2013 9:41:37 AM UTC-4, Derrick Jackson wrote:
>
> Hmm...
>
> When I attempt to run django-admin.py clearsessions while using django
> 1.5.1 I am told that clearsessions is an unknown command. Has anyone
> successfully used clea
UPDATE: I am able to run this via PyCharm's Tools > Run manage.py Task.
However, for the life of me I cannot figure out how to run this from the
command line. What am I missing?
On Wednesday, August 7, 2013 9:41:37 AM UTC-4, Derrick Jackson wrote:
>
> Hmm...
>
> When I attempt to run django-ad
Hmm...
When I attempt to run django-admin.py clearsessions while using django
1.5.1 I am told that clearsessions is an unknown command. Has anyone
successfully used clearsessions as of yet?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
I want to use Grappelli and Django-extensions with my Admin site. But I
also need to use modelAdmin.queryset to restrict my records.
Both Grappelli and Django-extensions Auto Complete Lookups use the model's
base queryset.
I want to put in a request to change the code, which is easy - so long
"outout = Excuse.objects.order_by('?')[0]"
This works well.
Thank you.
On Wednesday, August 7, 2013 6:19:01 AM UTC+3, Muhammed TÜFEKYAPAN wrote:
>
> Hello everyone,
>
> I write a basic model in django 1.5.1
>
> My model is looks like this:
> class Excuse(models.Model):
> text = models.Cha
Hi,
If you tries to access values from list using slice it returns you the
subset of list not a single value.The query *(*Excuse.objects.order_by('?')*
)* from your view returns a list and you are trying to access values from
that list using slice which in turn returns subset of list and becau
It looks like this:
{{ output }}
On Wednesday, August 7, 2013 6:58:17 AM UTC+3, Bulkan-Savun Evcimen wrote:
>
> Hi there,
>
> What does your template index.html look like ?
>
> Cheers
>
> http://bulkan-evcimen.com
>
>
> On Wed, Aug 7, 2013 at 1:19 PM, Muhammed TÜFEKYAPAN
>
> > wrote:
To follow up on this - when I moved my locale files to a completely new
location and used a different path in my LOCALE_PATHS settings, the
translations worked fine. I think it may have been a folder permissions
issue.
On Tuesday, August 6, 2013 5:02:03 PM UTC+1, katstevens wrote:
>
> I am curr
26 matches
Mail list logo