Wednesday, August 29th, 2012

Django Helper is here to help

In efforts to make Django project management easier in a team setting, I am in the process of building a Django app called django-helper. It will be a web-based addition to any Django-based project, which will allow developers to easily keep track of various Django resources. The first release will support the tracking of TemplateTags, context_processors, and Middleware in a project. At first it will not be automatic and magic, so it won't scan your project for such resources. I am not sure I really want to include an automatic feature anyways, it will just add clutter, and make it counter-productive like already included with Django.

Now you may ask, why make such an app when already exists? Simple, I want an easy to navigate documentation system for my Django project which only included my own personal apps for that specific project. includes documentation for every app in your entire project, and going through that can be a pain at times. For template authors, who don't care about mostly everything in there, but the template tags, it's a wasted effort. This app will be designed to be an easy to use and navigate Django knowledge-base.

Furthermore, future components I wish to add is a Django model designer(I have previously built one to prototype models), this model designer will allow you to create models via a web-based system and then export the appropriate and files for those models. Something of a What you see is what you get model designer for Django. At first it will only provide the fields included with the Django installation, but will be extendable to include custom fields types. This will make the model designing part of your app much more quicker, as you will no longer need to worry about manually creating an or the forms to go with your models.

Other than a model designer, I also plan on adding a simple template designer, which will build simple default templates for forms and detail views. These templates will work with the Generic Views Django provides. This will enable quicker application development and prototyping. Just open Django designer, select the model, and click a single button to create all the default templates for that model. Afterwards, fire up your text editor and modify the templates to suit your visual needs. By default, the details view template will include all the fields in the model, and use get_absolute_url to link to ForeignKeys, ManyToMany, and OneToOne field types. For fields which have choices, it will use the standard get_<field>_display method. A side idea, mainly for the sake of development, is to create a TemplateLoader which will auto-generate these default templates to speed up the overall model prototyping during development. If your like me, you start building your models first, and normally have no templates to test the models in. I aim to fix this limitation during initial prototyping with a simple TemplateLoader. I guess I really did like the automatic development templates provided by Web2py.

As you can see, especially with the last two components, this will make Django application development a piece of cake. All you need to do, is add the backend logic, pretty up the default templates, and add some URLs, the models part is basically all done.

About Me

My Photo
Names Kevin, hugely into UNIX technologies, not just Linux. I've dabbled with the demons, played with the Sun, and now with the Penguins.

Kevin Veroneau Consulting Services
Do you require the services of a Django contractor? Do you need both a website and hosting services? Perhaps I can help.

This Month

If you like what you read, please consider donating to help with hosting costs, and to fund future books to review.

Python Powered | © 2012-2019 Kevin Veroneau