Re: Timezone import error

2015-11-30 Thread ahmed . abdullah . bh
Hi kbnk, monoBOT, Thank you both, your answers on the spot, I have tried using the filter and it's working, I may need to delete one of the records to get this sorted, thanks again. >>> Question.objects.filter(pub_date__year=current_year) [, ] Best regards, Ahmed Abdullah On Sunday, 29 Novemb

Re: Timezone import error

2015-11-29 Thread monoBOT
Hello Ahmed you are using the get method, get can only return 1 item and its returning more than 1 in your case 2, thats the second error, but there is an import error also somewhere in your code, but the traceback you are sending is not concluyent. 2015-11-29 15:11 GMT+00:00 : > Hi, > > I'm pra

Re: Timezone import error

2015-11-29 Thread knbk
Hi Ahmed, When an error happens in an expect: block, python 3 shows the original error caught by the try/expect block, as well as the new error. In this case, the ImportError is the original error, and it's nothing you should worry about: Django catches it and handles it accordingly. Admittedly

Timezone import error

2015-11-29 Thread ahmed . abdullah . bh
Hi, I'm practicing Django v 1.8.6 (Writing your first Django app, part 1) and getting error when trying to import timezone, also I have installed pytz, when I try to use the import timezone package I'm getting ImportError. My settings.py has USE_TZ set to true by default, also, I had to change