eted in each year.
>> And at the end to display this on bar chart. but What I most want is the
>> query.
>>
>> I want to transform this SQL query in Django:
>>
>> SELECT status from YY group by time_frame;
>>
>> please assist
>>
>> -
ame is in terms of years and status are Not started, In progress
> and Completed. I want to display all services Not started, in progress and
> completed in each year.
> And at the end to display this on bar chart. but What I most want is the
> query.
>
> I want to transform thi
d to display this on bar chart. but What I most want is the
> query.
>
> I want to transform this SQL query in Django:
>
> SELECT status from YY group by time_frame;
>
> please assist
>
> --
> *TUYIZERE Eugene*
>
>
> --
> You received this message beca
this on bar chart. but What I most want is the
query.
I want to transform this SQL query in Django:
SELECT status from YY group by time_frame;
please assist
--
*TUYIZERE Eugene*
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To u
I am trying to create a query builder, I have seen SQL explore which is a
package but I can't bring it to the front end of my app. I need help please
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
Hi, thanks for the reply!
This gives me following query:
SELECT "example_price"."category_id",
"example_price"."cost"
FROM "example_price"
GROUP BY "example_price"."id",
"example_price"."category_id",
"example_price"."from_date",
"example_price"."cost",
Price.objects.annotate(_sel=Max('from_date')).filter(from_date=F('_sel')).values("category_id",
"price")
--
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
Hi,
I have an example application of the shop.
Full application code is available at
https://github.com/dry-python/tutorials/tree/master/django
In this example, User can buy a subscription for different categories of
the content.
The user can subscribe for one day, one month or one year.
Hello Bill,
I managed to solve this in the end, the issue was that a cursor created in
Django would enforce TIME_ZONE settings in the PostgreSQL session, where by
default it is set to 'UTC' in my case. This means that all date
manipulation was impacted, hence the unexpected results.
The work
I'd be interested to see a printout of 'columns' and 'cursor.description'.
One explanation would be that your for-loop is not actually accessing the
data that you think it is, or that your query is not actually fetching the
data that you think it is.
No criticism of your query implied -
Here is the body of the code that runs the query and fetch results:
with connection.cursor() as cursor:
sql = (
...
)
cursor.execute(sql, [params...])
columns = [col[0] for col in cursor.description]
for row in cursor.fetchall():
print(row)
The results from
Hard to say what's happening without any code.
--
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...@googlegroups.com.
To post to this
Hello django-users,
I have been encountering a strange behaviour when trying to run SQL
directly with a cursor. I am using Django 1.11 with porstgres 9.5.The query
normally returns 7 rows with 2 columns.
Symptoms:
- When reading the queryset of a query I get wrong results -> I still have
7
Thank you for all the suggestions!
Solution 1 - Did not work: pub4=Publication.objects.filter
(techpubcombo__technology=t).filter(pathpubcombo__pathology=p).filter
(commpubcombo__commodity=c)
Solution 1 didn't pull any records
Solution 2 - Did not work:
On Thu, Feb 26, 2009 at 2:24 AM, Jesse wrote:
>
> I have three statements:
> publications = Publication.objects.filter(techpubcombo__technology=t)
> publications2 = Publication.objects.filter(pathpubcombo__pathology=p)
> publications3 =
You have two choices. Either you can add .exclude() using the __in to
avoid get the duplicates in the first place. Or you could iterate over
the 3 pubs and append them to a list with an if statement. Something
like this:
list = []
for pub in publications123:
If pub not in list:
> I believe this would work:
>
> publications = Publication.objects.filter(techpubcombo__technology=t)
>
> Regards,
>
> --
> Christian Joergensenhttp://www.technobabble.dk
Hello Christian,
Thank you so much for your answer. I have been struggling with the
users group to get that syntax (I must
James Matthews wrote:
> I have three tables:
>
> class Technology(models.Model):
>technology = models.CharField(max_length=100, null=True,
> blank=True )
>def __unicode__(self):
>return self.technology
>class Meta:
>ordering = ["technology"]
>
> class
-- Forwarded message --
From: May <adles...@gmail.com>
Date: Mon, Feb 23, 2009 at 9:17 PM
Subject: python sql query in django
To: python-l...@python.org
I have three tables:
class Technology(models.Model):
technology = models.CharField(max_length=100, null=True,
blan
Thank you, that work fine !
On 9 jan, 05:59, "Karen Tracey" wrote:
> On Thu, Jan 8, 2009 at 11:41 PM, Kedare wrote:
>
> > Hi, i have made a Cache management Page for Django, but i have a
> > problem, i need to expire single cache entries, so i made this
On Thu, Jan 8, 2009 at 11:41 PM, Kedare wrote:
>
> Hi, i have made a Cache management Page for Django, but i have a
> problem, i need to expire single cache entries, so i made this :
>
> (the url is like that by example: "/admin/cache_management/?
>
>
Hi, i have made a Cache management Page for Django, but i have a
problem, i need to expire single cache entries, so i made this :
(the url is like that by example: "/admin/cache_management/?
action=clear=views.decorators.cache.cache_page../.d41d8cd98f00b204e9800998ecf8427e")
if
22 matches
Mail list logo