Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rex Dri
Rex Dri
Commits
edac1826
Commit
edac1826
authored
Sep 01, 2018
by
Florent Chehab
Browse files
Currency model updated
parent
42c0b031
Changes
3
Hide whitespace changes
Inline
Side-by-side
backend/migrations/0003_auto_20180901_1134.py
0 → 100644
View file @
edac1826
# Generated by Django 2.0.3 on 2018-09-01 09:34
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'backend'
,
'0002_auto_20180901_1000'
),
]
operations
=
[
migrations
.
RenameField
(
model_name
=
'currency'
,
old_name
=
'one_USD_in_this_currency'
,
new_name
=
'one_EUR_in_this_currency'
,
),
]
backend/migrations/0004_auto_20180901_1429.py
0 → 100644
View file @
edac1826
# Generated by Django 2.0.3 on 2018-09-01 12:29
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'backend'
,
'0003_auto_20180901_1134'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'currency'
,
name
=
'symbol'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
30
,
null
=
True
),
),
]
backend/models/location/currency.py
View file @
edac1826
...
...
@@ -7,8 +7,8 @@ from backend.models.my_model import MyModel, MyModelSerializer, MyModelViewSet
class
Currency
(
MyModel
):
code
=
models
.
CharField
(
primary_key
=
True
,
max_length
=
15
)
name
=
models
.
CharField
(
max_length
=
100
)
symbol
=
models
.
CharField
(
max_length
=
5
)
one_
USD
_in_this_currency
=
models
.
DecimalField
(
symbol
=
models
.
CharField
(
null
=
True
,
blank
=
True
,
max_length
=
30
)
one_
EUR
_in_this_currency
=
models
.
DecimalField
(
max_digits
=
20
,
decimal_places
=
6
,
validators
=
[
MinValueValidator
(
0
)]
...
...
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