Saturday, January 9, 2021

Re: CRUD Generator

Actually, this might help:


Cookiecutter is very simple to use, and this is a template you use with it that generates a boilerplate entire (reusable) django app.

There's also a django project generator that I've recently started to use because the project layout - although not "standard startproject" format - is pretty neat even if opinionated. It also mandates some additional django modules that are great to use both in development and runtime. I don't exactly like some aspects of the layout it uses (namely so much non-code going into the app root, which should imho be less cluttered), but that's the beauty of it - templates are highly customisable.

It does generate your basic django boilerplate views, templates and even urls and admin.  I've not actually used it yet, but now that I've discovered it, I fully intend to.

/d

On 10 January 2021 at 11:37:43, davidn@uniquode.io (davidn@uniquode.io) wrote:

Well, yes, sure you can. But I think the OP had something in mind like https://pypi.org/project/drf-generators/ (which is awsome btw) but targeted at crud views / forms.

I must admit this is one of the nice things that rails scaffold provides in the RoR world.  The code generated by that is certainly not ideal nor even complete, but it does provide at least a lot of the required boilerplate.

No comments:

Post a Comment