Skip to content

Database - Too many tables. #8

@itekhi

Description

@itekhi

Hello! I'm just suggesting how you could optimize that problem with databases. I looked up at my database, and saw that I have new table everytime I create single instance model! So I thought you could somehow optimize that issue by placing all of the single instance model objects in one table in database. I think create something like "codename" column to understand which of the models "value" belongs to and "value" column in table and place there all of the model objects like "model.TextField" values.

I love your extension very much. It helped me more than once! So I think it would be great if that will be added.
And one small issue is that in Django 3+ to the model name 's' is added every time at the end. I think you could fix that by adding meta class with auto verbose_name_plural to the parent class of your SingleInstanceModel class.
I think I will fork this repo for this.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions