Skip to content

Commit e8ee01a

Browse files
committed
add token field to user model
1 parent 2c96c2c commit e8ee01a

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
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.3 on 2016-11-29 14:54
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+
('user_app', '0001_initial'),
12+
]
13+
14+
operations = [
15+
migrations.AddField(
16+
model_name='pissuser',
17+
name='token',
18+
field=models.CharField(default='', max_length=64, unique=True),
19+
),
20+
]

apps/user_app/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Meta:
2020
username = models.CharField(max_length=64, null=False, blank=False, unique=True)
2121
password = models.CharField(max_length=512, null=False, blank=False)
2222
email = models.CharField(max_length=64, null=False, blank=False, unique=True)
23+
token = models.CharField(max_length=64, unique=True, default="")
2324
status = models.PositiveSmallIntegerField(default=0, blank=False, null=False)
2425
created_time = models.DateTimeField(auto_created=True, default=None)
2526
updated_time = models.DateTimeField(auto_now=True)

0 commit comments

Comments
 (0)