Showing posts with label django. Show all posts
Showing posts with label django. Show all posts

On Django Grappelli

When adding any new framework or library to your development, you'll eventually encounter the 80/20 rule in software development. In which you've finish the 80% of the work but stuck almost infinitely with the remaining 20%.

Several things I learned the hard way about Django Grappelli.

Sequence of loading the INSTALLED_APPS is very important. The Grappelli module must comes before django.contrib.admin module. Failing to do so and the changes to the admin layout will not take effect.

If you want to customize the layout and use the default CSS styling, read the documentation on templates. Unfortunately, not googlable and must be access locally though your Django instance at http://localhost:8000/grappelli/grp-doc/. Oh boy, so much time wasted on googling for the tutorial or documentation on customization.

Where is the bloody documentation on nav-global block?

Which Python Framework?

As I was revisiting Python again, I was wondering which Python web framework should I look into ? Denis Krienb├╝hl shared his experiences on using all four popular Python frameworks and which one to use. To expand a bit of his tl;dr; summary.

a) Flask.
Simple and one-page app like dashboard status.

b) Django.
Quick CRUD app with built-in authentication and administration. Opinionated.

c) Pyramid.
Similar to Django but less opinionated and has the flexibility of mixing different libraries.

d) Plone.
For Content Management System (CMS) only.

Maybe I should look into Flask instead of Bottle and Pyramid instead of Django. My friend, Kamal, recommended that I stick with PeeWee and Bootle.