Hey Brother @KenWhitesell
i have a problem with model field, that Causing me to feel misunderstanding please help me
POST_LANG = (
('ENG', 'English'),
('Ger', 'Germany'),
('Fr', 'French'),)
class Post(models.Model):
id = models.UUIDField(----...)
slug = ......)
title = ....... )
tag = ......)
post_type = ...... )
created_at = ......)
updated_at = ......)
creator = ........)
post_img = .......)
maintainer = ........)
content = ......)
genre = ......)
urls = ......)
post_language = models.CharField(max_length=100, blank=True, choices=POST_LANG, default= 'ENG', help_text="Select the post's language (e.g. English, German etc.)",)
video = ......)
snippet = ......)
views = .....)
status = ......)
when i try to add new post instance i got the following Error
django.db.utils.DataError: malformed array literal: "ENG"
LINE 1: ...amptz, 1, 'img.png', NULL, 'Max', '', '', NULL, 0, 'ENG', 0)
^
DETAIL: Array value must start with "{" or dimension information.
i have searched on stackoverflow to see if there are any question related but never find any except
these two questions
1st
2nd
Both of them recommend to check the database to ensure the database field matches the one declared in model
I had a look at my database and found the column named the same as in the model,
i don’t understand what really causing this error, so i didn’t get it and can’t solve this error pleeeease some help