Re: django admin objectaction confirmation

2016-01-19 Thread 张超
Sorry to trouble you again! I want to override the change_from.html included in the pacakage django_object_actions/templates/django_object_actions/ ...I copy the change_from.html and put it in my app directory- myapp/templates/admin/django_object_actions/ ,then I add my code...but it can't

override django object action change_form.html

2016-01-19 Thread 张超
I want to override the change_from.html included in the directory django_object_actions/templates/django_object_actions/ ...I copy the change_from.html and put it in my app directory- myapp/templates/admin/django_object_actions/ ,but it can't work! -- You received this message because you

Re: Nullable ChoiceField on ModelForm - has_changed always True

2016-01-19 Thread steve byerly
Also of note, I recently upgraded to Django 1.9 from Django 1.7 where this was working fine. It looks like this commit is the cause of my problem: https://github.com/django/django/commit/ff077cd6496b6f82195e2dc040f70e19e7c206c9 On Tuesday, January 19, 2016 at 4:23:00 PM UTC-8, steve byerly

Nullable ChoiceField on ModelForm - has_changed always True

2016-01-19 Thread steve byerly
I have a model with a nullable field (PositiveSmallIntegerField) with defined choices. When I make a ModelForm for the model and do not select a value for this field, the field always comes back in the changed data. The reason is that the empty choice value, the data_value, is an empty string,

Re: Filter object by calculating duration from start and end time

2016-01-19 Thread Steven Nash
That's fine as am using Postgres on centos 7 Cheers Steve Sent from my iPhone > On 19 Jan 2016, at 21:19, Simon Charette wrote: > > Hi Steve, > > It looks like it might only work on PostgreSQL unti this bug is fixed. > > Simon > > Le mardi 19 janvier 2016 14:59:57

Re: Filter object by calculating duration from start and end time

2016-01-19 Thread Simon Charette
Hi Steve, It looks like it might only work on PostgreSQL unti this bug is fixed. Simon Le mardi 19 janvier 2016 14:59:57 UTC-5, Steven Nash a écrit : > > Hi Simon, > > Thanks, I'll give that ago. > > Cheers, > > Steve > > On Tuesday, 19 January

Re: Filter object by calculating duration from start and end time

2016-01-19 Thread Steven Nash
Hi Simon, Thanks, I'll give that ago. Cheers, Steve On Tuesday, 19 January 2016 18:52:06 UTC, Simon Charette wrote: > > Hi Steve, > > You can use annotate for this > > . > > from datetime import timedelta

Re: Filter object by calculating duration from start and end time

2016-01-19 Thread Xristos Xristoou
can used this and for the dates fields ? Τη Τρίτη, 19 Ιανουαρίου 2016 - 8:01:36 μ.μ. UTC+2, ο χρήστης Steven Nash έγραψε: > > Hi, > > Given an object such as: > > class Entry(models.Model): > start = models.TimeField() > end = models.TimeField() > > I'd like to be able to say something like:

Re: like query django

2016-01-19 Thread Xristos Xristoou
i follow you not work again first i cant use {% url %} show me template error,i thing so i am is very noob must necesery tu urls for that ? Τη Τρίτη, 19 Ιανουαρίου 2016 - 5:35:09 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: > > hello, > > > i want to create a query for likes in my post details

Re: Filter object by calculating duration from start and end time

2016-01-19 Thread Simon Charette
Hi Steve, You can use annotate for this . from datetime import timedelta from django.db.models import DurationField, ExpressionWrapper, F Entry.objects.annotate( duration=ExpressionWrapper(

Filter object by calculating duration from start and end time

2016-01-19 Thread Steven Nash
Hi, Given an object such as: class Entry(models.Model): start = models.TimeField() end = models.TimeField() I'd like to be able to say something like: Entry.objects.filter(F('end')-F('start')__gt=time_in_minutes) Is there a way of doing this without implementing a separate duration field

Re: Access denied for MySQL user in Django

2016-01-19 Thread Fred Stluka
Galil, Try this also: mysql> use mysql; mysql> delete from user where host='%' and 'user=''; mysql> flush privileges; --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc --

Re: like query django

2016-01-19 Thread James Schneider
> > {{movies.likes}} peaple liked this article > Like > > > This is not how you should generate URL's within your templates. You should be using the {% url %} tag to automatically generate them: Like If using the slug in your urls.conf, your {% url %} tag would look something like this: Like

Re: like query django

2016-01-19 Thread Xristos Xristoou
not work again florian same error again Τη Τρίτη, 19 Ιανουαρίου 2016 - 5:35:09 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: > > hello, > > > i want to create a query for likes in my post details > > my html tags > > {{movies.likes}} peaple liked this article > Like > > > my urls > > >

Re: like query django

2016-01-19 Thread Florian Schweikert
On 19/01/16 16:35, Xristos Xristoou wrote: > url(r'^view/(?P[^\.]+)/$', views.view_post, name='view_post'), > url(r'^(?P[0−9]+)/$', views.like_post, name='like_post'), this defines urls like /1/ > The current URL, |like/1/|, didn't match any of these. of course it doesn't, you didn't define a

like query django

2016-01-19 Thread Xristos Xristoou
hello, i want to create a query for likes in my post details my html tags {{movies.likes}} peaple liked this article Like my urls url(r'^view/(?P[^\.]+)/$', views.view_post, name='view_post'), url(r'^(?P[0−9]+)/$', views.like_post, name='like_post'), my view def

Re: django admin objectaction confirmation

2016-01-19 Thread 张超
Thank you very much! 在 2016年1月19日星期二 UTC+8下午3:14:49,Andréas Kühne写道: > > Hi, > > Check how actions work in the admin interface. You should be able to > create something that works the same by clicking on a button. See here: > https://docs.djangoproject.com/en/1.9/ref/contrib/admin/actions/ > >

Re: regular expression confusion

2016-01-19 Thread Xristos Xristoou
i find it thnx for the help -- 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 group, send email to

Re: regular expression confusion

2016-01-19 Thread Xristos Xristoou
> > yeah but now must be change mt template tags ? > > > *for example* > > my first template tags from the main page to the view page {{movies.Title}} -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: regular expression confusion

2016-01-19 Thread Xristos Xristoou
> > yeah but now must to change my template tags ? for exable > > my first template tags {{*posts*.Title}} > > -- 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

Re: regular expression confusion

2016-01-19 Thread James Schneider
On Tue, Jan 19, 2016 at 2:30 AM, Xristos Xristoou wrote: > hello, > > i have a regular expression confusion error i cant work my app with > together 2 and 3 line from *my blog/**urls *if i work regardless that > lines work fine > but i need together for my project. > > *my

regular expression confusion

2016-01-19 Thread Xristos Xristoou
hello, i have a regular expression confusion error i cant work my app with together 2 and 3 line from *my blog/**urls *if i work regardless that lines work fine but i need together for my project. *my mysite/urls* url(r'^admin/', include(admin.site.urls)), url(r'', include('blog.urls')),

Re: turn on "string_if_invalid" as a ‘development default’

2016-01-19 Thread James Schneider
> > We have no "pre-release final check/test". We run the whole test-suite > twice daily. This is done automatically be jenkins. > We try to automate as much as possible. Manual examination is possible, > but who wants to do this? I would like to have it automated. > All tests run in around 10

Re: turn on "string_if_invalid" as a ‘development default’

2016-01-19 Thread guettli
Am Montag, 18. Januar 2016 12:02:15 UTC+1 schrieb James Schneider: > > A second batch of tests? >> >> I am unsure if I understood you: Do you mean new tests, or running the >> same >> tests again, with a different settings file? >> > > I meant the latter. Sorry for not being clear. > > >> >>