OpenEnergyPlatform / oeplatform

Repository for the code of the Open Energy Platform (OEP) website. The OEP provides an interface to the Open Energy Family
http://openenergyplatform.org/
GNU Affero General Public License v3.0
61 stars 19 forks source link

Add fixture to simply add all available topics to the django topics table #1443

Closed jh-RLI closed 7 months ago

jh-RLI commented 8 months ago

Description of the issue

Ffixtures can be used to seed the database with initial data. As intially the django table that mirrors the database schemas available in the OEDB is not seeded this can be used to simply add the available topic names.

Currently the developer must first create a table in each of the schemas so the topic is registerd in the django table. If one attempts to move a table from model draft then there will be a error stating that the topic is not available.

Ideas of solution

Add fixture with static data. Use django to seed the database: python manage.py loaddata dataedit/fixtures/topics.json

Workflow checklist