Static analysis tool for Django projects.
Project description
Consulting services: if your organisation needs a reputable software developer with a track record of producing high-quality and maintainable Python/Django code, please get in touch to discuss your needs. More info
Ideas
Default manager with restrictive get_query_set()
Oldforms (?)
- Overring definition of model. Eg:
- class MyModel(models.Model):
foo = [..] foo = [..]
Not importing settings via “django.conf import settings”
Not using reverse (or @permalink) in get_absolute_url (?)
Form definitions in models.py
Ignore tests
Models
Don’t count ManyToMany fields on a model as a field
Remove common prefix checking.
models.. specifying “objects = “ should be last
Views
Calling request.is_authenticated without actually calling function
order_by(‘?’)
request.method.upper is a no-op (etc.)
cache.set without a timeout
URLS
Unreversible urlpatterns
Layout
Form class not in forms.py
Admin class not in admin.py
Templates
{% if foo %}{{ foo }}{% else %}bar{% endif %} => {{ foo|default:”bar” }}
{% with foo as bar %} … [ not using {{ bar }} ] … {% endwith %}
{% endblock %} vs. {% endblock blockname %}
Settings
Ordering of MIDDLEWARE_CLASSES
TEMPLATE_DIRS not absolute
Layout
forms not in forms.py managers not in managers.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-lint-2.0.3.tar.gz
.
File metadata
- Download URL: django-lint-2.0.3.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dd0b0ed7192e626f774897b852cc6dbfbc5fe838f6f6cb315ff6ab4f01b5e29 |
|
MD5 | f709884cc7c946f8c15a2597fa0c6f07 |
|
BLAKE2b-256 | cb36de24237e2abaaebdea9320bcaba8180ea3e2f04019b10d331a6f8d8cd12c |