Update Django model from dictionary
Project description
Installation
$ [sudo] pip install django-update-from-dict
Examples
Mixin:
from django.db import models
from django_update_from_dict import update_from_dict, UpdateFromDictMixin
class ClassName(UpdateFromDictMixin,models.Model):
...
instance = ClassName()
instance.update_from_dict(attrs,commit=True)
function:
from django_update_from_dict import update_from_dict
update_from_dict(instance,attrs,commit=True)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-update-from-dict-2020.7.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f017a578a2c936d6aa9bfe388f505ff6eb5ddcbfc99ac45334bf7613ace55da8 |
|
MD5 | 43625db8e6a2912035514312896414f6 |
|
BLAKE2b-256 | 6bc4a8c3b290ffca975f90adf55f618a0f57dc3fdec0d5101fffe4b53fddec2e |