質問編集履歴
1
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -10,4 +10,19 @@
|
|
10
10
|
```zsh
|
11
11
|
Python int too large to convert to SQLite INTEGER
|
12
12
|
```
|
13
|
-
検索したのですが、解決策が見当たらないため、アドバイスお願いします。
|
13
|
+
検索したのですが、解決策が見当たらないため、アドバイスお願いします。
|
14
|
+
|
15
|
+
追記
|
16
|
+
アドバイスを受け、UUIDFieldからSlugFieldに変更したのですが、新たなエラーが発生してしまいました。
|
17
|
+
|
18
|
+
```python
|
19
|
+
class Post(models.Model):
|
20
|
+
def get_uuid_no_dash():
|
21
|
+
return uuid.uuid4().hex
|
22
|
+
id = models.SlugField(primary_key=True,default=get_uuid_no_dash, max_length=50, unique=True))
|
23
|
+
text = models.CharField(max_length=50)
|
24
|
+
```
|
25
|
+
発生エラー
|
26
|
+
```zsh
|
27
|
+
invalid literal for int() with base 10: 'aca291o86ca94847b1e9c79c57b5358a'
|
28
|
+
```
|