mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 16:03:19 +01:00
Merge pull request #757 from OpenGeoLabs/145_due_date
fix issue with setting due date format, for the issue #145
This commit is contained in:
commit
b61c0c71fd
@ -166,6 +166,7 @@ class AbstractTicketForm(CustomFieldMixin, forms.Form):
|
|||||||
due_date = forms.DateTimeField(
|
due_date = forms.DateTimeField(
|
||||||
widget=forms.TextInput(attrs={'class': 'form-control'}),
|
widget=forms.TextInput(attrs={'class': 'form-control'}),
|
||||||
required=False,
|
required=False,
|
||||||
|
input_formats=['%d/%m/%Y', '%m/%d/%Y', "%d.%m.%Y", ],
|
||||||
label=_('Due on'),
|
label=_('Due on'),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -287,6 +288,7 @@ class TicketForm(AbstractTicketForm):
|
|||||||
self.fields['assigned_to'].choices = [('', '--------')] + [(u.id, u.get_username()) for u in assignable_users]
|
self.fields['assigned_to'].choices = [('', '--------')] + [(u.id, u.get_username()) for u in assignable_users]
|
||||||
self._add_form_custom_fields()
|
self._add_form_custom_fields()
|
||||||
|
|
||||||
|
|
||||||
def save(self, user=None):
|
def save(self, user=None):
|
||||||
"""
|
"""
|
||||||
Writes and returns a Ticket() object
|
Writes and returns a Ticket() object
|
||||||
|
@ -1029,7 +1029,8 @@ def datatables_ticket_list(request):
|
|||||||
serializers.py. The serializers and this view use django-rest_framework methods
|
serializers.py. The serializers and this view use django-rest_framework methods
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
model_object = query_tickets_by_args(cache.get('ticket_qs'), '-date_created', **request.query_params)
|
objects = cache.get('ticket_qs')
|
||||||
|
model_object = query_tickets_by_args(objects, '-date_created', **request.query_params)
|
||||||
serializer = TicketSerializer(model_object['items'], many=True)
|
serializer = TicketSerializer(model_object['items'], many=True)
|
||||||
result = dict()
|
result = dict()
|
||||||
result['data'] = serializer.data
|
result['data'] = serializer.data
|
||||||
|
Loading…
Reference in New Issue
Block a user