0👍
just give year=int(row[1]) if row[1] else 0
elm, created_elm = Elm.objects.get_or_create(name=row[0], year=int(row[1]) if row[1] else 0, power=int(row[2]))
- [Answered ]-Fixing request entity too large error under django/apache/mod_wsgi for file uploads
- [Answered ]-Configuring memcached with django
- [Answered ]-Django channels and docker-compose error
- [Answered ]-Django-filter: add "All" filter option for AllValuesFilter with LinkWidget
Source:stackexchange.com