Add Django 1.4 support - remove old feeds import (no longer required) and add Timezone support. Fixes #135.

This commit is contained in:
Ross Poulton 2012-05-11 17:02:55 +10:00
parent 1a8fa1e885
commit 9f0e07f5e6
2 changed files with 5 additions and 3 deletions

View File

@ -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',

View File

@ -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