Deprecate custom API (see #198)

This commit is contained in:
Ross Poulton
2015-12-22 11:28:00 +11:00
parent 2df995b2a3
commit ca1690becb
4 changed files with 20 additions and 4 deletions

View File

@ -33,6 +33,8 @@ from helpdesk.forms import TicketForm
from helpdesk.lib import send_templated_mail, safe_template_context
from helpdesk.models import Ticket, Queue, FollowUp
import warnings
STATUS_OK = 200
STATUS_ERROR = 400
@ -53,8 +55,14 @@ def api(request, method):
must be valid users
* The method must match one of the public methods of the API class.
THIS IS DEPRECATED AS OF DECEMBER 2015 AND WILL BE REMOVED IN JANUARY 2016.
SEE https://github.com/rossp/django-helpdesk/issues/198 FOR DETAILS
"""
warnings.warn("django-helpdesk API will be removed in January 2016. See https://github.com/rossp/django-helpdesk/issues/198 for details.", category=DeprecationWarning)
if method == 'help':
return render_to_response('helpdesk/help_api.html')
@ -330,4 +338,4 @@ class API:
ticket.save()
return api_return(STATUS_OK)
return api_return(STATUS_OK)