DEV Community

Cover image for Django Dynamic DataTables - Free Library
Sm0ke
Sm0ke

Posted on β€’ Edited on β€’ Originally published at blog.appseed.us

28

Django Dynamic DataTables - Free Library

Hello coders!

This article mentions an open-source library for Django which provides an easy way to build a data tables interface for any model defined in a project. The source code, published on GitHub (MIT license), can be installed via PIP, extended, or used as it is in commercial projects or eLearning activities.

Thanks for reading!

The sample project mentioned above was coded during this short video that starts from an empty project.


✨ Library Highlights

The library can be used to prototype fast data tables UIs using minimal configuration and no coding. Once a new model is migrated to the database and the library configured to use it, the UI is ready to manage the data without writing any code using a simple data table layout.

Here is the required configuration for a model



DYNAMIC_DATATB = {
    # SLUG -> Import_PATH 
    'cities'  : "app2.models.City",
}


Enter fullscreen mode Exit fullscreen mode

The above snippet enables the Dynamic Data Table module for the City model defined in the app2 Django application.



class City(models.Model):     
name    = models.CharField(max_length=100)    
info    = models.CharField(max_length=100, default='')    
visited = models.CharField(max_length=100, default='false')


Enter fullscreen mode Exit fullscreen mode

Using the model definition, the UI is automatically generated and presented to the users.

Might be important to mention that all future updates on the model (add, remove fields) are reflected in the UI without writing code.

Django Dynamic Data Tables - Cities Model (free tool)


Thanks for reading! For more resources, feel free to access:

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (5)

Collapse
 
uithemes profile image
ui-themes β€’

Really useful for Django coders.
Any chances to have the pattern for Nodejs?
Ty

Collapse
 
sm0ke profile image
Sm0ke β€’

The NodeJS version is scheduled for development but is not even prototyped yet.
The Node ecosystem is fragmented (many libraries.. etc) and this migth complicate things.
Anyway, once the tools is released, for sure I will drop here a mention.

Thanks for reading! :)

Collapse
 
uithemes profile image
ui-themes β€’

Good luck.

Collapse
 
crearesite profile image
WebsiteMarket β€’

Great tool.

Collapse
 
sm0ke profile image
Sm0ke β€’

πŸš€πŸš€

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay