easily (I'm
assuming you have a view to list all those instances for those Models).
Em 11/06/2017 13:15, Miika Huusko escreveu:
Thanks for response!
Yep, timing with "time" is not the best way to go to compare SQL query
times. The reason I added that "time" test is that
Thanks for response!
Yep, timing with "time" is not the best way to go to compare SQL query
times. The reason I added that "time" test is that in Stack Overflow I was
asked to confirm that data transfer is not factor here. I timed SQL queries
with "EXPLAIN ANA
on a Perl related blog, the
concepts on the post are applicable everywhere.
Em 11/06/2017 07:06, Miika Huusko escreveu:
I have a performance problem with Django + Django REST Framework. The
problem is that it takes Django very, very long time to handle SQL
query response + DRF serialization take
see, you want to get 10k to
50k items... that's a lot (to serialize too).
Em 11/06/2017 07:06, Miika Huusko escreveu:
I have a performance problem with Django + Django REST Framework. The
problem is that it takes Django very, very long time to handle SQL
query response + DRF serialization take
I have a performance problem with Django + Django REST Framework. The
problem is that it takes Django very, very long time to handle SQL query
response + DRF serialization take quite some time also. It happens when
there are ManyToMany or OneToMany relations and nested objects. Sounds like
&q
ny testing of TruncDay with Value().
Is there a difference between the query you're trying to construct and
MyModel.objects.filter(created__lt=timezone.now().date()) ?
On Friday, June 2, 2017 at 5:15:23 AM UTC-4, Michal Petrucha wrote:
>
> On Thu, Jun 01, 2017 at 02:29:17AM -0700, Roshan Raghupath
On Thu, Jun 01, 2017 at 02:29:17AM -0700, Roshan Raghupathy wrote:
> Hi,
> I came across an issue yesterday. Post on stackoverflow
> <https://stackoverflow.com/questions/44287443/incorrect-escaping-in-django-sql-query>
>
> On further investigation today, I think I found th
Hi,
I came across an issue yesterday. Post on stackoverflow
<https://stackoverflow.com/questions/44287443/incorrect-escaping-in-django-sql-query>
On further investigation today, I think I found the source of the issue.
It's this line
<https://github.com/django/django/blob/master/
t this results in two different queries to the
> database. Can it be done with a single query call?
Why is that a concern? This isn't the kind of thing to optimize. Query
optimization is about loops and relations. Not about getting information
you need - it comes at a price. Have you timed what yo
On Wed, May 31, 2017 at 3:01 PM, Alceu Rodrigues de Freitas Junior <
alceu.freitas...@gmail.com> wrote:
> Hi James,
>
> I'm curious... why dropping down from the ORM and doing a single query
> wouldn't be portable?
>
> I understand that it would happen if you use some
Hi James,
I'm curious... why dropping down from the ORM and doing a single query
wouldn't be portable?
I understand that it would happen if you use some kind of stored
procedure in the DB, but I guess a single ANSI SQL would do it.
Thanks!
- Alceu
Em 31/05/2017 17:29, James Schneider
PM
> *To:* Django users
> *Subject:* count from multiple tables in a single query?
>
>
>
> Hello,
>
> Is it possible to get the count of entries from multiple tables in a
> single query call? I'm looking at the official docs on aggregation and I
> can't find a
@googlegroups.com]
Sent: Wednesday, May 31, 2017 2:14 PM
To: Django users
Subject: count from multiple tables in a single query?
Hello,
Is it possible to get the count of entries from multiple tables in a single
query call? I'm looking at the official docs on aggregation and I can't find
anything
>
>
> If I want to get the total count from both tables it can be done like this,
>
> author_count = Author.objects.count()
> publisher_count = Publisher.objects.count()
>
> My concern is that this results in two different queries to the database.
> Can it be do
Hello,
Is it possible to get the count of entries from multiple tables in a single
query call? I'm looking at the official docs on aggregation and I can't
find anything. For example assume I have the following 2 tables,
class Author(models.Model):
name = models.CharField(max_length=100
gt; order to create the good content for each instance of ModelA. When I try to
> use a string of the url sending the id parameter, the content field has for
> value the source code of the debug page
>
> (error 500, DoesNotExist at /admin/apptwo/modelb/my_view/ref=76, [76 is
&g
field has for
value the source code of the debug page
(error 500, DoesNotExist at /admin/apptwo/modelb/my_view/ref=76, [76 is an
example] ModelB matching query does not exist. Exception location :
/home/me/Desktop/env/lib/python3.5/site-packages/django/db/models/query.py
in get, line 385
Todor,
Awesome thanks yet again! I think I'm rolling now ;-). Tested it and it
looks like it works, pending some rigorous testing. The query looks good
though and makes sense to me.
Forgive my naivete regarding Group By. I had a thorough think about how
I'd build a raw SQL version
There is no `group_by` clause in the ORM, because this will lead to
ambiguous queries. Ambiguous query is a query where you have a non-distinct
column in the select, that is missing from the group_by clause. Its
actually a MySQL fault for allowing it, in other RDBMS you will get an
ambiguous
.values('country')
.annotate(max_date=Max('book_set__pubdate'))
.values('max_date')[:1]
)
)
)
But yes I concur this strikes me as a fairly ordinary sort of SQL query in
my experience and hence would be nice if it were well documen
ngo>
you will probably get: here
<https://stackoverflow.com/questions/2111590/how-can-a-do-a-greatest-n-per-group-query-in-django>
or here
<https://stackoverflow.com/questions/2074514/django-query-that-get-most-recent-objects-from-different-categories>
.
My approach to this problem, i
of the (one) author in each country
that published the last book before a given date.
Ostensibly the only option I have is:
LatestAuthors =
Author.objects.filter(book_set__pubdate__lte=SOMEDATE).values('country').annotate(Max('book_set__pubdate'))
That seems to work generating a query that authors
> I have setup existing django project at localsystem and its migrate
>>> successfully.
>>> after migrate i have run following "python manage.py runserver" to run
>>> django project.
>>>
>>> After that i am getting error message "Pr
d its migrate
>> successfully.
>> after migrate i have run following "python manage.py runserver" to run
>> django project.
>>
>> After that i am getting error message "Project matching query does not
>> exist." on terminal and as well
lsystem and its migrate
> successfully.
> after migrate i have run following "python manage.py runserver" to run
> django project.
>
> After that i am getting error message "Project matching query does not
> exist." on terminal and as well as browser.
>
owing "python manage.py runserver" to run
> django project.
>
> After that i am getting error message "Project matching query does not
> exist." on terminal and as well as browser.
>
> Please let me know of what is problem.
>
>
>
> Please help me to
iguration after looking
>> at the entire stack trace.
>>
>> On Tuesday, April 11, 2017 at 9:52:27 AM UTC-4, ni...@linkites.com wrote:
>>>
>>> Hi,
>>>
>>> Previous error solve and thanks for that.
>>>
>>> now i am getting new error o
now.
>>
>>
>> <https://lh3.googleusercontent.com/-F1-7S1-tH9g/WOzfhUOTAWI/AeU/D2GRF3O8AQ8YnThyRRbJ_XUtI5yRYX0lwCLcB/s1600/Screenshot%2Bfrom%2B2017-04-11%2B19-21-51.png>
>>
>>
>> On Tuesday, April 11, 2017 at 4:38:30 PM UTC+5:30, ni...@linkites.com
>>
roject at localsystem and its migrate
>> successfully.
>> after migrate i have run following "python manage.py runserver" to run
>> django project.
>>
>> After that i am getting error message "Project matching query does not
>> exist."
y runserver" to run
> django project.
>
> After that i am getting error message "Project matching query does not
> exist." on terminal and as well as browser.
>
> Please let me know of what is problem.
>
>
>
> Please help me to solve this issue.
t;> successfully.
>>> after migrate i have run following "python manage.py runserver" to run
>>> django project.
>>>
>>> After that i am getting error message "Project matching query does not
>>> exist." on terminal and a
.
>> after migrate i have run following "python manage.py runserver" to run
>> django project.
>>
>> After that i am getting error message "Project matching query does not
>> exist." on terminal and as well as browser.
>>
>> Please
at localsystem and its migrate
> successfully.
> after migrate i have run following "python manage.py runserver" to run
> django project.
>
> After that i am getting error message "Project matching query does not
> exist." on terminal and as well as browser.
>
Hi,
I have setup existing django project at localsystem and its migrate
successfully.
after migrate i have run following "python manage.py runserver" to run
django project.
After that i am getting error message "Project matching query does not
exist." on terminal an
pend on raw SQL.
>
> -Original Message-
> From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
> Behalf Of Larry Martell
> Sent: Monday, February 20, 2017 3:00 PM
> To: django-users@googlegroups.com
> Subject: Re: combining ORM and raw SQL in same qu
Martell
Sent: Monday, February 20, 2017 3:00 PM
To: django-users@googlegroups.com
Subject: Re: combining ORM and raw SQL in same query
Thanks!
On Mon, Feb 20, 2017 at 10:52 AM, m1chael <myk...@gmail.com> wrote:
> i did something like this recently using .extra / select
rry.mart...@gmail.com>
> wrote:
>>
>> Is there any way to use both the ORM and raw SQL in the same query?
>>
>> I have an existing app that uses the ORM and now I have a need to add
>> SQL like this to the select:
>>
>> (CASE
>> WHEN TRIM(IFNULL
i did something like this recently using .extra / select
https://docs.djangoproject.com/en/1.10/ref/models/querysets/#extra
On Mon, Feb 20, 2017 at 10:49 AM, Larry Martell <larry.mart...@gmail.com>
wrote:
> Is there any way to use both the ORM and raw SQL in the same query?
&
Is there any way to use both the ORM and raw SQL in the same query?
I have an existing app that uses the ORM and now I have a need to add
SQL like this to the select:
(CASE
WHEN TRIM(IFNULL(roiname, '')) IN ('', 'None') THEN CONCAT_WS('.',
roi_type_id, roi_id)
WHEN CONCAT_WS('.', roi_type_id
> I am querying PostgreSQL using *get_object_or_404 * but it throws and
>> exception *PairUsers matching query does not exist *and after that *During
>> handling of the above exception, another exception
>> occurred:django.http.response.Http404: No PairUsers matches the given qu
On Saturday, 18 February 2017 17:37:49 UTC, Nikoleta Misheva wrote:
>
> I am querying PostgreSQL using *get_object_or_404 * but it throws and
> exception *PairUsers matching query does not exist *and after that *During
> handling of the above exception, anoth
I am querying PostgreSQL using *get_object_or_404 * but it throws and
exception *PairUsers matching query does not exist *and after that *During
handling of the above exception, another exception
occurred:django.http.response.Http404: No PairUsers matches the given query
*when indeed I
b/python2.7/site-packages/django/db/backends/utils.py",
>>
>> line 79, in execute
>> return super(CursorDebugWrapper, self).execute(sql, params)
>> File
>> "/root/udemystuff/test_project/trydjango19/local/lib/python2.7/site-packages/django/db/bac
> File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
> return self.cursor.execute(sql, params)
> File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/si
return self.cursor.execute(sql, params)
File
"/root/udemystuff/test_project/trydjango19/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
line 323, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: NOT NULL constrai
project/trydjango19/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
> line 323, in execute
> return Database.Cursor.execute(self, query, params)
> django.db.utils.IntegrityError: NOT NULL constraint failed:
> auth_user.last_login
>
>
> I trie
Hi everyone,
I'm super new to django, I tried to add a superuser and this is the error I
got:
File
"/root/udemystuff/test_project/trydjango19/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
line 323, in execute
return Database.Cursor.execute(self, que
above there are two lines A and B. Currently Line B is
commented and this query works and I get back an object
lab_entries= modelNormalLabTest.objects.filter(test_name__test_name="ABC")
However if I replace
return self.test_name
in the model modelLabTestName with this
Really, I did not face this issue in past.
It may be some setup issue. Some app is not registered properly. Check
admin.py or settings.py
On Wed, Jan 4, 2017 at 3:18 PM, pritesh modi
wrote:
> Team
>
>
> In VM Django with 1.6 run below code and generate a HTMLreport
I want to learn a proper way of passing query from form to url in Django
class based view. I want to retrieve form data in ListView to make query on
the model.
I'm currently using this, but i feel that there's a better way.
class SearchFormView(FormView):
form_class = SearchForm
> self.slug =slugify(self.name,allow_unicode=True)
> |
>
> The problem is when I use a ModelForm to create object, the slug field is set
> correctly, but when I use it to look up the object, it returns
> "lists.models.DoesNotExist: TopList matching query does not exist" (I tried
is when I use a ModelForm to create object, the slug field is
set correctly, but when I use it to look up the object, it returns
"lists.models.DoesNotExist: TopList matching query does not exist" (I tried
it in the shell):
# forms.py
class TopListForm(ModelForm):
class Meta:
<
artem.bernats...@gmail.com> wrote:
> Hello, how to rewrite this PostgreSQL query to Django ORM with no raw SQL ?
>
>
> select * from finance_fund order by((select price from finance_nav where
> date='2016-11-08' and fund_id=finance_fund.id)/(select price from
> finance_na
Hello, how to rewrite this PostgreSQL query to Django ORM with no raw SQL ?
select * from finance_fund order by((select price from finance_nav where
date='2016-11-08' and fund_id=finance_fund.id)/(select price from
finance_nav where date='2016-11-07' and fund_id=finance_fund.id)) LIMIT 30;
So
What's in the get_digital_client_summary() function?
On Thu, Oct 6, 2016 at 6:18 AM, Thomas Brightwell <
thomas.brightw...@gmail.com> wrote:
> Hi,
>
> I have a raw query returning one row which is then shown 8 times in the
> template. I have debugged and there is
Hi,
I have a raw query returning one row which is then shown 8 times in the
template. I have debugged and there is only one line when this is executed
in the shell and I do a simple for loop print output. So it seems to be
something about the template tags?
The raw query which definitely only
Thanks for your answer. The project is rather big and I am still not used
to Django. I got some help and it has been solved.
--
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
Hello,
do you already know how to do it without Django, e.g with a static dataset?
Because, from the HTML page's view, you will exactly do that.
I don't know JqGrid, but I assume it needs an array of objects, like
gridData = [
{
firstColumn: 1,
secondColumn: "data"
},
I am working on a small online shop with Django 1.9 and JqGrid
Here is a simplification of my models:
class Addresses(models.Model):
address = models.TextField(db_column='ADDRESS', max_length=2000)
city = models.CharField(db_column='CITY', max_length=400,
blank=True,
com>:
> Not sure, this is using lots of private API and QuerySet.extra() which is
> discourage these days. I'm afraid you won't get much help for unsupported
> Django versions.
>
> After you upgrade to Django 1.9+, hopefully you can construct your query
> using the new ex
Not sure, this is using lots of private API and QuerySet.extra() which is
discourage these days. I'm afraid you won't get much help for unsupported
Django versions.
After you upgrade to Django 1.9+, hopefully you can construct your query
using the new expressions API!
https
Hello folks!
I have a complex queryset here that do joins in at least 8 tables. The
query is fast, but has use of Postgresql `concat` method, and to make it
have correct aliases I'm using `qs.query.alias_map` where qs is my queryset
instance:
def my_complex_queryset(self):
qs = self.filter
com> wrote:Sorry, I did not specify.I have been using 'Postgresql' with 'psycopg2 v.2.6.2'.They gave me those results.Also here is a sql query given from log:SELECT "test_app_entity"."id", "test_app_entity"."due_date", "test_app_entity"."
are multiple instances of B associated with an instance of A and
> one
> > of the instances of B has text='ABCD' (might not be the latest
> > date_created), that instance of B is also there in the query result.
>
> Hmm, I haven't actually tried to run any code, but I'd try reordering
>
created), that instance of B is also there in the query result.
Hmm, I haven't actually tried to run any code, but I'd try reordering
some of the method calls, and using an explcit field alias for the
annotation, which should let you then use an F() expression in
subsequent filters; something like
isn't always 'ABCD' - if
there are multiple instances of B associated with an instance of A and one
of the instances of B has text='ABCD' (might not be the latest
date_created), that instance of B is also there in the query result.
Thanks.
On Tuesday, August 30, 2016 at 3:59:20 PM UTC+5:30
Thanks Erik. Will try out the solution you mentioned.
On Tuesday, August 30, 2016 at 3:59:20 PM UTC+5:30, Erik Cederstrand wrote:
>
>
> > Den 30. aug. 2016 kl. 11.20 skrev Erik Cederstrand <
> erik+...@cederstrand.dk >:
> >
> > I'm not even sure that's possible to express in SQL, but it would
Maybe this can help you
https://docs.djangoproject.com/en/1.10/topics/db/aggregation/
terça-feira, 30 de Agosto de 2016 às 07:33:14 UTC+1, Web Architect escreveu:
>
> Hi,
>
> I am looking for an elegant and efficient mechanism to have a query filter
> or a solution for the follow
> Den 30. aug. 2016 kl. 11.20 skrev Erik Cederstrand
> :
>
> I'm not even sure that's possible to express in SQL, but it would probably be
> quite convoluted if it is. Here's an easier-to-understand solution:
>
> res = set()
> for b in
Hi Erik,
Thanks for the solution.
So, I understand we get all instances of B which are max (date created) or
latest (date created) for each instance of A and then we check b.text ==
'ABCD' and select the corresponding instance of A.
Can't we add additional filter to check if text='ABCD'
> for b in B.objects.all().select_related('a').annotate(Max('date_created')):
That should probably be: Max('a__b__date_created') instead.
Erik
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
if b.text != 'ABCD':
continue
res.add(a)
You'll get too many B objects, but it's only one query. If you want a more
optimal query, try to write it in SQL first. Maybe it's possible to express in
the ORM.
I used set() because 'date_created' is not unique so there could be two B
UTC+5:30, Mike Dewhirst wrote:
>
> On 30/08/2016 4:33 PM, Web Architect wrote:
> > Hi,
> >
> > I am looking for an elegant and efficient mechanism to have a query
> > filter or a solution for the following one to many relationship model.
> > Please note t
On 30/08/2016 4:33 PM, Web Architect wrote:
Hi,
I am looking for an elegant and efficient mechanism to have a query
filter or a solution for the following one to many relationship model.
Please note the following is just an illustration of the models - hope
it should provide what I am
Hi,
I am looking for an elegant and efficient mechanism to have a query filter
or a solution for the following one to many relationship model. Please note
the following is just an illustration of the models - hope it should
provide what I am looking for:
class A(models.Model):
name
cases = HeartFlowCase.objects.values(‘all fields required in your view’).
annotate(min_deadline=Min('data__deadline')).order_by('min_deadline')
It is the Todor's suggestion extended with value method run.
I believe that you need `GROUP BY` in your SQL query and it generated by
`values` as said in Django documentation.
d in django doc
>> <https://docs.djangoproject.com/en/1.10/ref/models/querysets/#order-by> you
>> can use `distinct()` to remove duplicated rows from first query.
>>
>> I believe with this your pagination should works as expected.
>>
>> Regard
knows how to key into the JSON field. But the second
query gives a join error because there is no call to get_transform in
Query.add_fields (so "color" is assumed to be a relation). I can get
around this with an annotation and some RawSQL, but it's not very clean
compar
I merged support for expressions in values() a few hours ago:
https://github.com/django/django/commit/39f35d4b9de223b72c67bb1d12e65669b4e1355b
If that doesn't meet your needs, can you give an idea of what the QuerySet
you want would look like?
On Thursday, August 18, 2016 at 5:10:41 PM UTC-4,
Hi Todor,
I have implemented something similar:
cases = HeartFlowCase.objects.all().annotate(Count('hf_id', distinct=True))
I also tried your suggestion and both seem to produce the same results. The
number of duplicates is minimized but not removed entirely. Also the same
problem when
:
>
> Hi Koonal,
>
> As said in django doc
> <https://docs.djangoproject.com/en/1.10/ref/models/querysets/#order-by> you
> can use `distinct()` to remove duplicated rows from first query.
>
> I believe with this your pagination should works as expected.
>
> Regards,
&
I noticed that the jsonb field indexing in postgres which is so handy in
filtering does not seem to extend to calls to values(). After digging around a
bit, it seems that sql.query.get_transform() is only called when building a
filter, but not when adding fields for a values call.
Using
:
>
> Hi Koonal,
>
> As said in django doc
> <https://docs.djangoproject.com/en/1.10/ref/models/querysets/#order-by> you
> can use `distinct()` to remove duplicated rows from first query.
>
> I believe with this your pagination should works as expected.
>
> Rega
Hi Koonal,
As said in django doc
<https://docs.djangoproject.com/en/1.10/ref/models/querysets/#order-by> you
can use `distinct()` to remove duplicated rows from first query.
I believe with this your pagination should works as expected.
Regards,
On Thu, Aug 18, 2016 at 2:58 AM,
artFlow objects are 5 with 2 CaseDatas each. If I
order_by deadline on CaseData as:
cases = HeartFlowCase.objects.all().order_by(data__deadline)
this returns duplicates since there are multiple CaseDatas, which is fine.
Now I try and paginate it by applying:
paginator = Paginator(cases, 2)
cases = pa
Sorry, I did not specify.
I have been using 'Postgresql' with 'psycopg2 v.2.6.2'.
They gave me those results.
Also here is a sql query given from log:
SELECT "test_app_entity"."id", "test_app_entity"."due_date",
"test_app_entity"."interv
Thanks, unfortunately not so great on my side:
I added in the query (forgetting the division for now):
.annotate(ratio=ExpressionWrapper(F('due_date')-timezone.now(),
DateTimeField()))
which leads to the following statement in the query:
("contentstatus"."due_date"
<https://docs.djangoproject.com/en/1.9/ref/models/expressions/#using-f-with-annotations>
>>> .
>>> Probably the problem is that you use values of different types in your
>>> expression.
>>>
>>> Regards
>>>
>>> On Sat, Jul 30, 2016 at
fferent types in your
>> expression.
>>
>> Regards
>>
>> On Sat, Jul 30, 2016 at 11:35 PM, Yoann Duriaud <yoann@gmail.com>
>> wrote:
>>
>>> Hello,
>>> I would like to annotate a query with the following expression: ([Due
>
lan_type_and_apn(x_mb)`
a couple of times for different values of `x_mb` and wish to create another
manager method which helps me run a single query for all the different
values
of `x_mb`. For this, I have tried creating the following query using
[Conditional
Expressions](https://docs.djangop
, Jul 30, 2016 at 11:35 PM, Yoann Duriaud <yoann@gmail.com
> > wrote:
>
>> Hello,
>> I would like to annotate a query with the following expression: ([Due
>> Date] - [Now])/[Interval]. [Due Date] and [Interval] are fields from the
>> database, while [Now] shoul
n your
expression.
Regards
On Sat, Jul 30, 2016 at 11:35 PM, Yoann Duriaud <yoann.duri...@gmail.com>
wrote:
> Hello,
> I would like to annotate a query with the following expression: ([Due
> Date] - [Now])/[Interval]. [Due Date] and [Interval] are fields from the
> data
Hello,
I would like to annotate a query with the following expression: ([Due Date]
- [Now])/[Interval]. [Due Date] and [Interval] are fields from the
database, while [Now] should be "equal" to timezone.now().
So this would look like:
.annotate(ratio=(F('due_date')-timezone.now())/F
Michal,
Actually, your syntax didn't quite work. It threw a couple of warnings and
seemed to match all records in the database. But you got me on the right
track. This syntax does work properly:
select ... where word like concat('%%', %s, '%%')
Thanks for getting me pointed in the right
On Friday, July 8, 2016 at 8:34:00 AM UTC-5, Michal Petrucha wrote:
>
> I may be wrong, but it seems to me that you're using wrong quoting in
> that raw query; I think it should be::
>
> select sortkey, book, chapter, verse, hebrew_text
> from bible_bible
> w
On Thu, Jul 07, 2016 at 11:23:21PM -0500, Art Zemon wrote:
> Hello,
>
> I have a column in a table that contains Hebrew text. I need to do a query
> with a LIKE clause on the Hebrew text. The query works if I execute the SQL
> directly, either in a SQL window of phpMyAdmin or in
Hello,
I have a column in a table that contains Hebrew text. I need to do a query
with a LIKE clause on the Hebrew text. The query works if I execute the SQL
directly, either in a SQL window of phpMyAdmin or in a command line mysql
client. But I cannot get it to work within Django.
I tried
.
aa = DemMexLow.objects.filter(rast__intersects=t0.biomeGeometry)
If I retrieve the data it almost never ends. Takes a lot of time.
Examining the raw query I got this:
SELECT "demmex120"."rid", "demmex120"."rast" FROM "demmex120"
for. However, some more complex
> queries with the date() function still confuse me.
>
> For example the SQL query:
>
> select count(distinct UniqueCallID), date(JoinTime) from Table group by
> date(JoinTime);
>
>
> I tried to write it as:
>
> calls = Call.objects.an
Thank you Simon,
This func expression what was I looking for. However, some more complex
queries with the date() function still confuse me.
For example the SQL query:
select count(distinct UniqueCallID), date(JoinTime) from Table group by
date(JoinTime);
I tried to write it as:
calls
601 - 700 of 2781 matches
Mail list logo