3 ms·
Usually with side projects I bite off more than I can chew and never ship them. This time I tackled something a bit smaller, but hopefully useful. This adds a
by avalaunch 12y ago
Usually with side projects I bite off more than I can chew and never ship them. This time I tackled something a bit smaller, but hopefully useful. This adds a management command to Django that will automatically generate views, admin, urls, forms, and templates for each model in a given app. After you add a urlpattern to your URLconf everything will be fully operational, with a ListView, DetailView, CreateView, UpdateView, and DeleteView for each model. In addition, it stubs out a bunch of commonly overridden methods to make editing a quicker process. It also tries to make smart choices here and there to get you up and running quickly. For example, in the admin, the list_display is already set to every field in the model other than ID. And each URLField is listed as a clickable link, as is each ForeignKey and OneToOneField. The list_filter and search_fields attributes are also set. I wrote some detailed documentation in the README.
Anyway, I hope this is of use to someone.