Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Rex Dri
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rex Dri
Rex Dri
Commits
9743527c
Commit
9743527c
authored
Sep 10, 2018
by
Florent Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed models and add frequency to scholarship
parent
0204a094
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
1 deletion
+57
-1
backend/migrations/0004_auto_20180910_1834.py
backend/migrations/0004_auto_20180910_1834.py
+19
-0
backend/migrations/0005_auto_20180910_1846.py
backend/migrations/0005_auto_20180910_1846.py
+23
-0
backend/models/abstract/scholarship/scholarship.py
backend/models/abstract/scholarship/scholarship.py
+14
-0
backend/models/university/universityInfo.py
backend/models/university/universityInfo.py
+1
-1
No files found.
backend/migrations/0004_auto_20180910_1834.py
0 → 100644
View file @
9743527c
# Generated by Django 2.0.3 on 2018-09-10 16:34
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'backend'
,
'0003_auto_20180910_1731'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'universityinfo'
,
name
=
'costs_currency'
,
field
=
models
.
ForeignKey
(
default
=
'EUR'
,
on_delete
=
django
.
db
.
models
.
deletion
.
PROTECT
,
to
=
'backend.Currency'
),
),
]
backend/migrations/0005_auto_20180910_1846.py
0 → 100644
View file @
9743527c
# Generated by Django 2.0.3 on 2018-09-10 16:46
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'backend'
,
'0004_auto_20180910_1834'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'countryscholarship'
,
name
=
'frequency'
,
field
=
models
.
CharField
(
choices
=
[(
'w'
,
'week'
),
(
'm'
,
'month'
),
(
's'
,
'semester'
),
(
'y'
,
'year'
),
(
'o'
,
'one_shot'
)],
default
=
'm'
,
max_length
=
1
),
),
migrations
.
AddField
(
model_name
=
'universityscholarship'
,
name
=
'frequency'
,
field
=
models
.
CharField
(
choices
=
[(
'w'
,
'week'
),
(
'm'
,
'month'
),
(
's'
,
'semester'
),
(
'y'
,
'year'
),
(
'o'
,
'one_shot'
)],
default
=
'm'
,
max_length
=
1
),
),
]
backend/models/abstract/scholarship/scholarship.py
View file @
9743527c
...
...
@@ -4,11 +4,25 @@ from backend.models.currency import Currency
from
rest_framework
import
serializers
from
django.core.validators
import
MinValueValidator
SCHOLARSHIP_FREQUENCIES
=
(
(
'w'
,
'week'
),
(
'm'
,
'month'
),
(
's'
,
'semester'
),
(
'y'
,
'year'
),
(
'o'
,
'one_shot'
)
)
class
Scholarship
(
BasicModule
):
type
=
models
.
CharField
(
max_length
=
200
)
currency
=
models
.
ForeignKey
(
Currency
,
on_delete
=
models
.
PROTECT
)
frequency
=
models
.
CharField
(
max_length
=
1
,
choices
=
SCHOLARSHIP_FREQUENCIES
,
default
=
'm'
,
)
amount_min
=
models
.
DecimalField
(
max_digits
=
20
,
decimal_places
=
2
,
...
...
backend/models/university/universityInfo.py
View file @
9743527c
...
...
@@ -26,7 +26,7 @@ class UniversityInfo(BasicModule):
null
=
True
)
costs_currency
=
models
.
ForeignKey
(
Currency
,
on_delete
=
models
.
PROTECT
)
costs_currency
=
models
.
ForeignKey
(
Currency
,
on_delete
=
models
.
PROTECT
,
default
=
'EUR'
)
@
classmethod
def
get_serializer
(
cls
):
...
...
Write
Preview
Markdown
is supported
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