Skip to main content

UNKNOWN

Project description

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

django-lint-1.tar.gz (7.9 kB view details)

Uploaded Source

File details

Details for the file django-lint-1.tar.gz.

File metadata

  • Download URL: django-lint-1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-lint-1.tar.gz
Algorithm Hash digest
SHA256 84c8670295cde196bb31ed07b27f0d334cacff1be019912c6227d72603fd1c4d
MD5 3b0921a456ca66757fa249e20422279d
BLAKE2b-256 f024833631e45ec486c59d4e68893168acaf6a6c80a609e0509c291aa34f9327

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page