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
ef93ef29
Commit
ef93ef29
authored
Aug 19, 2018
by
Florent Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flake8 in location.py
parent
c1914a04
Pipeline
#26280
passed with stages
in 1 minute and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
rex/models/location/location.py
rex/models/location/location.py
+8
-4
No files found.
rex/models/location/location.py
View file @
ef93ef29
from
django.db
import
models
from
rest_framework
import
serializers
,
viewsets
,
permissions
from
rest_framework
import
serializers
,
permissions
from
rex.models.tools
import
DictModeViewSet
# Data model based on : https://unstats.un.org/unsd/methodology/m49/overview/
...
...
@@ -8,13 +8,16 @@ from rex.models.tools import DictModeViewSet
class
Country
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
200
)
iso_alpha2_code
=
models
.
CharField
(
primary_key
=
True
,
max_length
=
2
)
iso_alpha3_code
=
models
.
CharField
(
unique
=
True
,
max_length
=
3
,
blank
=
False
,
null
=
False
)
iso_alpha3_code
=
models
.
CharField
(
unique
=
True
,
max_length
=
3
,
blank
=
False
,
null
=
False
)
region_name
=
models
.
CharField
(
max_length
=
200
)
region_un_code
=
models
.
CharField
(
max_length
=
3
)
sub_region_name
=
models
.
CharField
(
max_length
=
200
,
null
=
True
,
blank
=
True
)
sub_region_un_code
=
models
.
CharField
(
max_length
=
3
,
null
=
True
,
blank
=
True
)
intermediate_region_name
=
models
.
CharField
(
max_length
=
200
,
null
=
True
,
blank
=
True
)
intermediate_region_un_code
=
models
.
CharField
(
max_length
=
3
,
null
=
True
,
blank
=
True
)
intermediate_region_name
=
models
.
CharField
(
max_length
=
200
,
null
=
True
,
blank
=
True
)
intermediate_region_un_code
=
models
.
CharField
(
max_length
=
3
,
null
=
True
,
blank
=
True
)
class
City
(
models
.
Model
):
...
...
@@ -30,6 +33,7 @@ class City(models.Model):
API RELATED STUFF BELLOW
"""
class
CountrySerializer
(
serializers
.
ModelSerializer
):
class
Meta
:
...
...
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