Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Better model for panels settings - order and collapse status #278

Open
NejcZupec opened this issue Sep 6, 2012 · 0 comments
Open

Better model for panels settings - order and collapse status #278

NejcZupec opened this issue Sep 6, 2012 · 0 comments
Milestone

Comments

@NejcZupec
Copy link
Contributor

Main page panels are now draggable and droppable (issue #160), but a model is very simple. It has only two dicts, one is for collapsed status and the second one is for order. It would be better, if we have more semantic model.

For example, something like that:

class PanelState(mongoengine.EmbeddedDocument):
    collapsed = mongoengine.BooleanField()
    column = mongoengine.IntField()
    order = mongoengine.IntField()

class Panel(mongoengine.EmbeddedDocument):
    layout = mongoengine.MapField(mongoengine.EmbeddedDocumentField(PanelState))

class User(auth.User):
    panels = mongoengine.MapField(mongoengine.EmbeddedDocumentField(Panel))

You can also define a different model, if you wan't.

Naltharial pushed a commit to Naltharial/PiplMesh that referenced this issue Sep 13, 2012
Naltharial pushed a commit to Naltharial/PiplMesh that referenced this issue Sep 16, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant