Skip to content

Commit 2e32c7f

Browse files
committed
Use Django's UUIDField instead of uuidfield package
1 parent 52838b4 commit 2e32c7f

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

junction/devices/migrations/0001_initial.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
import uuidfield.fields
54
from django.db import migrations, models
65

76
import junction.devices.models
@@ -34,12 +33,7 @@ class Migration(migrations.Migration):
3433
auto_now=True, verbose_name="Last Modified At"
3534
),
3635
),
37-
(
38-
"uuid",
39-
uuidfield.fields.UUIDField(
40-
unique=True, max_length=32, db_index=True
41-
),
42-
),
36+
('uuid', models.UUIDField(max_length=32, unique=True, db_index=True)),
4337
("is_verified", models.BooleanField(default=False)),
4438
("verification_code", models.IntegerField()),
4539
(

junction/devices/models.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# -*- coding: utf-8 -*-
2-
32
import datetime
43

54
from django.db import models
65
from django.utils.timezone import now
7-
from uuidfield import UUIDField
86

97
from junction.base.models import TimeAuditModel
108

@@ -14,7 +12,7 @@ def expiry_time(expiry_mins=60):
1412

1513

1614
class Device(TimeAuditModel):
17-
uuid = UUIDField(version=1, hyphenate=True, unique=True, db_index=True)
15+
uuid = models.UUIDField(unique=True, max_length=32, db_index=True)
1816

1917
# Verification
2018
is_verified = models.BooleanField(default=False)

0 commit comments

Comments
 (0)