Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
JoinTheCity
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rafal
JoinTheCity
Commits
910e15b7
Commit
910e15b7
authored
Dec 31, 2015
by
Rafal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fill localization model
parent
14414bd3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
models.py
JoinTheCityREST/app/Localization/models.py
+6
-1
serializers.py
JoinTheCityREST/app/Localization/serializers.py
+1
-1
No files found.
JoinTheCityREST/app/Localization/models.py
View file @
910e15b7
...
...
@@ -4,4 +4,9 @@ from django.db import models
# Create your models here.
class
Localization
(
models
.
Model
):
pass
name
=
models
.
CharField
(
max_length
=
300
)
longitude
=
models
.
DecimalField
(
max_digits
=
9
,
decimal_places
=
6
,
default
=
None
)
latitude
=
models
.
DecimalField
(
max_digits
=
9
,
decimal_places
=
6
,
default
=
None
)
def
__str__
(
self
):
return
self
.
name
\ No newline at end of file
JoinTheCityREST/app/Localization/serializers.py
View file @
910e15b7
...
...
@@ -5,5 +5,5 @@ from app.Localization.models import Localization
class
LocalizationSerializer
(
serializers
.
HyperlinkedModelSerializer
):
class
Meta
:
model
=
Localization
fields
=
()
fields
=
(
'url'
,
'name'
,
'longitude'
,
'latitude'
)
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