From 9f0e07f5e6dabe4db5c94f9372671bd98ad273da Mon Sep 17 00:00:00 2001 From: Ross Poulton Date: Fri, 11 May 2012 17:02:55 +1000 Subject: [PATCH] Add Django 1.4 support - remove old feeds import (no longer required) and add Timezone support. Fixes #135. --- helpdesk/urls.py | 2 -- helpdesk/views/staff.py | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/helpdesk/urls.py b/helpdesk/urls.py index 7bda5433..a5bb4d30 100644 --- a/helpdesk/urls.py +++ b/helpdesk/urls.py @@ -10,12 +10,10 @@ urls.py - Mapping of URL's to our various views. Note we always used NAMED from django.conf import settings from django.conf.urls.defaults import * from django.contrib.auth.decorators import login_required -from django.contrib.syndication.views import feed as django_feed from helpdesk import settings as helpdesk_settings from helpdesk.views import feeds - urlpatterns = patterns('helpdesk.views.staff', url(r'^dashboard/$', 'dashboard', diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py index fd4780d0..697c01a3 100644 --- a/helpdesk/views/staff.py +++ b/helpdesk/views/staff.py @@ -257,7 +257,11 @@ def update_ticket(request, ticket_id, public=False): if not (due_date_year and due_date_month and due_date_day): due_date = ticket.due_date else: - due_date = datetime(due_date_year, due_date_month, due_date_day) + if ticket.due_date: + due_date = ticket.due_date + else: + due_date = datetime.now() + due_date = due_date.replace(due_date_year, due_date_month, due_date_day) tags = request.POST.get('tags', '') # We need to allow the 'ticket' and 'queue' contexts to be applied to the