Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Class Project
Kape
Commits
936e0972
Commit
936e0972
authored
Nov 15, 2019
by
NABILA FAKHIRAH YUSRONI
Browse files
Merge branch '1606875996-113' into 'master'
1606875996 113 See merge request
!169
parents
1efdc708
f8f51462
Pipeline
#25188
passed with stages
in 21 minutes and 57 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
assets/js/ProfilePage.jsx
View file @
936e0972
...
...
@@ -354,11 +354,7 @@ export default class ProfilePage extends React.Component {
</
Form
.
Field
>
<
Form
.
Field
>
<
label
htmlFor
=
"self_description"
>
Deskripsi Diri
</
label
>
<
input
onChange
=
{
this
.
handleChange
}
placeholder
=
"Saya suka belajar"
name
=
"self_description"
/>
<
input
onChange
=
{
this
.
handleChange
}
maxlength
=
"500"
placeholder
=
"Saya suka belajar"
name
=
"self_description"
/>
</
Form
.
Field
>
<
Form
.
Field
>
<
label
htmlFor
=
"linkedin_url"
>
URL Profile LinkedIn
</
label
>
...
...
core/migrations/0001_initial.py
View file @
936e0972
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-1
4
1
4:00
# Generated by Django 1.11.17 on 2019-11-1
5
1
1:27
from
__future__
import
unicode_literals
import
core.lib.validators
...
...
@@ -37,8 +37,8 @@ class Migration(migrations.Migration):
(
'status'
,
models
.
IntegerField
(
default
=
0
)),
(
'logo'
,
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
core
.
models
.
accounts
.
get_company_logo_file_path
,
validators
=
[
core
.
lib
.
validators
.
validate_image_file_extension
])),
(
'address'
,
models
.
CharField
(
blank
=
True
,
max_length
=
1000
,
null
=
True
)),
(
'category'
,
models
.
CharField
(
default
=
b
'Belum ada kategori perusahaan'
,
max_length
=
140
)),
(
'website'
,
models
.
CharField
(
default
=
b
'Belum ada link website'
,
max_length
=
100
)),
(
'category'
,
models
.
CharField
(
default
=
'Belum ada kategori perusahaan'
,
max_length
=
140
)),
(
'website'
,
models
.
CharField
(
default
=
'Belum ada link website'
,
max_length
=
100
)),
(
'user'
,
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
options
=
{
...
...
@@ -50,7 +50,7 @@ class Migration(migrations.Migration):
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'created'
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
(
'title'
,
models
.
CharField
(
blank
=
True
,
default
=
b
''
,
max_length
=
100
)),
(
'title'
,
models
.
CharField
(
blank
=
True
,
default
=
''
,
max_length
=
100
)),
(
'content'
,
models
.
TextField
()),
],
options
=
{
...
...
@@ -64,16 +64,16 @@ class Migration(migrations.Migration):
(
'created'
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
(
'updated'
,
models
.
DateTimeField
(
auto_now
=
True
)),
(
'npm'
,
models
.
IntegerField
(
unique
=
True
,
validators
=
[
core
.
lib
.
validators
.
validate_npm
])),
(
'resume'
,
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
core
.
models
.
accounts
.
get_student_resume_file_path
,
validators
=
[
django
.
core
.
validators
.
FileExtensionValidator
([
b
'pdf'
])])),
(
'resume'
,
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
core
.
models
.
accounts
.
get_student_resume_file_path
,
validators
=
[
django
.
core
.
validators
.
FileExtensionValidator
([
'pdf'
])])),
(
'sertifikat'
,
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
core
.
models
.
accounts
.
get_student_sertifikat_file_path
,
validators
=
[
core
.
lib
.
validators
.
validate_document_file_extension
])),
(
'phone_number'
,
models
.
CharField
(
blank
=
True
,
db_index
=
True
,
max_length
=
100
,
null
=
True
,
validators
=
[
django
.
core
.
validators
.
RegexValidator
(
b
'^0
\\
d{1,11}$'
)])),
(
'phone_number'
,
models
.
CharField
(
blank
=
True
,
db_index
=
True
,
max_length
=
100
,
null
=
True
,
validators
=
[
django
.
core
.
validators
.
RegexValidator
(
'^0
\\
d{1,11}$'
)])),
(
'gender'
,
models
.
CharField
(
blank
=
True
,
max_length
=
30
,
null
=
True
)),
(
'birth_place'
,
models
.
CharField
(
blank
=
True
,
max_length
=
30
,
null
=
True
)),
(
'birth_date'
,
models
.
DateField
(
blank
=
True
,
null
=
True
)),
(
'major'
,
models
.
CharField
(
blank
=
True
,
max_length
=
30
,
null
=
True
)),
(
'batch'
,
models
.
CharField
(
blank
=
True
,
max_length
=
4
,
null
=
True
)),
(
'show_transcript'
,
models
.
BooleanField
(
default
=
False
)),
(
'photo'
,
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
core
.
models
.
accounts
.
get_student_photo_file_path
,
validators
=
[
django
.
core
.
validators
.
FileExtensionValidator
([
b
'jpg'
,
b
'jpeg'
,
b
'png'
])])),
(
'photo'
,
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
core
.
models
.
accounts
.
get_student_photo_file_path
,
validators
=
[
django
.
core
.
validators
.
FileExtensionValidator
([
'jpg'
,
'jpeg'
,
'png'
])])),
(
'self_description'
,
models
.
CharField
(
blank
=
True
,
db_index
=
True
,
max_length
=
500
,
null
=
True
)),
(
'portfolio_link'
,
models
.
URLField
(
blank
=
True
,
null
=
True
)),
(
'linkedin_url'
,
models
.
URLField
(
blank
=
True
,
null
=
True
)),
...
...
@@ -91,14 +91,15 @@ class Migration(migrations.Migration):
(
'intro'
,
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
null
=
True
)),
(
'expected_salary'
,
models
.
CharField
(
blank
=
True
,
max_length
=
10
,
null
=
True
)),
(
'job_seeking_status'
,
models
.
CharField
(
blank
=
True
,
max_length
=
30
,
null
=
True
)),
(
'student_gpa'
,
models
.
FloatField
(
blank
=
True
,
db_column
=
b
'student_gpa'
,
default
=
1.0
,
null
=
True
)),
(
'student_gpa'
,
models
.
FloatField
(
blank
=
True
,
db_column
=
'student_gpa'
,
default
=
1.0
,
null
=
True
,
validators
=
[
core
.
lib
.
validators
.
validate_student_gpa
]
)),
(
'volunteer'
,
models
.
CharField
(
blank
=
True
,
max_length
=
100
,
null
=
True
)),
(
'awards'
,
models
.
CharField
(
blank
=
True
,
max_length
=
100
,
null
=
True
)),
(
'projects'
,
models
.
CharField
(
blank
=
True
,
max_length
=
100
,
null
=
True
)),
(
'certification'
,
models
.
CharField
(
blank
=
True
,
max_length
=
100
,
null
=
True
)),
(
'languages'
,
models
.
CharField
(
blank
=
True
,
max_length
=
100
,
null
=
True
)),
(
'seminar'
,
models
.
CharField
(
blank
=
True
,
max_length
=
100
,
null
=
True
)),
(
'dependants'
,
models
.
IntegerField
(
blank
=
True
,
db_column
=
b
'dependants'
,
default
=
0
,
null
=
True
)),
(
'interests'
,
models
.
CharField
(
blank
=
True
,
max_length
=
100
,
null
=
True
)),
(
'dependants'
,
models
.
IntegerField
(
blank
=
True
,
db_column
=
'dependants'
,
default
=
0
,
null
=
True
)),
],
options
=
{
'ordering'
:
[
'-updated'
],
...
...
@@ -110,7 +111,7 @@ class Migration(migrations.Migration):
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'created'
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
(
'updated'
,
models
.
DateTimeField
(
auto_now
=
True
)),
(
'nip'
,
models
.
IntegerField
(
unique
=
True
,
validators
=
[
django
.
core
.
validators
.
MinValueValidator
(
100000000
),
django
.
core
.
validators
.
MaxValueValidator
(
9999999999
L
)])),
(
'nip'
,
models
.
IntegerField
(
unique
=
True
,
validators
=
[
django
.
core
.
validators
.
MinValueValidator
(
100000000
),
django
.
core
.
validators
.
MaxValueValidator
(
9999999999
)])),
(
'user'
,
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
options
=
{
...
...
@@ -158,7 +159,7 @@ class Migration(migrations.Migration):
name
=
'ReasonRejected'
,
fields
=
[
(
'application'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
primary_key
=
True
,
serialize
=
False
,
to
=
'core.Application'
)),
(
'reason'
,
models
.
TextField
(
default
=
b
'Tidak memenuhi kualifikasi perusahaan.'
)),
(
'reason'
,
models
.
TextField
(
default
=
'Tidak memenuhi kualifikasi perusahaan.'
)),
],
),
migrations
.
AddField
(
...
...
core/migrations/0002_auto_20191109_2249.py
deleted
100644 → 0
View file @
1efdc708
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-09 15:49
from
__future__
import
unicode_literals
import
core.models.accounts
import
django.core.validators
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'company'
,
name
=
'category'
,
field
=
models
.
CharField
(
default
=
'Belum ada kategori perusahaan'
,
max_length
=
140
),
),
migrations
.
AlterField
(
model_name
=
'company'
,
name
=
'website'
,
field
=
models
.
CharField
(
default
=
'Belum ada link website'
,
max_length
=
100
),
),
migrations
.
AlterField
(
model_name
=
'feedback'
,
name
=
'title'
,
field
=
models
.
CharField
(
blank
=
True
,
default
=
''
,
max_length
=
100
),
),
migrations
.
AlterField
(
model_name
=
'reasonrejected'
,
name
=
'reason'
,
field
=
models
.
TextField
(
default
=
'Tidak memenuhi kualifikasi perusahaan.'
),
),
migrations
.
AlterField
(
model_name
=
'student'
,
name
=
'phone_number'
,
field
=
models
.
CharField
(
blank
=
True
,
db_index
=
True
,
max_length
=
100
,
null
=
True
,
validators
=
[
django
.
core
.
validators
.
RegexValidator
(
'^0
\\
d{1,11}$'
)]),
),
migrations
.
AlterField
(
model_name
=
'student'
,
name
=
'photo'
,
field
=
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
core
.
models
.
accounts
.
get_student_photo_file_path
,
validators
=
[
django
.
core
.
validators
.
FileExtensionValidator
([
'jpg'
,
'jpeg'
,
'png'
])]),
),
migrations
.
AlterField
(
model_name
=
'student'
,
name
=
'resume'
,
field
=
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
core
.
models
.
accounts
.
get_student_resume_file_path
,
validators
=
[
django
.
core
.
validators
.
FileExtensionValidator
([
'pdf'
])]),
),
migrations
.
AlterField
(
model_name
=
'student'
,
name
=
'student_gpa'
,
field
=
models
.
FloatField
(
blank
=
True
,
db_column
=
'student_gpa'
,
default
=
1.0
,
null
=
True
),
),
]
core/migrations/0002_auto_20191114_1728.py
deleted
100644 → 0
View file @
1efdc708
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-14 10:28
from
__future__
import
unicode_literals
import
core.models.accounts
import
django.core.validators
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'company'
,
name
=
'category'
,
field
=
models
.
CharField
(
default
=
'Belum ada kategori perusahaan'
,
max_length
=
140
),
),
migrations
.
AlterField
(
model_name
=
'company'
,
name
=
'website'
,
field
=
models
.
CharField
(
default
=
'Belum ada link website'
,
max_length
=
100
),
),
migrations
.
AlterField
(
model_name
=
'feedback'
,
name
=
'title'
,
field
=
models
.
CharField
(
blank
=
True
,
default
=
''
,
max_length
=
100
),
),
migrations
.
AlterField
(
model_name
=
'reasonrejected'
,
name
=
'reason'
,
field
=
models
.
TextField
(
default
=
'Tidak memenuhi kualifikasi perusahaan.'
),
),
migrations
.
AlterField
(
model_name
=
'student'
,
name
=
'phone_number'
,
field
=
models
.
CharField
(
blank
=
True
,
db_index
=
True
,
max_length
=
100
,
null
=
True
,
validators
=
[
django
.
core
.
validators
.
RegexValidator
(
'^0
\\
d{1,11}$'
)]),
),
migrations
.
AlterField
(
model_name
=
'student'
,
name
=
'photo'
,
field
=
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
core
.
models
.
accounts
.
get_student_photo_file_path
,
validators
=
[
django
.
core
.
validators
.
FileExtensionValidator
([
'jpg'
,
'jpeg'
,
'png'
])]),
),
migrations
.
AlterField
(
model_name
=
'student'
,
name
=
'resume'
,
field
=
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
core
.
models
.
accounts
.
get_student_resume_file_path
,
validators
=
[
django
.
core
.
validators
.
FileExtensionValidator
([
'pdf'
])]),
),
migrations
.
AlterField
(
model_name
=
'student'
,
name
=
'student_gpa'
,
field
=
models
.
FloatField
(
blank
=
True
,
db_column
=
'student_gpa'
,
default
=
1.0
,
null
=
True
),
),
]
core/migrations/0002_student_interest.py
deleted
100644 → 0
View file @
1efdc708
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-15 01:18
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'student'
,
name
=
'interest'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
100
,
null
=
True
),
),
]
core/migrations/0003_auto_20191115_0855.py
deleted
100644 → 0
View file @
1efdc708
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-15 01:55
from
__future__
import
unicode_literals
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0002_student_interest'
),
]
operations
=
[
migrations
.
RenameField
(
model_name
=
'student'
,
old_name
=
'interest'
,
new_name
=
'interests'
,
),
]
core/migrations/0004_merge_20191115_1041.py
deleted
100644 → 0
View file @
1efdc708
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-15 03:41
from
__future__
import
unicode_literals
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0003_auto_20191115_0855'
),
(
'core'
,
'0002_auto_20191109_2249'
),
]
operations
=
[
]
core/migrations/0005_merge_20191115_1314.py
deleted
100644 → 0
View file @
1efdc708
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-15 06:14
from
__future__
import
unicode_literals
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0002_auto_20191114_1728'
),
(
'core'
,
'0004_merge_20191115_1041'
),
]
operations
=
[
]
core/migrations/0006_auto_20191115_1409.py
deleted
100644 → 0
View file @
1efdc708
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-15 07:09
from
__future__
import
unicode_literals
import
core.lib.validators
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0005_merge_20191115_1314'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'student'
,
name
=
'student_gpa'
,
field
=
models
.
FloatField
(
blank
=
True
,
db_column
=
b
'student_gpa'
,
default
=
1.0
,
null
=
True
,
validators
=
[
core
.
lib
.
validators
.
validate_student_gpa
]),
),
]
core/tests/test_accounts.py
View file @
936e0972
...
...
@@ -237,6 +237,11 @@ class ProfileUpdateTests(APITestCase):
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_202_ACCEPTED
)
self
.
assertEqual
(
response
.
data
.
get
(
'seminar'
),
'Seminar CompFest'
)
failing_desc
=
"a"
*
501
url
=
'/api/students/'
+
str
(
student_id
)
+
"/profile/"
response
=
self
.
client
.
patch
(
url
,
{
'self_description'
:
failing_desc
},
format
=
'multipart'
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_400_BAD_REQUEST
)
url
=
'/api/students/'
+
str
(
student_id
)
+
"/profile/"
response
=
self
.
client
.
patch
(
url
,
{
'student_gpa'
:
'4'
},
format
=
'multipart'
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_202_ACCEPTED
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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