lincolnloop / django-lint

Django Lint is a static analysis tool that checks (or "lints") projects and applications that use the Django web development framework.

This URL has Read+Write access

yml (author)
Fri Sep 11 14:03:39 -0700 2009
commit  b71c354273fb1b79d778bc4330e8d8c6a4621795
tree    c75feddae718f738c075faaac6238f2fdcfdb12e
parent  117c9c140c8b0c817aeb123028e004c4c0510729
name age message
file .gitignore Mon Feb 09 03:19:47 -0800 2009 Ignore setuptools/distutils generated directories [fabiocorneti]
file COPYING Fri Dec 12 00:19:35 -0800 2008 Move to GPLv3+ (PyLint is under GPLv2; I'm pret... [Chris Lamb]
directory DjangoLint/ Fri Sep 11 14:03:39 -0700 2009 Fixes #1. django-lint is now compatible with py... [yml]
file README.rst Sat Dec 13 16:37:53 -0800 2008 Update TODO. Signed-off-by: Chris Lamb <lamby@... [Chris Lamb]
file django-lint Mon Feb 09 03:19:47 -0800 2009 Setuptools compatibility, moved django-lint scr... [fabiocorneti]
file django-lint.1 Sun Jan 11 15:36:01 -0800 2009 Add manpage. [Chris Lamb]
directory django_lint_example/ Sat Feb 28 17:51:57 -0800 2009 Add support (and examples) for mis-ordered MIDD... [Chris Lamb]
file setup.py Mon Feb 09 03:19:47 -0800 2009 Setuptools compatibility, moved django-lint scr... [fabiocorneti]
README.rst

django-lint

Ideas

  • Detecting default managers

  • Determining whether you have a poor code/applications ratio.

  • Oldforms (?)

  • Overring definition of model. Eg:
    class MyModel(models.Model):

    foo = [..] foo = [..]

  • Non-absolute template_dirs

  • Missing __unicode__ (?)

  • Not importing settings via "django.conf import settings"

  • No related_name

  • Not using reverse (or @permalink) in get_absolute_url (?)

Templates

  • {% if foo %}{{ foo }}{% else %}bar{% endif %} => {{ foo|default:"bar" }}
  • {% with foo as bar %} ... [ not using {{ bar }} ] ... {% endwith %}
  • {% endblock %} vs. {% endblock blockname %}
settings module:
  • Ordering of MIDDLEWARE_CLASSES
  • TEMPLATE_DIRS not absolute