ManoSeimas / manoseimas.lt

ManoSeimas.lt website source code.
http://manoseimas.lt/
GNU Affero General Public License v3.0
4 stars 3 forks source link

Create political topic #155

Closed chompomonim closed 8 years ago

chompomonim commented 8 years ago

Possibility to create new political topic (using django admin). Topic should have:

Subtasks:

We can use current mps votings implementations (save them in CauchDB) or rewrite to use MySQL. Any solution works (cheaper is better). I would more like to have list of mps with their position on this topic (0-100% support on given topic) save directly on PoliticalTopic table (for faster calls) that to recalculate each time we need that data.

sirex commented 8 years ago

Description (allow simple HTML markup)

Can I use Markdown for this? Markdown can be converted to HTML in backend and frontend will receive HTML.

Topic group (per test) Tests where to use this topic (can be more that one)

I would like to change data structure to something like this:

# Leave topic independent
class Topic:

# There can be many tests
class Test:

# Test can have test groups and each group, can have many topics
class TestGroup:
    test = ForeignKey(Test)
    topics = ManyToMany(Topic)

In Django admin, you will have to create topics first, then you can create test, test groups and assign already created topics to test groups. This will allow to have same topics in many tests.

Possibility to create new political topic (using django admin)

If you agree with the data structure I suggested, then this will require possibility to create test with inline test groups and topics.

We can use current mps votings implementations (save them in CauchDB) or rewrite to use MySQL. Any solution works (cheaper is better).

Just tested voting synchronisation, it does not work with new lrs.lt website, if we are planning to take votings from new website, this part should be rewritten anyway.

chompomonim commented 8 years ago

I think we should use some kind of WYSIWYG in django admin panel. So if that WYSIWYG module use Markdown, then ok, if no, then use what they need. https://www.djangopackages.com/grids/g/wysiwyg/

chompomonim commented 8 years ago

I would like to change data structure to something like this:

You can change structure as you need. But one question. If I will already have test and test group, could I create new topic by attaching it into existing group?

sirex commented 8 years ago

If I will already have test and test group, could I create new topic by attaching it into existing group?

Yes. Topics would be independent from tests and test groups. Test group would have ManyToMany field where you will be able to attach existing or create and attach new topic to a test group.

chompomonim commented 8 years ago

Then ok, let's go this way.

chompomonim commented 8 years ago

There is only one subtask not done, so I'm opening new task for it (#187) and closing this one.