Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23276

Import "shortuuid.django_fields" could not be resolved

$
0
0

Even after installing django-shortuuidfield, i couldnt import shortuuid or shortuuidfield into my python code. I dont know whats wrong

from django.db import modelsfrom shortuuid.django_fields import ShortUUIDField from django.utils.html import mark_safefrom userauths.models import Userclass category(models.Model):    cid = ShortUUIDField(unique=True, length=10, max_length=20, prefix="cat", alphabet="abcdefgh12345")    title = models.CharField(max_length=100)    image = models.ImageField(upload_to='category')

I have tried changing the "from" path like (from . import ShortUUID) or other instances but i keep getting the same error


Viewing all articles
Browse latest Browse all 23276

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>