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
8156ac42
Commit
8156ac42
authored
Nov 15, 2019
by
Satryaji Aulia
Browse files
Add constraint to Company.status
parent
84c33fbd
Pipeline
#25177
failed with stages
in 5 minutes and 2 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
core/models/accounts.py
View file @
8156ac42
...
@@ -140,7 +140,7 @@ class Company(models.Model):
...
@@ -140,7 +140,7 @@ class Company(models.Model):
updated
=
models
.
DateTimeField
(
auto_now
=
True
)
updated
=
models
.
DateTimeField
(
auto_now
=
True
)
user
=
models
.
OneToOneField
(
User
)
user
=
models
.
OneToOneField
(
User
)
description
=
models
.
TextField
()
description
=
models
.
TextField
()
status
=
models
.
IntegerField
(
default
=
NEW
)
status
=
models
.
IntegerField
(
validators
=
[
MaxValueValidator
(
2
),
MinValueValidator
(
0
)
)
logo
=
models
.
FileField
(
upload_to
=
get_company_logo_file_path
,
null
=
True
,
blank
=
True
,
validators
=
[
validate_image_file_extension
])
logo
=
models
.
FileField
(
upload_to
=
get_company_logo_file_path
,
null
=
True
,
blank
=
True
,
validators
=
[
validate_image_file_extension
])
address
=
models
.
CharField
(
max_length
=
1000
,
blank
=
True
,
null
=
True
)
address
=
models
.
CharField
(
max_length
=
1000
,
blank
=
True
,
null
=
True
)
category
=
models
.
CharField
(
max_length
=
140
,
default
=
"Belum ada kategori perusahaan"
)
category
=
models
.
CharField
(
max_length
=
140
,
default
=
"Belum ada kategori perusahaan"
)
...
...
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