Commit 14a6fe41 authored by David Haynes's avatar David Haynes 🙆
Browse files

Modify the definition of short

- was a CharField but that limited short urls to be just characters
- now a SlugField which better accomidates urls with numbers,hypens, etc.
- included migration since I think that's what you do(?)
parent f27ed720
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('go', '0002_auto_20140911_1336'),
operations = [
field=models.SlugField(max_length=20, serialize=False, primary_key=True),
......@@ -21,7 +21,7 @@ class URL(models.Model):
date_created = models.DateTimeField(
target = models.URLField(max_length=1000)
short = models.CharField(primary_key=True, max_length=20)
short = models.SlugField(primary_key=True, max_length=20)
clicks = models.IntegerField(default=0)
qrclicks = models.IntegerField(default=0)
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