---
source: crates/ruff/src/rules/flake8_django/mod.rs
---
DJ012.py:28:5: DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: field declaration should come before `Meta` class
   |
28 |         return "foobar"
29 | 
30 |     first_name = models.CharField(max_length=32)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DJ012
   |

DJ012.py:43:5: DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: field declaration should come before manager declaration
   |
43 |         return "foobar"
44 | 
45 |     first_name = models.CharField(max_length=32)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DJ012
   |

DJ012.py:56:5: DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: `__str__` method should come before custom method
   |
56 |           pass
57 |   
58 |       def __str__(self):
   |  _____^
59 | |         return "foobar"
   | |_______________________^ DJ012
   |

DJ012.py:69:5: DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: `save` method should come before `get_absolute_url` method
   |
69 |           pass
70 |   
71 |       def save(self):
   |  _____^
72 | |         pass
   | |____________^ DJ012
   |


