DT
Size: a a a
DT
AM
AM
DT
p
def test_admin_add_news_with_all_en_fileds_writed(self):
client = Client(username=self.user.username, password=self.user.password)
url = '/admin/info/news/add/'
data = {'title': None}
response = client.post(url, data, format='json')
self.assertEqual(response.status_code, 302)
он грит что типо не может None быть тамTypeError: Cannot encode None as POST data. Did you mean to pass an empty string or omit the value?мне нужно None туда передать
а
SS
АА
def test_admin_add_news_with_all_en_fileds_writed(self):
client = Client(username=self.user.username, password=self.user.password)
url = '/admin/info/news/add/'
data = {'title': None}
response = client.post(url, data, format='json')
self.assertEqual(response.status_code, 302)
он грит что типо не может None быть тамTypeError: Cannot encode None as POST data. Did you mean to pass an empty string or omit the value?мне нужно None туда передать
а
p
CharField но есть еще другие поля с TextFieldp
title = models.CharField(_('title'), max_length=255, null=True, blank=True)p
AB
title = models.CharField(_('title'), max_length=255, null=True, blank=True)АА
title = models.CharField(_('title'), max_length=255, null=True, blank=True)AB
АА
yh
|
A
A