willhardy / django-seo

Provides a set of tools for managing Search Engine Optimisation (SEO) for Django sites.
BSD 3-Clause "New" or "Revised" License
252 stars 117 forks source link

Nothing displayed when no metadata instance exists #9

Closed willhardy closed 13 years ago

willhardy commented 13 years ago

Currently if there is no instance, nothing will be displayed. This shouldn't happen if you are using seo_models or admin inlines from the start, but it may come up if you add the seo app to an existing project and haven't yet edited any model instances.

A way to make this less painful/confusing might be to add a management command to populate the database with empty metadata instances.

Another approach might be to call the populate_from values with any given models. This second approach might be too confusing, as it would only work if you provide the templatetag with an instance. I imagine working in the general case would be extremely difficult.

Doing both might be an acceptable solution, with maybe even an automatic population at syncdb. This makes a stronger case for the system being aware of which models are being used inline in the admin.

willhardy commented 13 years ago

Adding unit test to confirm recent missing metadata instance fix. Closed by 17d67249b43c9eaa1aad3aa4e33db240b9a42b57.