fix DateField to string bug

FFIB 5 jaren geleden
bovenliggende
commit
07b7f0c6cc
1 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  1. 4 2
      member/models.py

+ 4 - 2
member/models.py

@@ -1,5 +1,7 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 
3
+from datetime import datetime
4
+
3 5
 from django.db import models
4 6
 from django.utils.translation import ugettext_lazy as _
5 7
 from django_models_ext import BaseModelMixin, upload_file_path, upload_file_url, upload_path
@@ -330,7 +332,7 @@ class MemberActivityInfo(BaseModelMixin):
330 332
             'activity_id': self.activity_id,
331 333
             'title': self.title,
332 334
             'subtitle': self.subtitle,
333
-            'date': tc.local_string(utc_dt=self.date, format='%Y-%m-%d'),
335
+            'date': self.date.strftime('%Y-%m-%d'),
334 336
             'city': self.city,
335 337
             'location': self.location,
336 338
             'lat': self.lat,
@@ -350,7 +352,7 @@ class MemberActivityInfo(BaseModelMixin):
350 352
             'activity_id': self.activity_id,
351 353
             'title': self.title,
352 354
             'subtitle': self.subtitle,
353
-            'date': tc.local_string(utc_dt=self.date, format='%Y-%m-%d'),
355
+            'date': self.date.strftime('%Y-%m-%d'),
354 356
             'city': self.city,
355 357
             'location': self.location,
356 358
             'lat': self.lat,