Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL Sosial
bisago
bisago-be
Commits
5adbfdaa
Commit
5adbfdaa
authored
May 29, 2021
by
Muhammad Rafif Elfazri
Browse files
Merge branch 'dev-rafif' into 'development'
Dev rafif See merge request
!57
parents
3d7c2c19
bb3f9ebc
Pipeline
#79440
passed with stages
in 7 minutes and 30 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
informasi_fasilitas/serializers.py
View file @
5adbfdaa
...
...
@@ -73,7 +73,7 @@ class KegiatanSerializerRead(KegiatanSerializer):
time
=
obj
.
time_start
zona_waktu
=
obj
.
zona_waktu
time
=
time_converter
(
time
,
zona_waktu
)
return
time
.
strftime
(
'%Y-%m-%d
T
%H:%M'
)
return
time
.
strftime
(
'%Y-%m-%d
%H:%M'
)
def
get_time_end
(
self
,
obj
):
time
=
obj
.
time_end
...
...
@@ -81,8 +81,7 @@ class KegiatanSerializerRead(KegiatanSerializer):
if
time
is
None
:
return
None
time
=
time_converter
(
time
,
zona_waktu
)
return
time
.
strftime
(
'%Y-%m-%dT%H:%M'
)
return
time
.
strftime
(
'%Y-%m-%d %H:%M'
)
class
KomentarKegiatanSerializer
(
serializers
.
ModelSerializer
):
kegiatan
=
serializers
.
IntegerField
(
source
=
'kegiatan.id'
,
read_only
=
True
)
...
...
informasi_fasilitas/test_base.py
View file @
5adbfdaa
...
...
@@ -58,15 +58,15 @@ class InformasiFasilitasTest(TestCase):
time_end
=
timezone
.
now
()
+
timedelta
(
days
=
2
)
time_start_zone
=
{
"WIB"
:
time_start
.
astimezone
(
TIMEZONE_INDONESIA
[
"WIB"
]).
strftime
(
"%Y-%m-%d
T
%H:%M%z"
),
"WITA"
:
time_start
.
astimezone
(
TIMEZONE_INDONESIA
[
"WITA"
]).
strftime
(
"%Y-%m-%d
T
%H:%M%z"
),
"WIT"
:
time_start
.
astimezone
(
TIMEZONE_INDONESIA
[
"WIT"
]).
strftime
(
"%Y-%m-%d
T
%H:%M%z"
),
"WIB"
:
time_start
.
astimezone
(
TIMEZONE_INDONESIA
[
"WIB"
]).
strftime
(
"%Y-%m-%d
%H:%M%z"
),
"WITA"
:
time_start
.
astimezone
(
TIMEZONE_INDONESIA
[
"WITA"
]).
strftime
(
"%Y-%m-%d
%H:%M%z"
),
"WIT"
:
time_start
.
astimezone
(
TIMEZONE_INDONESIA
[
"WIT"
]).
strftime
(
"%Y-%m-%d
%H:%M%z"
),
}
time_end_zone
=
{
"WIB"
:
time_end
.
astimezone
(
TIMEZONE_INDONESIA
[
"WIB"
]).
strftime
(
"%Y-%m-%d
T
%H:%M%z"
),
"WITA"
:
time_end
.
astimezone
(
TIMEZONE_INDONESIA
[
"WITA"
]).
strftime
(
"%Y-%m-%d
T
%H:%M%z"
),
"WIT"
:
time_end
.
astimezone
(
TIMEZONE_INDONESIA
[
"WIT"
]).
strftime
(
"%Y-%m-%d
T
%H:%M%z"
),
"WIB"
:
time_end
.
astimezone
(
TIMEZONE_INDONESIA
[
"WIB"
]).
strftime
(
"%Y-%m-%d
%H:%M%z"
),
"WITA"
:
time_end
.
astimezone
(
TIMEZONE_INDONESIA
[
"WITA"
]).
strftime
(
"%Y-%m-%d
%H:%M%z"
),
"WIT"
:
time_end
.
astimezone
(
TIMEZONE_INDONESIA
[
"WIT"
]).
strftime
(
"%Y-%m-%d
%H:%M%z"
),
}
# mock_kegiatan_test = {
...
...
pplbackend/settings.py
View file @
5adbfdaa
...
...
@@ -202,7 +202,7 @@ SOCIALACCOUNT_PROVIDERS = {
LOGIN_REDIRECT_URL
=
'/'
REST_FRAMEWORK
=
{
'DATETIME_FORMAT'
:
"%Y-%m-%d
T
%H:%M%z"
,
'DATETIME_FORMAT'
:
"%Y-%m-%d
%H:%M%z"
,
'DEFAULT_PAGINATION_CLASS'
:
'rest_framework.pagination.PageNumberPagination'
,
'PAGE_SIZE'
:
10
,
'DEFAULT_AUTHENTICATION_CLASSES'
:
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment