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
PMPL
Class Project
Kape
Commits
319f2c62
Commit
319f2c62
authored
May 04, 2017
by
Zamil Majdy
Browse files
[#140818877] [
#39
] [Green] implementations to change verified to status on company entity
parent
7d064006
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/migrations/0012_auto_20170502_0925.py
0 → 100644
View file @
319f2c62
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-02 02:25
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0011_merge_20170425_2214'
),
]
operations
=
[
migrations
.
AlterModelOptions
(
name
=
'company'
,
options
=
{
'ordering'
:
[
'-updated'
]},
),
migrations
.
AlterModelOptions
(
name
=
'student'
,
options
=
{
'ordering'
:
[
'-updated'
]},
),
migrations
.
AlterModelOptions
(
name
=
'supervisor'
,
options
=
{
'ordering'
:
[
'-updated'
]},
),
migrations
.
AlterModelOptions
(
name
=
'vacancy'
,
options
=
{
'ordering'
:
[
'-updated'
]},
),
migrations
.
RemoveField
(
model_name
=
'company'
,
name
=
'verified'
,
),
migrations
.
AddField
(
model_name
=
'company'
,
name
=
'status'
,
field
=
models
.
IntegerField
(
default
=
0
),
),
]
core/models/accounts.py
View file @
319f2c62
...
...
@@ -75,16 +75,23 @@ class Student(models.Model):
def
__unicode__
(
self
):
return
u
"Student {}"
.
format
(
get_display_name
(
self
.
user
))
class
Meta
:
ordering
=
[
'-updated'
]
class
Company
(
models
.
Model
):
"""
A user subclass
"""
NEW
=
0
UNVERIFIED
=
1
VERIFIED
=
2
created
=
models
.
DateTimeField
(
auto_now_add
=
True
)
updated
=
models
.
DateTimeField
(
auto_now
=
True
)
user
=
models
.
OneToOneField
(
User
)
description
=
models
.
TextField
()
verified
=
models
.
Boolean
Field
(
default
=
False
)
status
=
models
.
Integer
Field
(
default
=
NEW
)
logo
=
models
.
FileField
(
upload_to
=
get_company_logo_file_path
,
null
=
True
,
blank
=
True
)
address
=
models
.
CharField
(
max_length
=
1000
,
blank
=
True
,
null
=
True
)
...
...
@@ -95,6 +102,9 @@ class Company(models.Model):
def
__unicode__
(
self
):
return
u
"Company {}"
.
format
(
get_display_name
(
self
.
user
))
class
Meta
:
ordering
=
[
'-updated'
]
class
Supervisor
(
models
.
Model
):
"""
...
...
@@ -111,3 +121,6 @@ class Supervisor(models.Model):
def
__unicode__
(
self
):
return
u
"Supervisor {}"
.
format
(
get_display_name
(
self
.
user
))
class
Meta
:
ordering
=
[
'-updated'
]
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