Skip to main content

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

Metadata

Release files for django-lint 2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-lint 2
File Size Uploaded
django-lint-2.tar.gz 7.9 kB Details

Release files / django-lint-2.tar.gz

Download URL django-lint-2.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
39c024c9cad516d8b1a9e8639cabd90cd68d225b0b0b162c7984291c92cd306e
BLAKE2b-256 checksum
How to use checksums
13914fa581be2f0615db1a84850cb1038ab3549d7550d57ecbc6352c11a5d530
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

2.0.4

1 release file

2.0.3

1 release file

2.0.1

1 release file

This release

2 This release

1 release file

1

1 release file

0.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page