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

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

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

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
  --> DJ012.py:69:5
   |
67 |           pass
68 |
69 | /     def save(self):
70 | |         pass
   | |____________^
   |

DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: field declaration should come before `Meta` class
   --> DJ012.py:123:5
    |
121 |         verbose_name = "test"
122 |
123 |     first_name = models.CharField(max_length=32)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124 |     last_name = models.CharField(max_length=32)
    |

DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: field declaration should come before `Meta` class
   --> DJ012.py:129:5
    |
127 |         pass
128 |
129 |     middle_name = models.CharField(max_length=32)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |

DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: field declaration should come before `Meta` class
   --> DJ012.py:146:5
    |
144 |         return "foobar"
145 |
146 |     first_name = models.CharField(max_length=32)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
