Skip to content

Commit 9fab60c

Browse files
committed
Changed lenght of SlugField:PostgreSQL error
1 parent 9eea8d9 commit 9fab60c

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.10 on 2018-06-03 07:36
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations, models
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
('main', '0004_auto_20180603_0732'),
12+
]
13+
14+
operations = [
15+
migrations.AlterField(
16+
model_name='component',
17+
name='url_name',
18+
field=models.SlugField(max_length=255, null=True, unique=True),
19+
),
20+
]

main/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Component(models.Model):
2828
icon = models.ImageField(null=True, upload_to='icons/')
2929
github_url = models.URLField(null=True)
3030
short_description = models.TextField(null=True)
31-
url_name = models.SlugField(null=True, unique=True)
31+
url_name = models.SlugField(null=True, unique=True, max_length=255)
3232
commits = models.IntegerField(default=0, null=True)
3333
forks = models.IntegerField(default=0, null=True)
3434
watchers = models.IntegerField(default=0, null=True)

0 commit comments

Comments
 (0)