forms.Form.to_div ? and how override forms.Boundfield.label_tag?

2017-07-26 Thread threesixright
Hi All, Just started a few weeks ago with (v1.11) *Django* (coming from Rails) and I *love* it! Kudos to all the dev's! I'm fiddling with creating forms. What would be the best approach to add a *to_div* method to the *forms.Form* class ? many frameworks (bootstrap, semantic-ui, etc.) are usi

Re: Django Group Models

2017-07-26 Thread threesixright
Very roughly. Something along the lines of this I would create a Player (players) and a Match (matches) tables. The match table contains 4 keys (player1, player2, player3, player4) and some extra fields (created, status, etc.) For each player you store some type of a skill (number) and a status

Re: define database modelwise in django

2017-08-02 Thread threesixright
Have a look here: https://docs.djangoproject.com/en/1.11/topics/db/multi-db/ Basically: >>> # This will run on the 'default' database. >>> Author.objects.all() >>> # So will this. >>> Author.objects.using('default').all() >>> # This