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
82c5d90b
Commit
82c5d90b
authored
Dec 31, 2015
by
Rafal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fill tag model
parent
910e15b7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
models.py
JoinTheCityREST/app/Tag/models.py
+7
-2
serializers.py
JoinTheCityREST/app/Tag/serializers.py
+1
-1
No files found.
JoinTheCityREST/app/Tag/models.py
View file @
82c5d90b
...
...
@@ -2,8 +2,13 @@ from django.db import models
# Create your models here.
from
app.Localization.models
import
Localization
class
Tag
(
models
.
Model
):
pass
name
=
models
.
CharField
(
max_length
=
300
)
localization
=
models
.
ForeignKey
(
Localization
,
related_name
=
'tag_localization'
,
blank
=
False
,
null
=
False
,
default
=
None
)
def
__str__
(
self
):
return
self
.
name
\ No newline at end of file
JoinTheCityREST/app/Tag/serializers.py
View file @
82c5d90b
...
...
@@ -5,5 +5,5 @@ from app.Tag.models import Tag
class
TagSerializer
(
serializers
.
HyperlinkedModelSerializer
):
class
Meta
:
model
=
Tag
fields
=
()
fields
=
(
'url'
,
'name'
,
'localization'
)
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