Commit 82c5d90b authored by Rafal's avatar Rafal

fill tag model

parent 910e15b7
......@@ -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
......@@ -5,5 +5,5 @@ from app.Tag.models import Tag
class TagSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Tag
fields = ()
fields = ('url', 'name', 'localization')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment