importd icon indicating copy to clipboard operation
importd copied to clipboard

remove magic

Open amitu opened this issue 10 years ago • 4 comments

We have a bunch of thing that works, and a bunch of thing that kind of does not. For 1.0 release lets remove all magic.

What is importd?

Its a way to django projects, with less fuss. It has a settings framework, and it encourages sane and useful configuration for teams, like using envdir.

What we should keep

  • @d("/") decorator for views
  • settings framework
  • single file setup.
  • dj_database_url
  • smart return (how to do this without auto adjusting middlewares?)
  • auto wsgi setup
  • auto APP_DIR (call it PROJ_DIR?) and d.dotslash()
  • secret.txt support (optionally read it from ENV?)
  • auto set template dirs
  • auto set static dir
  • auto set DATABASES
  • auto set TEMPLATE_DEBUG to DEBUG
  • auto set MANAGERS to ADMINS
  • auto import .views and .admin etc for each app

What we should discard

  • modifying INSTALLED_APPS etc beyond what is done by settings framework (debug: and prod: prefix handling)
  • auto configuration of admin
  • werkzeug, django_jinja, django_extensions
  • d.get_object_or_404 etc (i have never used them personally)

Lets also deprecate < 1.8 in 1.0 release so we have less mess.

amitu avatar Sep 02 '15 11:09 amitu

Nice ideas Amitu :grey_exclamation:

I been thinking of secret.txt support (optionally read it from ENV?),

I think that should be a JSON file, because we all know how the structure of a JSON file is without reading any specific Documentation, but when people see a *.txt you dont know what to put there :grey_question:

To read from ENV should be a nice addition, but put passwords on ENV is widely used :grey_question:

Lets also deprecate < 1.8 in 1.0 release so we have less mess. Im so happy with this :grey_exclamation:

Have you seen that Coffin becomes only a pair of template tags since Django now supports Jinja2, so I suggest removing Coffin integration by default, since Coffin itself recommends doing so, or at least explain what I said.

I would say try to improve and update the Documentation :grey_question:

Upload the new version to PyPI of course :grey_exclamation:

:octocat:

ghost avatar Sep 02 '15 12:09 ghost

  • Some of this changes are now on Master.
  • All Tests passing, if you run it manually, even if Travis CI gets confused with Python2/Python3.
  • Secret Key improved, optionally read it from ENV.
  • werkzeug, django_jinja, django_extensions, coffin, etc etc all Clean Up.
  • Working with Django 1.9

:smile_cat:

ghost avatar Feb 01 '16 10:02 ghost

Nice work man :-) Looking forward to rest of it :-)

amitu avatar Feb 01 '16 14:02 amitu

With modern Djangos:

  • d.models is broken.
  • /admin/ is broken.
  • django-debug-toolbar is broken.
  • django-debug-toolbar itself seems unmaintained(?).
  • fhurl is broken.
  • I want to drop mandatory fhurl.

ghost avatar Feb 06 '16 04:02 ghost