> For the complete documentation index, see [llms.txt](https://lauradang.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lauradang.gitbook.io/notes/web/django/manipulating-models.md).

# Manipulating Models

### Get model

```python
MyModel = apps.get_moel('app_name', 'MyModel')
```

### Get field values

```python
for model_obj in MyModel.objects.all():
  model_obj.field_name # get value of field name of obj
  Model.objects.get(pk=...)
  
  model_obj_save() # make sure you save after manipulating anything
```
