A good place to see how to use the features of a Django application are application tests.
Here are a few examples from the django-extension UUIDField tests that demonstrate how to use this field:
from django.db import models from django_extensions.db.fields import UUIDField class TestModel_field(models.Model): a = models.IntegerField() uuid_field = UUIDField() class TestModel_pk(models.Model): uuid_field = UUIDField(primary_key=True)
Without seeing the whole file, it's hard to say what is happening. Make sure you import the UUIDField from django_extensions.db.fields (as in the example above), and not into the uuid Python module.
source share