Skip to content

Commit

Permalink
String id to Label to implement #171
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikuoja committed May 13, 2016
1 parent 6399f7c commit 7b70c3f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions democracy/migrations/0013_string_id_to_label.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-05-03 09:50
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('democracy', '0012_add_organization_model'),
]

operations = [
migrations.AlterField(
model_name='label',
name='id',
field=models.CharField(blank=True, help_text='You may leave this empty to automatically generate an ID', max_length=32, primary_key=True, serialize=False, verbose_name='identifier'),
),
]
4 changes: 2 additions & 2 deletions democracy/models/label.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _

from .base import BaseModel
from .base import StringIdBaseModel


class Label(BaseModel):
class Label(StringIdBaseModel):
label = models.CharField(verbose_name=_('label'), default='', max_length=200)

class Meta:
Expand Down

0 comments on commit 7b70c3f

Please sign in to comment.