I'm encountering an issue with the seeding process in my Django application using the django_seed library. I've configured the seed data for my TipoSuscripcion model following the documentation and examples provided. However, when I execute the seeding process, it inserts an excessive amount of data into the database, filling it with unwanted records.
Here's a summary of the problem and my setup: Utilizing the django_seed library for data seeding. Defined seed data for the TipoSuscripcion model in a separate seed script (seeds.py). Running the seeding process via the python manage.py seed app command.
this is my code
from django_seed import Seed
from app.models import TipoSuscripcion
def seed_data():
seeder = Seed.seeder()
tipo_suscripcion_data = [Private]
seeder.add_entity(TipoSuscripcion, tipo_suscripcion_data, custom_fields={'activo': True}) # Assuming 'activo' is a boolean field
# Execute the seeding
seeder.execute()
if __name__ == '__main__':
seed_data()
This si the file tree
drwxr-xr-x - emilioramirezmscarua 25 Jan 10:13. app
.rw-r--r-- 131k emilioramirezmscarua 23 Jan 13:16 db.sqlite3
.rwxr-xr-x 686 emilioramirezmscarua 23 Jan 13:16 manage.py
.rw-r--r-- 5.9k emilioramirezmscarua 25 Jan 10:13 README
.md.rw-r--r-- 45 emilioramirezmscarua 23 Jan 13:16 requirements
.txtdrwxr-xr-x - emilioramirezmscarua 25 Jan 11:44 seeds
.rw-r--r-- 5.7k emilioramirezmscarua 25 Jan 11:40 └── seeds
.pydrwxr-xr-x - emilioramirezmscarua 24 Jan 11:28 sistema_control_de_inventarios
drwxr-xr-x - emilioramirezmscarua 23 Jan 13:16 staticfiles
I only want a seeds for the table TipoSuscripcion, but it is strange that it give me so much trash in all the tables