Hi Galil,
In the next version of Django (1.10) you'll be able to use the TruncDate
expression[1]
for this exact purpose:
MyModel.objects.annotate(join_date=TruncDate('join_time')).values_list('join_date',
flat=True)
In the mean time you can simply use a Func expression[2]:
MyModel.objects.an
On Tue, Jun 14, 2016 at 8:30 AM, sushovan majumdar
wrote:
> Hello,
> I have to move data from database server to new database server. Schema is
> same for both.
> I want to write a cron job which would keep replicating data from old
> server to newer one.
> In future I will throw away the old dat
i think it would be able to be handle by generating syncronisation script
with sql yog and run the script from linux cron, or by using the events if
you use mysql as the db
On Tuesday, June 14, 2016 at 10:30:40 PM UTC+7, sushovan majumdar wrote:
>
> Hello,
> I have to move data from database se
Dear All
It seem this is the best starting guide for me,
Just one to ask about the tips and trick how do you deal with the so many
"unknown syntax", some time we have to use this ' character some time use
", then mention the name of a database field followed with array. Could
anyone suggest f
Assuming "obj" is an instance of a Model class for this table:
obj.jointime.date()
On Tue, Jun 14, 2016 at 8:52 AM, Galil wrote:
> Hi,
>
> How can I convert this SQL query into a Django query?
>
> SELECT DATE(JoinTime) FROM table
>
> Please keep in mind that JoinTime is in datetime format and I
On Tue, Jun 14, 2016 at 10:52 AM, Larry Martell wrote:
> On Mon, Jun 13, 2016 at 4:12 PM, Larry Martell
> wrote:
>> I have extended the user model to another table I called UserInfo, and
>> I added it to the add user admin page.
>>
>> So now when I go to add a user I see this on the page:
>>
>>
Hello,
I have to move data from database server to new database server. Schema is
same for both.
I want to write a cron job which would keep replicating data from old
server to newer one.
In future I will throw away the old database server.
I was looking into database routers in django to achie
On Mon, Jun 13, 2016 at 4:12 PM, Larry Martell wrote:
> I have extended the user model to another table I called UserInfo, and
> I added it to the add user admin page.
>
> So now when I go to add a user I see this on the page:
>
> User Info
> User Info: #1
>
> If I edit a user that exists I see:
>
Hi,
How can I convert this SQL query into a Django query?
SELECT DATE(JoinTime) FROM table
Please keep in mind that JoinTime is in datetime format and I want it to be
date.
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscr
9 matches
Mail list logo